error on closing emulator | developer.brewmp.com error on closing emulator | developer.brewmp.com

Developer

error on closing emulator

Hi

when i close my emulater while my form is open i see the following message
"BREW_Emulator.exe has triggered a breakpoint".Any idea?............Thanks

Is this problem still there? If yes, can you give more info? (Like compiler you're using (VC 6.0), what kind of form, any other msg useful from the Compiler's output window or BREW's Simulator Output window)
-empeegee

Is this problem still there? If yes, can you give more info? (Like compiler you're using (VC 6.0), what kind of form, any other msg useful from the Compiler's output window or BREW's Simulator Output window)
-empeegee

yes I am still facing the problem. I am using .Net 2005 for developmet and this message comes when i close emulater by click x.Here is some information form the output window of .net compiler which might be usfull.
** WIDGETS Released
** TCMAIL Released
** FORMS Released
** WIDGETS Unloading
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW UI Widgets\1.2.3\widgets\widgets.dll'
** TCMAIL Unloading
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW UI Widgets\1.2.3\tcmail\tcmail.dll'
** FORMS Unloading
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW UI Widgets\1.2.3\forms\forms.dll'
App_Close (98765432) - NO RESUME
App_Cleanup(98765432)
App_Free(98765432)
App_Cleanup(98765432)
App_Cleanup(1008000)
App_Close (1008000) - NO RESUME
App_Cleanup(1008000)
** Return to OEM
AEE_Resume
App_Free(1008000)
App_Cleanup(1008000)
SetConfig-> Default Network
Validating Heap...
*** ERROR - Free memory (00CD0548 - 00CD055C) corrupted ***
184 FREE
BREW_Emulator.exe has triggered a breakpoint
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW SDK v2.1.0\Bin\Modules\JPEGViewerStaticExt.dll'
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW SDK v2.1.0\Bin\Modules\I3DExtension.dll'
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW SDK v2.1.0\Bin\BREW_Tones.dll'
The thread 'Win32 Thread' (0xf5c) has exited with code 0 (0x0).
The program '[632] BREW_Emulator.exe: Native' has exited with code 0 (0x0).

yes I am still facing the problem. I am using .Net 2005 for developmet and this message comes when i close emulater by click x.Here is some information form the output window of .net compiler which might be usfull.
** WIDGETS Released
** TCMAIL Released
** FORMS Released
** WIDGETS Unloading
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW UI Widgets\1.2.3\widgets\widgets.dll'
** TCMAIL Unloading
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW UI Widgets\1.2.3\tcmail\tcmail.dll'
** FORMS Unloading
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW UI Widgets\1.2.3\forms\forms.dll'
App_Close (98765432) - NO RESUME
App_Cleanup(98765432)
App_Free(98765432)
App_Cleanup(98765432)
App_Cleanup(1008000)
App_Close (1008000) - NO RESUME
App_Cleanup(1008000)
** Return to OEM
AEE_Resume
App_Free(1008000)
App_Cleanup(1008000)
SetConfig-> Default Network
Validating Heap...
*** ERROR - Free memory (00CD0548 - 00CD055C) corrupted ***
184 FREE
BREW_Emulator.exe has triggered a breakpoint
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW SDK v2.1.0\Bin\Modules\JPEGViewerStaticExt.dll'
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW SDK v2.1.0\Bin\Modules\I3DExtension.dll'
'BREW_Emulator.exe': Unloaded 'C:\Program Files\BREW SDK v2.1.0\Bin\BREW_Tones.dll'
The thread 'Win32 Thread' (0xf5c) has exited with code 0 (0x0).
The program '[632] BREW_Emulator.exe: Native' has exited with code 0 (0x0).

some of the pointer data might have been corrupted. Try running it in the debugmode may be you will get the solution..

some of the pointer data might have been corrupted. Try running it in the debugmode may be you will get the solution..

I have found the pointer variable on which output window shows the following message
ERROR - Free memory (00CD0548 - 00CD055C) corrupted ***
It is a pointer to structure in my application and i am releasing all the memory of this pointer as well as the memory of all variables in this struct.But i am unable to detect any memory leak.
Following is the line, on which it comes after the exception
HANDLERDESC_Free(&pMe->handleMenuForm);
Strange thing is emulator closes perfectly when i press End key but it gives exception when I press X button on the right upper corner of the emulator.

I have found the pointer variable on which output window shows the following message
ERROR - Free memory (00CD0548 - 00CD055C) corrupted ***
It is a pointer to structure in my application and i am releasing all the memory of this pointer as well as the memory of all variables in this struct.But i am unable to detect any memory leak.
Following is the line, on which it comes after the exception
HANDLERDESC_Free(&pMe->handleMenuForm);
Strange thing is emulator closes perfectly when i press End key but it gives exception when I press X button on the right upper corner of the emulator.

Hello Pooja
I think the line
HANDLERDESC_Free(&pMe->handleMenuForm);
is at your release/dtor method
just try adding
IHANDLER_SetHandler((IHandler*)pMe->pForm,&pMe->handler);
just above the
HANDLERDESC_Free() line
it will deregister your handler function from the form
make sure that your handler desc and the form are the same which you have used already for registering the handler.
I am not sure about it. But just give it a try It might help.
Please let me know its feedback

Hello Pooja
I think the line
HANDLERDESC_Free(&pMe->handleMenuForm);
is at your release/dtor method
just try adding
IHANDLER_SetHandler((IHandler*)pMe->pForm,&pMe->handler);
just above the
HANDLERDESC_Free() line
it will deregister your handler function from the form
make sure that your handler desc and the form are the same which you have used already for registering the handler.
I am not sure about it. But just give it a try It might help.
Please let me know its feedback

Thank you very much Lalit for your reply .
Problem is solved now. Actually I was unregistering the HandlerDesc which i did not register . so i just removed this HandlerDesc and it is working fine. :)

Thank you very much Lalit for your reply .
Problem is solved now. Actually I was unregistering the HandlerDesc which i did not register . so i just removed this HandlerDesc and it is working fine. :)