tags:

views:

138

answers:

3

Hi, I m creating a simple GUI navigation based application in iphone. When this application run in my IPHONE DEVICE it shows following error,

Class_Name(427,0x383772d8) malloc: *** mmap(size=2388660224) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Program received signal:  “EXC_BAD_ACCESS”.

How to resolve above problem?

A: 

EXC_BAD_ACCESS typically occurs when you reference an object that has been released. Somewhere you're not retaining a reference that you need. Or you're releasing an object that you need. Try using the debugger to figure out which line the access is occurring on, and then make sure that the object is properly retained before calling the method.

Bearddo
+4  A: 

You've requested a memory allocation of 2GB, which is more memory than is available, so the malloc() fails.

Rob Napier
A: 

One thing that will really help you is setting a symbolic breakpoint on malloc_error_break

Instructions are here. I'd recommend adding this to your global breakpoints so that it gets set in all your projects... it's highly useful.

kubi