Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Spanky Deluxe

macrumors demi-god
Original poster
Mar 17, 2005
5,282
1,745
London, UK
Hi!

I've got some code that was written by someone else for Linux. I need to expand on the code a bit as part of a project, however, I can't get the damned original code to work! I can get the code to compile without any problems now that I've got fink handling fftw etc, however, my problem arises in that when I run, I get a "has exited due to signal 11 (SIGSEGV)" error.
After a bit of googling, I've worked out that this is a memory access error and that the way to track it down would be to click the "Enable Guard Malloc" menu item. That item's greyed out for me though.
My code is all in straight old C if that matters. I haven't been able to find any reason why that option would be greyed out!

Spanky
 

Spanky Deluxe

macrumors demi-god
Original poster
Mar 17, 2005
5,282
1,745
London, UK
Never mind, I worked it out. You can't enable or disable it while a debug window is running I think. I restarted Xcode, opened the code afresh and it let me choose it. :)
 

szymczyk

macrumors regular
Mar 5, 2006
187
17
In Xcode 4 you enable Guard Malloc from the scheme editor. Choose Edit Scheme from the Scheme menu in the project window toolbar. Select the Run step on the left side of the scheme editor. Click the Diagnostics button in the scheme editor. Select the Enable Guard Malloc checkbox.

In Xcode 3 choose Run > Enable Guard Malloc to enable Guard Malloc.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.