User forums > General (but related to Code::Blocks)

When debugger plugin is disabled C::B crashes

<< < (2/3) > >>

oBFusCATed:
Because this way you can have multiple plugins from different vendors and there will be no duplications of UI windows.

The other option was to allow the debugger plugin to have it's own plugins, which sounds ridicules... 

Jenna:
Just a quick info:
I get the crash in cbeditor.cpp:3207 because the pointer is null :
 
--- Quote ---       cbBreakpointsDlg *dlg = Manager::Get()->GetDebuggerManager()->GetBreakpointDialog();
        dlg->Reload();
 
--- End quote ---
I think it should not even try to (re)load the (any) debuuger-dialog(s) if no plugin is available.
Or only reload sdk-stuff and nothing provided by a plugin.

I'm still not at home but now with my linux-laptop so I was able to run C::B through gdb.
So still no tme to look into it deeper, but I think you (oBFusCATed ) are much more familiar with the code and it should be not too hard (hopefully) to fix it.

blauzahn:
The crash occurs on linux too.

1) start freshly compiled and installed cb
2) open existing hello world project
3) disable debugger plugin
4) type some characters in the editor
5) hit enter-key
6) crash

svn build rev 9288 (2013-09-02 20:39:28) gcc 4.6.4 Linux/unicode - 64 bit
ubuntu 12.04

excerpt from crashlog:


--- Code: ---<report version="1.0" kind="exception">
  <system description="Linux 3.8.0-29-generic x86_64"/>
  ...
    <module path="/usr/local/bin/codeblocks" address="00400000" size="0013c000"/>
    <module path="/usr/local/bin/codeblocks" address="0074d000" size="00006000"/>
  ...
    <module path="/usr/local/lib/codeblocks/plugins/libdebugger.so" address="7fd96d792000" size="0008a000"/>
    <module path="/usr/local/lib/codeblocks/plugins/libdebugger.so" address="7fd96da1c000" size="00006000"/>
  ...
</modules>
  <stack>
    <frame level="0"/>
    <frame level="1" function="cbEditor::OnEditorModified(wxScintillaEvent&amp;)" offset="00000237"/>
    <frame level="2" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;)" offset="00000055"/>
    <frame level="3" function="wxEvtHandler::SearchDynamicEventTable(wxEvent&amp;)" offset="0000004f"/>
    <frame level="4" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000092"/>
    <frame level="5" function="wxWindowBase::TryParent(wxEvent&amp;)" offset="00000039"/>
    <frame level="6" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="7" function="wxScintilla::NotifyParent(SCNotification*)" offset="00000078"/>
    <frame level="8" function="ScintillaWX::NotifyParent(SCNotification)" offset="00000015"/>
    <frame level="9" function="Editor::NotifyModified(Document*, DocModification, void*)" offset="0000051e"/>
    <frame level="10" function="Document::NotifyModified(DocModification)" offset="000000af"/>
    <frame level="11" function="Document::InsertString(int, char const*, int)" offset="0000027c"/>
    <frame level="12" function="Editor::NewLine()" offset="000000b0"/>
    <frame level="13" function="Editor::KeyCommand(unsigned int)" offset="00001315"/>
    <frame level="14" function="Editor::WndProc(unsigned int, unsigned long, long)" offset="00000512"/>
    <frame level="15" function="ScintillaWX::WndProc(unsigned int, unsigned long, long)" offset="00000058"/>
    <frame level="16" function="Editor::KeyDownWithModifiers(int, int, bool*)" offset="0000005d"/>
    <frame level="17" function="wxScintilla::OnKeyDown(wxKeyEvent&amp;)" offset="00000027"/>
    <frame level="18" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;)" offset="00000055"/>
    <frame level="19" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*)" offset="000000ac"/>
    <frame level="20" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="000000b4"/>
    <frame level="21" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="22"/>
    <frame level="23"/>
    <frame level="24" function="g_closure_invoke" offset="00000132"/>
    <frame level="25"/>
    <frame level="26" function="g_signal_emit_valist" offset="00000a5e"/>
    <frame level="27" function="g_signal_emit" offset="00000082"/>
    <frame level="28"/>
    <frame level="29" function="gtk_window_propagate_key_event" offset="000000eb"/>
    <frame level="30"/>
    <frame level="31"/>
    <frame level="32" function="g_closure_invoke" offset="00000132"/>
    <frame level="33"/>
    <frame level="34" function="g_signal_emit_valist" offset="00000a5e"/>
    <frame level="35" function="g_signal_emit" offset="00000082"/>
    <frame level="36"/>
    <frame level="37" function="gtk_propagate_event" offset="00000197"/>
    <frame level="38" function="gtk_main_do_event" offset="00000283"/>
    <frame level="39"/>
    <frame level="40" function="g_main_context_dispatch" offset="00000133"/>
    <frame level="41"/>
    <frame level="42" function="g_main_loop_run" offset="0000006a"/>
    <frame level="43" function="gtk_main" offset="000000a7"/>
    <frame level="44" function="wxEventLoop::Run()" offset="00000048"/>
    <frame level="45" function="wxAppBase::MainLoop()" offset="0000004b"/>
  </stack>
</report>

--- End code ---

Full log availiable if necessary.

I hope, this helps.

oBFusCATed:
Yeah, I saw the backtrace, too.
It is not that simpler and it is not the only place that exhibits the problem, unfortunately.
It happens because if there are no debugger plugin, the debugger manager destroys
all debugger related UI objects. I'm not sure this is good idea, so it might change in the
future.

I'll try to fix it in the next couple of days...

comsytec:
So I think same can occur at every place in the SDK where

--- Code: --- Manager::Get()->GetDebuggerManager()->GetBreakpointDialog();
--- End code ---
is refered and the return value is not properly handled.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version