[Bug 235422] New: Crash on closing kdevelop with running debug session

Andreas Pakulat apaku at gmx.de
Mon Apr 26 12:05:40 UTC 2010


On 26.04.10 13:52:47, Niko Sams wrote:
> On Mon, Apr 26, 2010 at 13:36, Andreas Pakulat <apaku at gmx.de> wrote:
> > On 26.04.10 12:30:07, Niko Sams wrote:
> >> This crash happens because ICore::self() is 0 during shutdown:
> >>
> >> > Thread 1 (Thread 0x7f15aa453760 (LWP 17910)):
> >> > [KCrash Handler]
> >> > #5  0x00007f15a2d58f39 in KDevelop::IVariableController::variableCollection
> >> > (this=<value optimized out>) at
> >> > /home/gpiez/src/kdevplatform/debugger/interfaces/ivariablecontroller.cpp:41
> >> > #6  0x00007f15a2d58fe8 in KDevelop::IVariableController::handleEvent
> >> > (this=0x14ea350, event=<value optimized out>) at
> >> > /home/gpiez/src/kdevplatform/debugger/interfaces/ivariablecontroller.cpp:88
> >> > #7  0x00007f158dc804b8 in GDBDebugger::VariableController::handleEvent
> >> > (this=0x14ea350, event=KDevelop::IDebugSession::program_state_changed)
> >> >    at /home/gpiez/src/kdevelop/debuggers/gdb/variablecontroller.cpp:242
> >> > #8  0x00007f15a2d552df in KDevelop::IDebugSession::raiseEvent (this=0x3881e80,
> >> > e=KDevelop::IDebugSession::thread_or_frame_changed)
> >> >    at /home/gpiez/src/kdevplatform/debugger/interfaces/idebugsession.cpp:75
> >> > #9  0x00007f158dc74618 in GDBDebugger::DebugSession::raiseEvent
> >> > (this=0x3881e80, e=KDevelop::IDebugSession::program_state_changed) at
> >> > /home/gpiez/src/kdevelop/debuggers/gdb/debugsession.cpp:1255
> >>
> >> What's the best way to work around this?
> >> adding if(ICore:.self()) everywhere is error-prone. (can be easily forgotten)
> >
> > Can you explain what the problem is?
> the problematic code is:
> ICore()::self()->debugController()->variableCollection()
> 
> it crashes during shutdown as ICore()::self() is 0.

Are you sure its ICore::self() and not rather the debugController?
ICore::self() is never set back to 0.
 
> Is the correct solution to this problem an if(ICore::self()) {...} ?

See above, that won't help. But I wonder why there's even anything
happening at this point. It looks to me like the debugcontroller doesn't
shut down the debug session properly before its being deleted...

Andreas

-- 
You are a fluke of the universe; you have no right to be here.




More information about the KDevelop-devel mailing list