At 05:21 PM 8/23/2004, you wrote:
I am using CW 9.3.

The vtable is valid. I know this because to demonstrate this problem, we
launch the app and the click the home screen button once the About form is
displayed. If instead of clicking the home screen button, I click the OK
button on the form and go to the next screen, I can see the AboutForm
destructor get called followed by its parent class destructor.

The illegal opcode (and my suspicion of an invalid vtable) only happens when
we're quitting.

An older version of the CW runtime library would delete the expanded data section (including vtables) before running the destructor chain. However, in the 9.3 version, destructors are called immediately after PilotMain returns, so this isn't the problem.


It could be that the global data structure that holds the addresses of destructors and other shutdown routines has been corrupted. This is just a linked list of nodes, each with a function pointer and a parameter. You might want to clone the code in __destroy_global_chain in PalmOS_GlobalDestructors.cpp to dump out the list, and call that at different points in your program to see if you're getting valid addresses.


-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to