News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Crash when changing the Build Target

Started by gmb300, August 21, 2007, 12:08:04 AM

Previous topic - Next topic

gmb300

Reporting a Crash in Code::Blocks.

How to Reproduce:  :?
1). Open a project.
2). Close the project.
3). Manually edit the project .cbp outside of codeblocks (does this matter?).
4). Open a workspace containing the project.
5). Change the active build target using the combobox in the toolbar.
6). Crash...

OS: Linux 2.6.18sec1 i686
wxWidgets: 2.8.4 (Unicode)
CodeBlocks: SVN rev 4368 (Aug 14, 2007)
GCC: 4.1.2

StackTrace:
   wxFatalSignalHandler
   cbProject::SetActiveBuildTarget(wxString const&)
   CompilerGCC::DoUpdateTargetMenu(int)
   CompilerGCC::OnSelectTarget(wxCommandEvent&)
   wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const
   wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
   wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxWindowBase::TryParent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   wxWindowBase::TryParent(wxEvent&)
   wxEvtHandler::ProcessEvent(wxEvent&)
   g_cclosure_marshal_VOID__VOID
   g_closure_invoke
   g_signal_emit_valist
   g_signal_emit
   gtk_widget_activate
   gtk_menu_shell_activate_item
   _gtk_marshal_BOOLEAN__BOXED
   g_closure_invoke
   g_signal_emit_valist
   g_signal_emit
   gtk_propagate_event
   gtk_main_do_event
   g_main_context_dispatch
   g_main_loop_run
   gtk_main
   wxEventLoop::Run()
   wxAppBase::MainLoop()
   wxAppBase::OnRun()
   CodeBlocksApp::OnRun()

gmb300

I forgot to mention in the above report... By restarting Code::Blocks and everything works fine.  Sometimes, after making big changes to the project settings, and then changing the build target, the crash happens again.

MortenMacFly

Quote from: gmb300 on August 21, 2007, 12:08:04 AM
3). Manually edit the project .cbp outside of codeblocks (does this matter?).
Sure. C::B itself is the only instance that is allowed to do such.
Everything else is like using a hex editor to write some stochasitic patterns in an executable and hope it's still running afterwards. ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

My saying!  :)

But seriously, I don't think it is the reason for the crash. The project files are actually quite robust and should take a lot of abuse before something crahses.
Those 20 ProcessEvent calls don't look good... dread to think what it might be... :(
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mandrav

Bug fixed, thanks for providing a reproduction procedure. I 've been seeing this from time to time but could never reproduce it in a reliable way to debug it :).
Be patient!
This bug will be fixed soon...