Author Topic: MacOSX: CB crashes at Settings/Compiler and debugger  (Read 16123 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #15 on: October 25, 2006, 12:36:23 am »
Adding a resource fork (with: `wx-config --rezflags` /path/to/bin/codeblocks) is enough to make wxMac receive events and not launch in the background, and useful when debugging.

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #16 on: October 25, 2006, 01:11:34 am »
Please clarify.
Is this something you do in configure or just on the fly?

takeshimiya

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #17 on: October 25, 2006, 01:24:39 am »
Please clarify.
Is this something you do in configure or just on the fly?
Just go to the terminal and run `wx-config --rezflags` /path/to/bin/codeblocks
This one of the ways to be able to receive events in wxWidgets apps.

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #18 on: October 25, 2006, 07:36:49 am »
I tried it and it had no effect.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #19 on: October 25, 2006, 11:26:01 am »
You should also be able to start your bundle up like so:
Code
(gdb) run --prefix=/Users/bnilsson

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #20 on: October 25, 2006, 07:23:59 pm »
Thanks, I can start it but it does not respond to clicks.

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #21 on: October 25, 2006, 07:37:04 pm »
So, finally, I got a backtrace for the Settings/Compiler and debugger crash. (I didn't pay attention to the singlequotes in `wx-config --rezflags` before)

Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x0000b228 in CompilerSettingsDlg::CompilerSettingsDlg ()
(gdb) backtrace full
#0  0x0000b228 in CompilerSettingsDlg::CompilerSettingsDlg ()
No symbol table info available.
#1  0x0001821c in MainFrame::OnSettingsCompilerDebugger ()
No symbol table info available.
#2  0x015cd4c8 in wxEvtHandler::ProcessEventIfMatches ()
No symbol table info available.
#3  0x015cd788 in wxEventHashTable::HandleEvent ()
No symbol table info available.
#4  0x015cdf14 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#5  0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#6  0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#7  0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#8  0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#9  0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#10 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#11 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#12 0x016d2e0c in wxMenuBase::SendEvent ()
No symbol table info available.
#13 0x015f38f4 in wxMacAppEventHandler ()
No symbol table info available.
#14 0x93207554 in DispatchEventToHandlers ()
No symbol table info available.
#15 0x93206cac in SendEventToEventTargetInternal ()
No symbol table info available.
#16 0x9320da60 in SendEventToEventTarget ()
No symbol table info available.
#17 0x932862cc in SendHICommandEvent ()
No symbol table info available.
#18 0x932b6158 in SendMenuItemSelectedEvent ()
No symbol table info available.
#19 0x932b6060 in FinishMenuSelection ()
No symbol table info available.
#20 0x9329d56c in MenuSelectCore ()
No symbol table info available.
#21 0x9329d054 in MenuSelect ()
No symbol table info available.
#22 0x0164d7f0 in wxMacTopLevelMouseEventHandler ()
No symbol table info available.
#23 0x015f3e5c in wxMacAppEventHandler ()
No symbol table info available.
#24 0x93207554 in DispatchEventToHandlers ()
No symbol table info available.
#25 0x93206cac in SendEventToEventTargetInternal ()
No symbol table info available.
#26 0x9320da60 in SendEventToEventTarget ()
No symbol table info available.
#27 0x932992d4 in HandleMouseEvent ()
No symbol table info available.
#28 0x9320ddcc in ToolboxEventDispatcherHandler ()
No symbol table info available.
#29 0x932077a4 in DispatchEventToHandlers ()
No symbol table info available.
#30 0x93206cac in SendEventToEventTargetInternal ()
No symbol table info available.
#31 0x9320da60 in SendEventToEventTarget ()
No symbol table info available.
#32 0x015f144c in wxApp::MacHandleOneEvent ()
No symbol table info available.
#33 0x015f1544 in wxApp::MacDoOneEvent ()
No symbol table info available.
#34 0x015f15d8 in wxApp::MainLoop ()
No symbol table info available.
#35 0x00005290 in CodeBlocksApp::OnRun ()
No symbol table info available.
#36 0x0157be44 in wxEntry ()
No symbol table info available.
#37 0x00003e48 in main ()
No symbol table info available.
(gdb)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #22 on: October 25, 2006, 08:22:35 pm »
Could you compile CB with the debugging option -g on?
That backtrace has no symbol tables.

or try this:

Try the following in your working copy:

Code
make clean-zipfiles // <- this is the important part
make
make install // (or whatever it is that you do on Mac)

(don't type the comments!)
« Last Edit: October 25, 2006, 08:30:17 pm by Pecan »

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #23 on: October 25, 2006, 08:28:45 pm »
mandrav just fixed it all (at least for me) by:

     make clean-zipfiles

It fixed both the "Settings/Compiler and debugger" and "Project/Build options" crashes.


bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #24 on: October 25, 2006, 08:30:55 pm »
BTW: show me the command line that enables a compile with the debugging option -g.
Is it a configure option?

sethjackson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #25 on: October 25, 2006, 08:34:49 pm »
BTW: show me the command line that enables a compile with the debugging option -g.
Is it a configure option?

Code
g++ -g your_source_file.cpp

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #26 on: October 26, 2006, 08:41:47 am »
Would I have to change to "g++ -g" in every Makefile?
It seems like a lot of work and to invite mistakes.
Is there a more semi-automatic way to setup the CB build to use this option?

« Last Edit: October 26, 2006, 08:44:14 am by bnilsson »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Be patient!
This bug will be fixed soon...

bnilsson

  • Guest
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #28 on: October 26, 2006, 10:07:47 am »
I was asking how to build CB with the debug option on, not how to use it.
I have not yet been able to build CB using CB.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: MacOSX: CB crashes at Settings/Compiler and debugger
« Reply #29 on: October 26, 2006, 10:26:16 am »
Strange, I instead find that I need to strip my binaries of debugging symbols afterwards ?
(i.e. that it does build with the -g symbols enabled by default, and is huge because of it)

But they might be talking about the extra Code::Blocks debug code, enabled by configure:
Code
  --enable-debug          turn on debugging (default is OFF)