Author Topic: Crash when changing the Build Target  (Read 4895 times)

gmb300

  • Guest
Crash when changing the Build Target
« on: August 21, 2007, 12:08:04 am »
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

  • Guest
Re: Crash when changing the Build Target
« Reply #1 on: August 21, 2007, 12:15:21 am »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Crash when changing the Build Target
« Reply #2 on: August 21, 2007, 07:55:56 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Crash when changing the Build Target
« Reply #3 on: August 21, 2007, 09:11:45 am »
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."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Crash when changing the Build Target
« Reply #4 on: August 22, 2007, 09:29:18 am »
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...