> 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.
I might not be doing this correctly, but __global_destructor_chain is 0. I
looked up PalmOS_GlobalDestructors.c in Palm OS Support/CodeWarrior
Libraries/Source Code/StartupCode/Src/
in my own debug.cp, I added:
#include <NMWException.h>
extern DestructorChain* __global_destructor_chain;
void __debug_destroy_global_chain( void )
{
DestructorChain* gdc;
while((gdc=__global_destructor_chain)!=0L)
{
char buf[256];
StrPrintF( buf, "%x, %x, %x", gdc->destructor, gdc->object,
gdc->next );
DbgMessage( buf );
__global_destructor_chain=gdc->next;
}
}
I then call this function at the start of my AppStop(). When I step into it,
__global_destructor_chain is 0.
I am a bit sleep deprived. Perhaps I have missed something obvious?
thanks,
steve
--
----------------------------------------------------
steve orens http://www.orens.com
[EMAIL PROTECTED]
----------------------------------------------------
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/