Symbian
Symbian OS Library

FAQ-0196 What is ThreadPanicBreakpoint?

[Index][spacer] [Previous] [Next]



 

Classification: General Category: Development
Created: 01/15/99 Modified: 06/07/2001
Number: FAQ-0196
Platform: ER5

Question:
My program causes an exception in a function called ThreadPanicBreakpoint - what's happening? What can I do if I don't have UP_DEBUG.CPP?

Answer:
In debug builds of the emulator, there are a number of breakpoints which trigger if a thread panics (i.e. dies unexpectedly).: these produce a dialogue offering to let you debug the program, but they aren't exceptions in the normal sense.

The MSVC debugger cannot easily display the EPOC descriptors used to describe the panic, so EPOC now uses a helper function called ThreadPanicBreakpoint to make the descriptor available as a normal C string. Don't worry if you don't have the UP_DEBUG.CPP source file - all of the necessary information is in the PDB file already, so just press Cancel when asked for the location of the file.

The stack trace will show something like:
    ThreadPanicBreakpoint(unsigned long 189, unsigned char * 0x0012fac0, unsigned char * 0x0012f9b8, int 22) line 19
    DebugThreadPanic(unsigned long 189, const TDesC8 & {...}, const TDesC8 & {...}, int 22) line 38 + 37 bytes
    DPlatThread::Panic(const TDesC8 & {...}, int 22) line 405 + 51 bytes
    svThreadPanic() line 948
    dispatchL() line 1665 + 5 bytes
    Kern::SupervisorInitialise(int (void *)* 0x0040115e startupThread(void)) line 1791 + 39 bytes
    ExecHandler::KernelStartup(int 1610773420, int (void *)* 0x0040115e startupThread(void)) line 2186 + 9 bytes
    dispatch() line 343
    _E32Startup() line 210 + 10 bytes
    KERNEL32! 77f1b304()

    You can view the panic information directly by opening the Variables window and selecting the "locals" tab.