Hi there, I've got a problem with a C++ project under CodeWarrior 9.3. After application exit, I receive the error message "Invalid chunk ptr" on the Palm Simulator, and on a real device (Sony Clié TJ35), the application crashes immediately after launch.
I tried to debug the application and therefore I traced the destructor methods which free and unlock bitmap resources and delete dynamically created objects. Unfortunately, the error is not raised by one of the methods I wrote; instead it is raised after PilotMain is left. I provide an excpert of the assembly debug stuff and I mark the opcode "which raises" the error. Does anybody have a clue, how to find the real cause of the problem? Thanks in advance! Thomas 01252B5C: 4EBABDE8 jsr PilotMain (0x124e946) ; 0x0124e946 01252B60: 2A00 move.l d0,d5 01252B62: 4A03 tst.b d3 01252B64: 504F addq.w #8,a7 01252B66: 6704 beq.s __Startup__+0x79a4 (0x1252b6c); 0x01252b6c 01252B68: 4EBAFE46 jsr __destroy_global_chain+0x77e8 (0x12529b0); 0x012529b0 01252B6C: 4A03 tst.b d3 01252B6E: 6710 beq.s __Startup__+0x79b8 (0x1252b80); 0x01252b80 01252B70: 206EFFFC movea.l -4(a6),a0 01252B74: 2F28000C move.l 12(a0),-(a7) 01252B78: 4227 clr.b -(a7) 01252B7A: 4EBA0166 jsr MTWK::__LoadAndRelocate__(unsigned char,_opaque*)+0x7b1a (0x1252ce2); 0x01252ce2 01252B7E: 5C4F addq.w #6,a7 01252B80: 2F2EFFB6 move.l -74(a6),-(a7) 01252B84: 2F2EFFB2 move.l -78(a6),-(a7) 01252B88: 2F2EFFFC move.l -4(a6),-(a7) 01252B8C: 4E4F trap #15 01252B8E: A090 sysTrapSysAppExit 01252B90: 2005 move.l d5,d0 01252B92: 4FEF000C lea 12(a7),a7 01252B96: 4CDF0038 movem.l (a7)+,d3-d5 ______________________________________________ 01252B9A: 4E5E unlk a6 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 01252B9C: 4E75 rts 01252B9E: 4572 dc.w 0x4572 ; Invalid opcode 01252BA0: 726F moveq #111,d1 01252BA2: 7220 moveq #32,d1 01252BA4: 6C61 bge.s MTWK::__SkipToXREFs__(signed char*)+0x7a3f (0x1252c07); 0x01252c07 01252BA6: 756E dc.w 0x756e ; Invalid opcode 01252BA8: 6368 bls.s MTWK::__SkipToXREFs__(signed char*)+0x7a4a (0x1252c12); 0x01252c12 01252BAA: 696E bvs.s MTWK::__SkipToXREFs__(signed char*)+0x7a52 (0x1252c1a); 0x01252c1a 01252BAC: 6720 beq.s __PreInit__+0x7a06 (0x1252bce); 0x01252bce 01252BAE: 6170 bsr.s MTWK::__SkipToXREFs__(signed char*)+0x7a58 (0x1252c20); 0x01252c20 01252BB0: 706C moveq #108,d0 01252BB2: 6963 bvs.s MTWK::__SkipToXREFs__(signed char*)+0x7a4f (0x1252c17); 0x01252c17 01252BB4: 6174 bsr.s MTWK::__SkipToXREFs__(signed char*)+0x7a62 (0x1252c2a); 0x01252c2a 01252BB6: 696F bvs.s MTWK::__SkipToXREFs__(signed char*)+0x7a5f (0x1252c27); 0x01252c27 01252BB8: 6E005061 bgt.w *+20579 ; 0x01257c1b 01252BBC: 6C6D bge.s MTWK::__SkipToXREFs__(signed char*)+0x7a63 (0x1252c2b); 0x01252c2b 01252BBE: 4F53 dc.w 0x4f53 ; Invalid opcode 01252BC0: 5F53 subq.w #7,(a3) 01252BC2: 7461 moveq #97,d2 01252BC4: 7274 moveq #116,d1 01252BC6: 7570 dc.w 0x7570 ; Invalid opcode 01252BC8: 2E63 movea.l -(a3),a7 01252BCA: 7070 moveq #112,d0 01252BCC: 00000000 ori.b #0x0,d0 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
