Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Recently,i write a xml- parser program on brew,the program is all ok except memory leak.
if you run this program in brew emulator,it can run very well .but when you exit this program by clr key or end key,the screen tell you that the module can not free all of you memory .
i have check my program carfully,but this program is very complex that i can not find the source of the error.
can anybody tell me what i can do to solve this problem

Check the debug output from the emulator. I will give some idea of what is leaking.

Check the debug output from the emulator. I will give some idea of what is leaking.

i have debug the program in VC++,even use the debug tool such as boundschecker.
but i can not find the error.

i have debug the program in VC++,even use the debug tool such as boundschecker.
but i can not find the error.

here is the outbut of debug:
#*g*C=1000003:3
ISHELL_AppStart 1
WakeStart...
#*gSU=16809984
#*gCL=16809984
WARNING: App Callback Pending (00CBFC70)
WARNING: App Callback Pending (00CBFF7C)
WARNING: App Callback Pending (00CC01C4)
WARNING: App Callback Pending (00CBE8E4)
WARNING: App Callback Pending (00CBF654)
WARNING: App Callback Pending (00CBF814)
App_Cleanup(1008000)
** M-0 Released
App Context Created 1
#*gST=1
App_SendStart(0)...
App Started...
WakeStart Done...
END Key Pressed
WakeClose ALL
App_Close (1) - RESUME
#*gCL=1
App_Cleanup(1)
** PARSER Released
Validating Heap...
------ App Heap Info ------
104 - PARSER #243 File: mem.cpp Line: 19 (L)
104 - PARSER #246 File: mem.cpp Line: 19 (L)
104 - PARSER #249 File: mem.cpp Line: 19 (L)
104 - PARSER #266 File: mem.cpp Line: 19 (L)
104 - PARSER #267 File: mem.cpp Line: 19 (L)
104 - PARSER #279 File: mem.cpp Line: 19 (L)
104 - PARSER #280 File: mem.cpp Line: 19 (L)
104 - PARSER #281 File: mem.cpp Line: 19 (L)
104 - PARSER #282 File: mem.cpp Line: 19 (L)
-------------------------
34010 Alloc - Total
0 OEM
33074 BREW
936 Apps
1418 Wasted
164572 Free - Total
156392 Largest
4420 Largest Non Seq.
8180 Total Non Seq.
-------------------------
** PARSER Unloading
App_Free(1)
App_Cleanup(1)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
#*gSU=16809984
#*gCL=16809984
WARNING: Timer Pending 004F9540
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)

here is the outbut of debug:
#*g*C=1000003:3
ISHELL_AppStart 1
WakeStart...
#*gSU=16809984
#*gCL=16809984
WARNING: App Callback Pending (00CBFC70)
WARNING: App Callback Pending (00CBFF7C)
WARNING: App Callback Pending (00CC01C4)
WARNING: App Callback Pending (00CBE8E4)
WARNING: App Callback Pending (00CBF654)
WARNING: App Callback Pending (00CBF814)
App_Cleanup(1008000)
** M-0 Released
App Context Created 1
#*gST=1
App_SendStart(0)...
App Started...
WakeStart Done...
END Key Pressed
WakeClose ALL
App_Close (1) - RESUME
#*gCL=1
App_Cleanup(1)
** PARSER Released
Validating Heap...
------ App Heap Info ------
104 - PARSER #243 File: mem.cpp Line: 19 (L)
104 - PARSER #246 File: mem.cpp Line: 19 (L)
104 - PARSER #249 File: mem.cpp Line: 19 (L)
104 - PARSER #266 File: mem.cpp Line: 19 (L)
104 - PARSER #267 File: mem.cpp Line: 19 (L)
104 - PARSER #279 File: mem.cpp Line: 19 (L)
104 - PARSER #280 File: mem.cpp Line: 19 (L)
104 - PARSER #281 File: mem.cpp Line: 19 (L)
104 - PARSER #282 File: mem.cpp Line: 19 (L)
-------------------------
34010 Alloc - Total
0 OEM
33074 BREW
936 Apps
1418 Wasted
164572 Free - Total
156392 Largest
4420 Largest Non Seq.
8180 Total Non Seq.
-------------------------
** PARSER Unloading
App_Free(1)
App_Cleanup(1)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
#*gSU=16809984
#*gCL=16809984
WARNING: Timer Pending 004F9540
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)

Quote:Originally posted by mickel
------ App Heap Info ------
104 - PARSER #243 File: mem.cpp Line: 19 (L)
104 - PARSER #246 File: mem.cpp Line: 19 (L)
104 - PARSER #249 File: mem.cpp Line: 19 (L)
104 - PARSER #266 File: mem.cpp Line: 19 (L)
104 - PARSER #267 File: mem.cpp Line: 19 (L)
104 - PARSER #279 File: mem.cpp Line: 19 (L)
104 - PARSER #280 File: mem.cpp Line: 19 (L)
104 - PARSER #281 File: mem.cpp Line: 19 (L)
104 - PARSER #282 File: mem.cpp Line: 19 (L)
-------------------------
That's the state of the app heap when your app exits. You are leaking 9 chunks of memory, each 104 bytes, and allocated on line 19 of mem.cpp.

Quote:Originally posted by mickel
------ App Heap Info ------
104 - PARSER #243 File: mem.cpp Line: 19 (L)
104 - PARSER #246 File: mem.cpp Line: 19 (L)
104 - PARSER #249 File: mem.cpp Line: 19 (L)
104 - PARSER #266 File: mem.cpp Line: 19 (L)
104 - PARSER #267 File: mem.cpp Line: 19 (L)
104 - PARSER #279 File: mem.cpp Line: 19 (L)
104 - PARSER #280 File: mem.cpp Line: 19 (L)
104 - PARSER #281 File: mem.cpp Line: 19 (L)
104 - PARSER #282 File: mem.cpp Line: 19 (L)
-------------------------
That's the state of the app heap when your app exits. You are leaking 9 chunks of memory, each 104 bytes, and allocated on line 19 of mem.cpp.

Right,you said is very right and i aslo notice it.
But i can not find the problem.The boundscheck tell me where is error, but i have freed the memory which the boundscheck tell me.

Right,you said is very right and i aslo notice it.
But i can not find the problem.The boundscheck tell me where is error, but i have freed the memory which the boundscheck tell me.

The leak is probably not happening while the app is exiting, that's just when you are being notified of it.
Without knowing anything about your code it is difficult to predict what is happening, but my guess would be that you have a utility function within mem.cpp that dynamically allocates memory, but that some or all of those allocations are not being freed properly during the normal execution of your program.
Are you perhaps re-using a pointer somewhere without checking to see if it has been freed?

The leak is probably not happening while the app is exiting, that's just when you are being notified of it.
Without knowing anything about your code it is difficult to predict what is happening, but my guess would be that you have a utility function within mem.cpp that dynamically allocates memory, but that some or all of those allocations are not being freed properly during the normal execution of your program.
Are you perhaps re-using a pointer somewhere without checking to see if it has been freed?

Originally posted by Mickel
Validating Heap...
------ App Heap Info ------
104 - PARSER #243 File: mem.cpp Line: 19 (L)
104 - PARSER #246 File: mem.cpp Line: 19 (L)
104 - PARSER #249 File: mem.cpp Line: 19 (L)
104 - PARSER #266 File: mem.cpp Line: 19 (L)
104 - PARSER #267 File: mem.cpp Line: 19 (L)
104 - PARSER #279 File: mem.cpp Line: 19 (L)
104 - PARSER #280 File: mem.cpp Line: 19 (L)
104 - PARSER #281 File: mem.cpp Line: 19 (L)
104 - PARSER #282 File: mem.cpp Line: 19 (L)
-------------------------
hi,
When i exit out of my app by pressing 'Esc' or 'Clr' then emulator shows that the "module has failed to free all memory". I want to find out the mem leaks in my app. I referred to a prev posting in the forums(shown above). But MY debug output shows as follows
Validating Heap...
------ Heap Info ------
199964 FREE
-------------------------
How to make MY debug output show the leaks as that shown in the cross posting above..

Originally posted by Mickel
Validating Heap...
------ App Heap Info ------
104 - PARSER #243 File: mem.cpp Line: 19 (L)
104 - PARSER #246 File: mem.cpp Line: 19 (L)
104 - PARSER #249 File: mem.cpp Line: 19 (L)
104 - PARSER #266 File: mem.cpp Line: 19 (L)
104 - PARSER #267 File: mem.cpp Line: 19 (L)
104 - PARSER #279 File: mem.cpp Line: 19 (L)
104 - PARSER #280 File: mem.cpp Line: 19 (L)
104 - PARSER #281 File: mem.cpp Line: 19 (L)
104 - PARSER #282 File: mem.cpp Line: 19 (L)
-------------------------
hi,
When i exit out of my app by pressing 'Esc' or 'Clr' then emulator shows that the "module has failed to free all memory". I want to find out the mem leaks in my app. I referred to a prev posting in the forums(shown above). But MY debug output shows as follows
Validating Heap...
------ Heap Info ------
199964 FREE
-------------------------
How to make MY debug output show the leaks as that shown in the cross posting above..

I guess, in the original post, the memory leak was reported by the emulator, mickel did not write any memory checking mechanism. Depending upon the complexity of your program, you can either do DBGPRINTF or dump the info into a file. If you are using C++, then overload new and delete at the global level not per class basis and in the overloaded new and delete methods trace the size of memory allocation and deallocation respectively. If your program does not leak memory then all allocation should be equal to deallocation.
Hope this helps.
regards
ruben

I guess, in the original post, the memory leak was reported by the emulator, mickel did not write any memory checking mechanism. Depending upon the complexity of your program, you can either do DBGPRINTF or dump the info into a file. If you are using C++, then overload new and delete at the global level not per class basis and in the overloaded new and delete methods trace the size of memory allocation and deallocation respectively. If your program does not leak memory then all allocation should be equal to deallocation.
Hope this helps.
regards
ruben

If you are using the MALLOC calls directly, then you can do a neat trick because MALLOC is defined as a macro. Write a malloc_helper(int size, char* filename, int line) that works like malloc should but also prints out using DBGPRINTF, but then:
#define MALLOC(s) malloc_helper(s, __FILE__, __LINE__)
And this way you'll get to see what is allocating memory right when it does it. Unfortunately, this trick doesn't work in wrapper functions because you'll just see that the wrapper is allocating memory, but what you really want is the function calling the wrapper.
But hopefully that will give you some ideas.
-Aaron

If you are using the MALLOC calls directly, then you can do a neat trick because MALLOC is defined as a macro. Write a malloc_helper(int size, char* filename, int line) that works like malloc should but also prints out using DBGPRINTF, but then:
#define MALLOC(s) malloc_helper(s, __FILE__, __LINE__)
And this way you'll get to see what is allocating memory right when it does it. Unfortunately, this trick doesn't work in wrapper functions because you'll just see that the wrapper is allocating memory, but what you really want is the function calling the wrapper.
But hopefully that will give you some ideas.
-Aaron

So.... did you find out where the leak was?
How did you fix it?
-V

So.... did you find out where the leak was?
How did you fix it?
-V

Yep.. Leak found and Fixed.
Used the View->Output Window in the Emulator which precisely pointed out the File, Line No. and the bytes leaked.

Yep.. Leak found and Fixed.
Used the View->Output Window in the Emulator which precisely pointed out the File, Line No. and the bytes leaked.

one other tip to mention. use the following format for your debug output
DBGPRINTF( "%s(%d) : MALLOC %ld bytes", file, line, s);
where
file == filename (e.g. __FILE__)
line == line number (e.g. __LINE__)
s = size of allocation
This format mimics the compiler output. As a result, you can simply double click on the lines in your debug output window and devstudio will automatically jump to the file and line where the allocation took place.

one other tip to mention. use the following format for your debug output
DBGPRINTF( "%s(%d) : MALLOC %ld bytes", file, line, s);
where
file == filename (e.g. __FILE__)
line == line number (e.g. __LINE__)
s = size of allocation
This format mimics the compiler output. As a result, you can simply double click on the lines in your debug output window and devstudio will automatically jump to the file and line where the allocation took place.

hi all,
I am new to this so,,
can any 1 give the helper function for the MALLOC function plz ..i am not able to get it right.. :(
regards

hi all,
I am new to this so,,
can any 1 give the helper function for the MALLOC function plz ..i am not able to get it right.. :(
regards

You can employ many sophisticated technique to trace memory leak and report the result. One quick and crude way would be
1. If you are using C++, write global version of overloaded new/delete functions. In your new/delete, allocate 4 bytes extra at the begining of the memory allocation, and you can put the requested size, and then move the memory pointer by 4 bytes and return the pointer.
2. Now, you can have two define macro say, APP_NEW and APP_DELETE which will be used throughout your code for any new/delete operation. In these macros, you call overloaded new/delete function, and do a DBGPRINTF with file, line and size information.
3. If you don't want to have DBGPRINTF function in your release version of your code, then you can have your own macro say APP_OUTPUT. In debug version APP_OUTPUT gets mapped to DBGPRINTF, and in release version it maps to nothing. Make sure you call APP_OUTPUT macro with double parenthesis, so that you don't have unused string in your release build.
ruben

You can employ many sophisticated technique to trace memory leak and report the result. One quick and crude way would be
1. If you are using C++, write global version of overloaded new/delete functions. In your new/delete, allocate 4 bytes extra at the begining of the memory allocation, and you can put the requested size, and then move the memory pointer by 4 bytes and return the pointer.
2. Now, you can have two define macro say, APP_NEW and APP_DELETE which will be used throughout your code for any new/delete operation. In these macros, you call overloaded new/delete function, and do a DBGPRINTF with file, line and size information.
3. If you don't want to have DBGPRINTF function in your release version of your code, then you can have your own macro say APP_OUTPUT. In debug version APP_OUTPUT gets mapped to DBGPRINTF, and in release version it maps to nothing. Make sure you call APP_OUTPUT macro with double parenthesis, so that you don't have unused string in your release build.
ruben

ruben wrote:I guess, in the original post, the memory leak was reported by the emulator, mickel did not write any memory checking mechanism. Depending upon the complexity of your program, you can either do DBGPRINTF or dump the info into a file. If you are using C++, then overload new and delete at the global level not per class basis and in the overloaded new and delete methods trace the size of memory allocation and deallocation respectively. If your program does not leak memory then all allocation should be equal to deallocation.
Hope this helps.
regards
ruben
We too get the error "Module failed to free all memory"
The debug window has these lines
8 - GLMSTEST #514 File: ecrioplatformdriverstring.cpp Line: 32 (L)
4 - GLMSTEST #516 File: ecrioplatformdrivermemory.cpp Line: 46 (L)
684 - GLMSTEST #403 File: ecrioplatformdriverhttpcomm.cpp Line: 157 (L)
500 - GLMSTEST #424 File: ecrioplatformdrivermemory.cpp Line: 46 (L)
We checked with the program, these are the lines where MALLOC function is called
later we have called free metho for the memory allocated, still the error occurs
Any help?

ruben wrote:I guess, in the original post, the memory leak was reported by the emulator, mickel did not write any memory checking mechanism. Depending upon the complexity of your program, you can either do DBGPRINTF or dump the info into a file. If you are using C++, then overload new and delete at the global level not per class basis and in the overloaded new and delete methods trace the size of memory allocation and deallocation respectively. If your program does not leak memory then all allocation should be equal to deallocation.
Hope this helps.
regards
ruben
We too get the error "Module failed to free all memory"
The debug window has these lines
8 - GLMSTEST #514 File: ecrioplatformdriverstring.cpp Line: 32 (L)
4 - GLMSTEST #516 File: ecrioplatformdrivermemory.cpp Line: 46 (L)
684 - GLMSTEST #403 File: ecrioplatformdriverhttpcomm.cpp Line: 157 (L)
500 - GLMSTEST #424 File: ecrioplatformdrivermemory.cpp Line: 46 (L)
We checked with the program, these are the lines where MALLOC function is called
later we have called free metho for the memory allocated, still the error occurs
Any help?

probably you are calling the same lines (functions) more than once, and not freeing the data before calling malloc again. (aka memory leak)
-Tyndal

probably you are calling the same lines (functions) more than once, and not freeing the data before calling malloc again. (aka memory leak)
-Tyndal

tyndal wrote:probably you are calling the same lines (functions) more than once, and not freeing the data before calling malloc again. (aka memory leak)
-Tyndal
Yes
But we are calling the MALLOC function to allocate memory for different struct members. Not for the same variable
The allocation and deallocation goes like this:
We have two methods - allocate and free memory
For all struct members, we call the allocate method and finally in FreeAPpData, we call free memory
what is the issue here?

tyndal wrote:probably you are calling the same lines (functions) more than once, and not freeing the data before calling malloc again. (aka memory leak)
-Tyndal
Yes
But we are calling the MALLOC function to allocate memory for different struct members. Not for the same variable
The allocation and deallocation goes like this:
We have two methods - allocate and free memory
For all struct members, we call the allocate method and finally in FreeAPpData, we call free memory
what is the issue here?

theres only two possibilties i can think of
mallocing twice and losing the data pointer from the first
not freeing the memory verifiy the free handler is being called.
just set a breakpoint in the debugger on the free and make sure its
being called or use a DBGPRINTF

theres only two possibilties i can think of
mallocing twice and losing the data pointer from the first
not freeing the memory verifiy the free handler is being called.
just set a breakpoint in the debugger on the free and make sure its
being called or use a DBGPRINTF

Hi all,
I seem to be struggling with overloading new and delete to output the __LINE__ and __FILE__ info to track memory leaks.
I have 2 files:
AppStd.h
#ifndef APPSTD_H_
#define APPSTD_H_
#include "AEEStdLib.h"
#define MEMDBG
#ifdef AEE_SIMULATOR
# define ARG_TYPE_FOR_NEW unsigned int
#else
# define ARG_TYPE_FOR_NEW long unsigned int
#endif
#ifdef MEMDBG
void* operator new( ARG_TYPE_FOR_NEW size, const char* file, int line );
void operator delete( void * ptr );
void* operator new[](ARG_TYPE_FOR_NEW sz, const char* file, int line );
void operator delete[](void *p);
# define new(s) new(s, __FILE__, __LINE__)
#else
void *operator new( ARG_TYPE_FOR_NEW size);
void operator delete( void * ptr );
void* operator new[](ARG_TYPE_FOR_NEW sz);
void operator delete[](void *p);
#endif
#endif
and AppStd.cpp
#include "AEEStdLib.h"
#include "AppStd.h"
#ifdef MEMDBG
void* operator new( ARG_TYPE_FOR_NEW size , const char* file, int line)
{
return MALLOC( size );

void operator delete( void * ptr )
{
FREE( ptr );

void* operator new[](ARG_TYPE_FOR_NEW size, const char* file, int line)
{
return MALLOC(size);

void operator delete[](void *p)
{
FREE(p);

#else
void* operator new( ARG_TYPE_FOR_NEW size)
{
return MALLOC( size );

void operator delete( void * ptr )
{
FREE( ptr );

void* operator new[](ARG_TYPE_FOR_NEW size)
{
return MALLOC(size);

void operator delete[](void *p)
{
FREE(p);

#endif
Il looks to me like it should work but I keep getting the error messages:
"syntax error : 'string'"
"too many actual parameters for macro 'new'"
FOR THIS LINE - void* operator new( ARG_TYPE_FOR_NEW size , const char* file, int line)
What am I doing wrong ?

Hi all,
I seem to be struggling with overloading new and delete to output the __LINE__ and __FILE__ info to track memory leaks.
I have 2 files:
AppStd.h
#ifndef APPSTD_H_
#define APPSTD_H_
#include "AEEStdLib.h"
#define MEMDBG
#ifdef AEE_SIMULATOR
# define ARG_TYPE_FOR_NEW unsigned int
#else
# define ARG_TYPE_FOR_NEW long unsigned int
#endif
#ifdef MEMDBG
void* operator new( ARG_TYPE_FOR_NEW size, const char* file, int line );
void operator delete( void * ptr );
void* operator new[](ARG_TYPE_FOR_NEW sz, const char* file, int line );
void operator delete[](void *p);
# define new(s) new(s, __FILE__, __LINE__)
#else
void *operator new( ARG_TYPE_FOR_NEW size);
void operator delete( void * ptr );
void* operator new[](ARG_TYPE_FOR_NEW sz);
void operator delete[](void *p);
#endif
#endif
and AppStd.cpp
#include "AEEStdLib.h"
#include "AppStd.h"
#ifdef MEMDBG
void* operator new( ARG_TYPE_FOR_NEW size , const char* file, int line)
{
return MALLOC( size );

void operator delete( void * ptr )
{
FREE( ptr );

void* operator new[](ARG_TYPE_FOR_NEW size, const char* file, int line)
{
return MALLOC(size);

void operator delete[](void *p)
{
FREE(p);

#else
void* operator new( ARG_TYPE_FOR_NEW size)
{
return MALLOC( size );

void operator delete( void * ptr )
{
FREE( ptr );

void* operator new[](ARG_TYPE_FOR_NEW size)
{
return MALLOC(size);

void operator delete[](void *p)
{
FREE(p);

#endif
Il looks to me like it should work but I keep getting the error messages:
"syntax error : 'string'"
"too many actual parameters for macro 'new'"
FOR THIS LINE - void* operator new( ARG_TYPE_FOR_NEW size , const char* file, int line)
What am I doing wrong ?

#define is a preprocessor command, so look at what you are doing with
it for new, rename the target to something else

#define is a preprocessor command, so look at what you are doing with
it for new, rename the target to something else

What i thing for avoid any type of memory leak to use NULL check constrains.
means when you going to allocate memory check before that its is NULL or not if not NULL don't allocate and vice versa.
:)

What i thing for avoid any type of memory leak to use NULL check constrains.
means when you going to allocate memory check before that its is NULL or not if not NULL don't allocate and vice versa.
:)

I also suffer from same problem.Output is:
#*p:ECode:101, Key:e030
#*p:ECode:100, Key:e030
EVT_KEY
#*gXX=Current
CloseApplet - 1073742079
WakeClose 400000ff
App_Close (400000ff) - RESUME
#*gCL=1073742079
DBGEvent=0x1 cls=0x400000FF pl=0x0
WARNING: App Callback Pending (00FB2D5C)
WARNING: App Callback Pending (00FB35C0)
Preload - Found (sdk_mif/intladdrbook.mif)
App_Cleanup(400000ff)
** INTLADDRBOOK Released
Validating Heap...
------ App Heap Info ------
44 - INTLADDRBOOK #391 File: AEEBitFont.c Line: 113 (L)
44 - INTLADDRBOOK #393 File: AEEBitFont.c Line: 113 (L)
112 - INTLADDRBOOK #381 File: AEEDisp.c Line: 890 (L)
120 - INTLADDRBOOK #382 File: OEMBitmap_generic.h Line: 186 (L)
44 - INTLADDRBOOK #395 File: AEEBitFont.c Line: 113 (L)
20 - INTLADDRBOOK #1245 File: OEMBitmap_generic.h Line: 657 (L)
252 - INTLADDRBOOK #390 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #392 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #394 File: AEEBitFont.c Line: 113 (L)
76 - INTLADDRBOOK #1065 File: OEMBitmap_generic.h Line: 657 (L)
265 - INTLADDRBOOK #1049 File: AEEPNGViewer.c Line: 639 (L)
44 - INTLADDRBOOK #1060 File: AEEPNGViewer.c Line: 1136 (L)
-------------------------
21602 Alloc - Total
0 OEM
20077 BREW
1525 Apps
1866 Wasted
3476532 Free - Total
3458032 Largest
7984 Largest Non Seq.
18500 Total Non Seq.
-------------------------
** INTLADDRBOOK Unloading
App_Free(400000ff)
App_Cleanup(400000ff)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
DBGEvent=0x0 cls=0x1008000 pl=0x0
App Started...
WakeResume Done
#*gSU=16809984
DBGEvent=0x2 cls=0x1008000 pl=0x0
#*gCL=16809984
DBGEvent=0x1 cls=0x1008000 pl=0x0
WARNING: Timer Pending 0051E918
WARNING: App Callback Pending (00FB2A30)
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*p:ECode:102, Key:e030
Can anyone help me to find solution.

I also suffer from same problem.Output is:
#*p:ECode:101, Key:e030
#*p:ECode:100, Key:e030
EVT_KEY
#*gXX=Current
CloseApplet - 1073742079
WakeClose 400000ff
App_Close (400000ff) - RESUME
#*gCL=1073742079
DBGEvent=0x1 cls=0x400000FF pl=0x0
WARNING: App Callback Pending (00FB2D5C)
WARNING: App Callback Pending (00FB35C0)
Preload - Found (sdk_mif/intladdrbook.mif)
App_Cleanup(400000ff)
** INTLADDRBOOK Released
Validating Heap...
------ App Heap Info ------
44 - INTLADDRBOOK #391 File: AEEBitFont.c Line: 113 (L)
44 - INTLADDRBOOK #393 File: AEEBitFont.c Line: 113 (L)
112 - INTLADDRBOOK #381 File: AEEDisp.c Line: 890 (L)
120 - INTLADDRBOOK #382 File: OEMBitmap_generic.h Line: 186 (L)
44 - INTLADDRBOOK #395 File: AEEBitFont.c Line: 113 (L)
20 - INTLADDRBOOK #1245 File: OEMBitmap_generic.h Line: 657 (L)
252 - INTLADDRBOOK #390 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #392 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #394 File: AEEBitFont.c Line: 113 (L)
76 - INTLADDRBOOK #1065 File: OEMBitmap_generic.h Line: 657 (L)
265 - INTLADDRBOOK #1049 File: AEEPNGViewer.c Line: 639 (L)
44 - INTLADDRBOOK #1060 File: AEEPNGViewer.c Line: 1136 (L)
-------------------------
21602 Alloc - Total
0 OEM
20077 BREW
1525 Apps
1866 Wasted
3476532 Free - Total
3458032 Largest
7984 Largest Non Seq.
18500 Total Non Seq.
-------------------------
** INTLADDRBOOK Unloading
App_Free(400000ff)
App_Cleanup(400000ff)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
DBGEvent=0x0 cls=0x1008000 pl=0x0
App Started...
WakeResume Done
#*gSU=16809984
DBGEvent=0x2 cls=0x1008000 pl=0x0
#*gCL=16809984
DBGEvent=0x1 cls=0x1008000 pl=0x0
WARNING: Timer Pending 0051E918
WARNING: App Callback Pending (00FB2A30)
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*p:ECode:102, Key:e030
Can anyone help me to find solution.

Hi
I have same memory problem i.e. module fail to free all memory .Output is as:
#*p:ECode:101, Key:e030
#*p:ECode:100, Key:e030
EVT_KEY
#*gXX=Current
CloseApplet - 1073742079
WakeClose 400000ff
App_Close (400000ff) - RESUME
#*gCL=1073742079
DBGEvent=0x1 cls=0x400000FF pl=0x0
WARNING: App Callback Pending (00FB2D5C)
WARNING: App Callback Pending (00FB35C0)
Preload - Found (sdk_mif/intladdrbook.mif)
App_Cleanup(400000ff)
** INTLADDRBOOK Released
Validating Heap...
------ App Heap Info ------
44 - INTLADDRBOOK #391 File: AEEBitFont.c Line: 113 (L)
44 - INTLADDRBOOK #393 File: AEEBitFont.c Line: 113 (L)
112 - INTLADDRBOOK #381 File: AEEDisp.c Line: 890 (L)
120 - INTLADDRBOOK #382 File: OEMBitmap_generic.h Line: 186 (L)
44 - INTLADDRBOOK #395 File: AEEBitFont.c Line: 113 (L)
20 - INTLADDRBOOK #1245 File: OEMBitmap_generic.h Line: 657 (L)
252 - INTLADDRBOOK #390 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #392 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #394 File: AEEBitFont.c Line: 113 (L)
76 - INTLADDRBOOK #1065 File: OEMBitmap_generic.h Line: 657 (L)
265 - INTLADDRBOOK #1049 File: AEEPNGViewer.c Line: 639 (L)
44 - INTLADDRBOOK #1060 File: AEEPNGViewer.c Line: 1136 (L)
-------------------------
21602 Alloc - Total
0 OEM
20077 BREW
1525 Apps
1866 Wasted
3476532 Free - Total
3458032 Largest
7984 Largest Non Seq.
18500 Total Non Seq.
-------------------------
** INTLADDRBOOK Unloading
App_Free(400000ff)
App_Cleanup(400000ff)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
DBGEvent=0x0 cls=0x1008000 pl=0x0
App Started...
WakeResume Done
#*gSU=16809984
DBGEvent=0x2 cls=0x1008000 pl=0x0
#*gCL=16809984
DBGEvent=0x1 cls=0x1008000 pl=0x0
WARNING: Timer Pending 0051E918
WARNING: App Callback Pending (00FB2A30)
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*p:ECode:102, Key:e030
Can anyone help me to solve problem.

Hi
I have same memory problem i.e. module fail to free all memory .Output is as:
#*p:ECode:101, Key:e030
#*p:ECode:100, Key:e030
EVT_KEY
#*gXX=Current
CloseApplet - 1073742079
WakeClose 400000ff
App_Close (400000ff) - RESUME
#*gCL=1073742079
DBGEvent=0x1 cls=0x400000FF pl=0x0
WARNING: App Callback Pending (00FB2D5C)
WARNING: App Callback Pending (00FB35C0)
Preload - Found (sdk_mif/intladdrbook.mif)
App_Cleanup(400000ff)
** INTLADDRBOOK Released
Validating Heap...
------ App Heap Info ------
44 - INTLADDRBOOK #391 File: AEEBitFont.c Line: 113 (L)
44 - INTLADDRBOOK #393 File: AEEBitFont.c Line: 113 (L)
112 - INTLADDRBOOK #381 File: AEEDisp.c Line: 890 (L)
120 - INTLADDRBOOK #382 File: OEMBitmap_generic.h Line: 186 (L)
44 - INTLADDRBOOK #395 File: AEEBitFont.c Line: 113 (L)
20 - INTLADDRBOOK #1245 File: OEMBitmap_generic.h Line: 657 (L)
252 - INTLADDRBOOK #390 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #392 File: AEEBitFont.c Line: 113 (L)
252 - INTLADDRBOOK #394 File: AEEBitFont.c Line: 113 (L)
76 - INTLADDRBOOK #1065 File: OEMBitmap_generic.h Line: 657 (L)
265 - INTLADDRBOOK #1049 File: AEEPNGViewer.c Line: 639 (L)
44 - INTLADDRBOOK #1060 File: AEEPNGViewer.c Line: 1136 (L)
-------------------------
21602 Alloc - Total
0 OEM
20077 BREW
1525 Apps
1866 Wasted
3476532 Free - Total
3458032 Largest
7984 Largest Non Seq.
18500 Total Non Seq.
-------------------------
** INTLADDRBOOK Unloading
App_Free(400000ff)
App_Cleanup(400000ff)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
DBGEvent=0x0 cls=0x1008000 pl=0x0
App Started...
WakeResume Done
#*gSU=16809984
DBGEvent=0x2 cls=0x1008000 pl=0x0
#*gCL=16809984
DBGEvent=0x1 cls=0x1008000 pl=0x0
WARNING: Timer Pending 0051E918
WARNING: App Callback Pending (00FB2A30)
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*p:ECode:102, Key:e030
Can anyone help me to solve problem.

I *think* you have some Images that you havnt released.

I *think* you have some Images that you havnt released.

Can anyone help me out in figuring where should I start the debuggin to release the memory.
( None of the files that are mentioned under the sub-heading "validating heap" belongs to my project... )
_______________________________________________________
END Key Pressed
WakeClose ALL
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
END Key Pressed
END Key Pressed
ISHELL_AppStart 286331153
WakeStart...
#*gSU=16809984
#*gCL=16809984
WARNING: App Callback Pending (0108E1BC)
App_Cleanup(1008000)
** M-0 Released
App Context Created 286331153
#*gST=286331153
App_SendStart(0)...
App Started...
WakeStart Done...
END Key Pressed
WakeClose ALL
App_Close (11111111) - RESUME
#*gCL=286331153
WARNING: App Callback Pending (0108C254)
App_Cleanup(11111111)
WARNING: SysObj (0108B0FC) File: AEEDisp.c Line: 431
** TARRIFF_CARD Released
Validating Heap...
------ App Heap Info ------
48 - TARRIFF_CARD #2725 File: oemitextctl.c Line: 2035 (L)
96 - TARRIFF_CARD #2687 File: oemitextctl.c Line: 236 (L)
60 - TARRIFF_CARD #2727 MENU (L)
524 - TARRIFF_CARD #2694 SHELL (L)
100 - TARRIFF_CARD #2704 SHELL (L)
40 - TARRIFF_CARD #2713 File: oemitextctl.c Line: 963 (L)
100 - TARRIFF_CARD #2728 SHELL (L)
2248 - TARRIFF_CARD #2707 File: OEMBitmap_generic.h Line: 115 (L)
2248 - TARRIFF_CARD #2731 File: OEMBitmap_generic.h Line: 115 (L)
100 - TARRIFF_CARD #2741 SHELL (L)
100 - TARRIFF_CARD #2745 SHELL (L)
2240 - TARRIFF_CARD #2744 File: OEMBitmap_generic.h Line: 115 (L)
2248 - TARRIFF_CARD #2748 File: OEMBitmap_generic.h Line: 115 (L)
-------------------------
43705 Alloc - Total
0 OEM
33553 BREW
10152 Apps
2635 Wasted
153652 Free - Total
151236 Largest
940 Largest Non Seq.
2416 Total Non Seq.
-------------------------
** TARRIFF_CARD Unloading
App_Free(11111111)
App_Cleanup(11111111)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
#*gSU=16809984
#*gCL=16809984
WARNING: Timer Pending 004F955C
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*gSU=0
App_Cleanup(0)
#*gSU=0
App_Cleanup(0)
END Key Pressed
WakeClose ALL
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done

Can anyone help me out in figuring where should I start the debuggin to release the memory.
( None of the files that are mentioned under the sub-heading "validating heap" belongs to my project... )
_______________________________________________________
END Key Pressed
WakeClose ALL
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
END Key Pressed
END Key Pressed
ISHELL_AppStart 286331153
WakeStart...
#*gSU=16809984
#*gCL=16809984
WARNING: App Callback Pending (0108E1BC)
App_Cleanup(1008000)
** M-0 Released
App Context Created 286331153
#*gST=286331153
App_SendStart(0)...
App Started...
WakeStart Done...
END Key Pressed
WakeClose ALL
App_Close (11111111) - RESUME
#*gCL=286331153
WARNING: App Callback Pending (0108C254)
App_Cleanup(11111111)
WARNING: SysObj (0108B0FC) File: AEEDisp.c Line: 431
** TARRIFF_CARD Released
Validating Heap...
------ App Heap Info ------
48 - TARRIFF_CARD #2725 File: oemitextctl.c Line: 2035 (L)
96 - TARRIFF_CARD #2687 File: oemitextctl.c Line: 236 (L)
60 - TARRIFF_CARD #2727 MENU (L)
524 - TARRIFF_CARD #2694 SHELL (L)
100 - TARRIFF_CARD #2704 SHELL (L)
40 - TARRIFF_CARD #2713 File: oemitextctl.c Line: 963 (L)
100 - TARRIFF_CARD #2728 SHELL (L)
2248 - TARRIFF_CARD #2707 File: OEMBitmap_generic.h Line: 115 (L)
2248 - TARRIFF_CARD #2731 File: OEMBitmap_generic.h Line: 115 (L)
100 - TARRIFF_CARD #2741 SHELL (L)
100 - TARRIFF_CARD #2745 SHELL (L)
2240 - TARRIFF_CARD #2744 File: OEMBitmap_generic.h Line: 115 (L)
2248 - TARRIFF_CARD #2748 File: OEMBitmap_generic.h Line: 115 (L)
-------------------------
43705 Alloc - Total
0 OEM
33553 BREW
10152 Apps
2635 Wasted
153652 Free - Total
151236 Largest
940 Largest Non Seq.
2416 Total Non Seq.
-------------------------
** TARRIFF_CARD Unloading
App_Free(11111111)
App_Cleanup(11111111)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done
#*gSU=16809984
#*gCL=16809984
WARNING: Timer Pending 004F955C
App_Cleanup(1008000)
** M-0 Released
#*gSU=0
App_Cleanup(0)
#*gSU=0
App_Cleanup(0)
#*gSU=0
App_Cleanup(0)
END Key Pressed
WakeClose ALL
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - NO RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
App_Close (0) - RESUME
App_Cleanup(0)
App_Free(0)
App_Cleanup(0)
WakeResume
#*gRE=16809984
Restart App
App_SendStart(0)...
App Started...
WakeResume Done

anoopbal wrote:Can anyone help me out in figuring where should I start the debuggin to release the memory.
( None of the files that are mentioned under the sub-heading "validating heap" belongs to my project... )
Often, when the memory leak is in one of BREW's source files, it's because an interface didn't get released. For instance, the following is a device compatible bitmap:
Quote:
2248 - TARRIFF_CARD #2748 File: OEMBitmap_generic.h Line: 115 (L)
Somehow this object got addrefed at least one more time than it was released. So it may be as simple as a missing IBITMAP_Release() in your code. Alternatively, you could be leaking another object that is holding a reference to that bitmap.

anoopbal wrote:Can anyone help me out in figuring where should I start the debuggin to release the memory.
( None of the files that are mentioned under the sub-heading "validating heap" belongs to my project... )
Often, when the memory leak is in one of BREW's source files, it's because an interface didn't get released. For instance, the following is a device compatible bitmap:
Quote:
2248 - TARRIFF_CARD #2748 File: OEMBitmap_generic.h Line: 115 (L)
Somehow this object got addrefed at least one more time than it was released. So it may be as simple as a missing IBITMAP_Release() in your code. Alternatively, you could be leaking another object that is holding a reference to that bitmap.

But idnt use IBitmap interface in my poject and where ever i need to display images i am using the Image interface, which i am relesing at the later part of the app.

But idnt use IBitmap interface in my poject and where ever i need to display images i am using the Image interface, which i am relesing at the later part of the app.

sounds like an IMENU leak

sounds like an IMENU leak