9

So I try to debug an EXC_BAD_ACCESS error by editing my scheme, enabling all the different checks.

But the damn compiler gives me this error:

dyld: could not load inserted library '/usr/lib/libgmalloc.dylib' because image not found

I've googled around, someone solved by installing some kind of OS X combo installer (OS X 10.7.3), but I'm already running a newer version.

My Xcode is up to date so what is going wrong here?

George Skoptsov
  • 3,831
  • 1
  • 26
  • 44
marsrover
  • 715
  • 11
  • 27
  • You probably don't need guard malloc unless you're using malloc and the like in your own code. Post the code where you're getting EXC_BAD_ACCESS. – CodeSmile Nov 02 '12 at 21:04
  • I tried to enable zombie objects only and it runs now. I made it crash and compiler gives me: "*** -[CCSprite setPosition:]: message sent to deallocated instance 0x1dde17c0" Is there any way to find this instance? Dealing with box2d bodies btw, thanks for helping out. – marsrover Nov 02 '12 at 23:05
  • You really need to be running in the debugger to identify the instance. – David Dean Dec 06 '12 at 17:14
  • I would like to use guard malloc and I have this same issue. No useful answer after almost a year? – i_am_jorf Jun 26 '13 at 21:21
  • 3
    Oh it only works in the simulator, not on the device, apparently. – i_am_jorf Jun 26 '13 at 21:24

2 Answers2

13

According to official docs:https://developer.apple.com/library/mac/documentation/performance/Conceptual/ManagingMemory/Articles/MallocDebug.html

To enable debugging using Guard Malloc, configure your project to run with Guard Malloc in Xcode’s scheme editor. You can use this option for Mac apps and iOS apps running in the simulator.

So no device support.

InfalibleCoinage
  • 588
  • 13
  • 21
-5

enter image description here

i have solved this by perform below functionality and it works fine

1.Firstly Go to the Manage Schemes in the project.

2.After that click on the edit button.

3.Disable the "Enable Guard Malloc".

4.after that click on the ok button.

after that it works fine

please check above pic

Jaspreet Singh
  • 1,180
  • 2
  • 12
  • 30