E9.2 CAC0001025

the_king_of_mdk

Member
Help me Please

CAC0001025 - Application code leaked 6 caches which were detected when freeing environment JPD920 (EnvHandle 0086f190) for user EAMORALESR. Please refer to the debug log for details. If there are not enough details in the debug log to determine the cause, set Output=FILE in the [DEBUG] section of the JDE.INI and watch for this error message again. Or, set logCacheLeaksAtSignoff=TRUE in the [DEBUG] section of the JDE.INI and look for CAC0001036 error messages. This message (CAC0001025) will only appear with debug tools code or when debug logging is turned on.
 
You need to be a little more specific on what you need help with. If you want to see which cache instances are being referenced do what the instructions tell you and you will find them in the debug log and then you can research each one.

Having said that. This is NOT necessarily an error condition but then again it could be. That is why you have to do the debug log thing and research each one. My guess is that they probably are not actual bugs unless you are calling BSFNs that use jdeCache and you are not calling them correctly or making the necessary calls to free the jdeCache resources.

A little more info:
This is talking about jdeCache. There are several different design patterns using the jdeCache APIs with many derivatives, but there are three main jdeCache design patterns you will encounter. All are valid and are not necessarily memory leaks or an error condition although in some cases it could be considered a "temporary" memory leak or in other rare cases it could in fact be a straight up memory leak.

1. jdeCache instances are created as needed with a dynamically generated name which is unique in the user's session and when no longer needed the jdeCache instance and all of its contents (records) are destroyed and all resources (memory) free'd.

2. The jdeCache instance is created with a static globally identifiable name and records are deleted when no longer needed but the jdeCache instance itself is never destroyed and is only destroyed when the user's session is destroyed. This design pattern most closely mirrors a DB work table design and is the design pattern used most frequently for code that was ported from work tables to jdeCache such as Sales Order Entry (F42UI01, F42UI11, F42UI12 cache instances and related are examples of this).

3. The jdeCache instance is created with a static globally identifiable name, records are added but the records are NOT deleted but are retained for the duration of the user's session. When the user's session is destroyed both the jdeCache instance and the contents are destroyed and all resources (memory) are free'd. If you run Vertex the Vertex API function pointers are stored in just such a jdeCache instance - this jdeCache instance is created during the user's session creation, a record containing the Vertex function pointers is added and persists until the user's session is destroyed. Anything that needs to call Vertex simply reads the record from this jdeCache instance to obtain the API function pointers to Vertex. There are other's like this and are mainly used for performance.

In the case of #2 and #3 it will most likely result in the error you are referencing. Again if this is intentional this is not necessarily a bug or an error condition.

It is important to note that even if there are bugs in the case of #1 and #2 and either the jdeCache instance is not destroyed or the records are not deleted (again due to programming bugs). This memory will in fact be free'd when the user's session is destroyed. So you can think of this as a "temporary" memory leak. Now, if the cache records contain pointers to memory dynamically allocated some other way (jdeAlloc, jdeList, etc.) and those records and the memory pointed to by the pointers in the cache records should have been free'd but was not due to programming bugs then you may have a good old fashioned memory leak and that memory will not be reclaimed when the user's session is terminated but only when the COK is recycled.

Edit 1:
Proof read my post a couple of times and had to change a few things.
 
Last edited:
Back
Top