News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

MacOSX: CB crashes at Settings/Compiler and debugger

Started by bnilsson, October 22, 2006, 07:51:09 PM

Previous topic - Next topic

afb

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

Please clarify.
Is this something you do in configure or just on the fly?

takeshimiya

Quote from: bnilsson on October 25, 2006, 01:11:34 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


afb

You should also be able to start your bundle up like so:
(gdb) run --prefix=/Users/bnilsson

bnilsson

Thanks, I can start it but it does not respond to clicks.

bnilsson

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)

Pecan

#22
Could you compile CB with the debugging option -g on?
That backtrace has no symbol tables.

or try this:

Quote from: mandrav on October 25, 2006, 08:13:10 PM
Try the following in your working copy:


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!)

bnilsson

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

BTW: show me the command line that enables a compile with the debugging option -g.
Is it a configure option?

sethjackson

Quote from: bnilsson 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?


g++ -g your_source_file.cpp

bnilsson

#26
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?


mandrav

Be patient!
This bug will be fixed soon...

bnilsson

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.

afb

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:
  --enable-debug          turn on debugging (default is OFF)