I have a app, when I had run it for a few minutes, it always crashed. I check the crash log, it always said malloc: * mmap(size=1048576) failed (error code=12) * error: can't allocate region securely I checked the memory leaks by using the instruments tools, but did not find any memory leak. I wonder if there are some memory leaks the instruments can not find, or some other reasons for the crash. any help will be appreciated!
Edit:
I used the time profiler to check the performance. but I don't know what's the key point because the top items are these:
Running Time Self Symbol Name 6494.0ms 9.4% 6494.0 -[DLStarView initWithDefault:highlighted:position:allowFractions:] (my app has a lot of list, each item has a self made star view)
Running Time Self Symbol Name 5848.0ms 8.4% 5848.0 +[ASIHTTPRequest runRequests] (my app always get data from sever)
Running Time Self Symbol Name 2169.0ms 3.1% 2169.0 -[BMKUserLocationInternal updateLocationInfo]
Running Time Self Symbol Name 1435.0ms 2.0% 1435.0 -[EGOCache imageForKey:]
Running Time Self Symbol Name 1252.0ms 1.8% 1252.0 -[KLRestDetailViewController tableView:cellForRowAtIndexPath:]
is it userful? how can I check if I stuffing a bunch of stuff?
PS: this crash only appear on the real device, I ran it in the simulator for about 20 minutes and the app still run smoothly, my device is iPhone4S iOS 6.0.1
I set a break point and got the messages:
the crash thread messages are not always the same but in the console output, It always said malloc: * mmap(size=1048576) failed (error code=12) error: can't allocate region securely ** set a breakpoint in malloc_error_break to debug
I was so confused by this bug for a few days, any idea? thanks!
I used the time profiler to check the performance. but I don't know what's the key point because the top items are these:
Running Time Self Symbol Name 6494.0ms 9.4% 6494.0 -[DLStarView initWithDefault:highlighted:position:allowFractions:] (my app has a lot of list, each item has a self made star view)
Running Time Self Symbol Name 5848.0ms 8.4% 5848.0 +[ASIHTTPRequest runRequests] (my app always get data from sever)
Running Time Self Symbol Name 2169.0ms 3.1% 2169.0 -[BMKUserLocationInternal updateLocationInfo]
Running Time Self Symbol Name 1435.0ms 2.0% 1435.0 -[EGOCache imageForKey:]
Running Time Self Symbol Name 1252.0ms 1.8% 1252.0 -[KLRestDetailViewController tableView:cellForRowAtIndexPath:]
is it userful? how can I check if I stuffing a bunch of stuff?
PS: this crash only appear on the real device, I ran it in the simulator for about 20 minutes and the app still run smoothly, my device is iPhone4S iOS 6.0.1
I set a break point and got the messages:
libsystem_c.dylib`malloc_error_break:
0x33c742e8: push {r7, lr}
0x33c742ea: mov r7, sp
0x33c742ec: nop
0x33c742ee: nop
0x33c742f0: pop {r7, pc}
0x33c742f2: nop
0x3393ed86: movs r2, #0
0x3393ed88: ldr r0, [r0]
0x3393ed8a: ldr r0, [r4, r0]
0x3393ed8c: blx 0x33aaf1c0; symbol stub for: -[NSUUID copyWithZone:]
0x3393ed90: movw r0, #52700
0x3393ed94: movt r0, #1571
0x3393ed98: add r0, pc
0x3393ed9a: ldr r1, [r0]
0x23ac72: mov r0, r5
0x23ac74: str.w r8, [sp]
0x23ac78: blx 0x2c7d04 ; symbol stub for: objc_msgSend
0x23ac7c: b 0x23aca4 ; -[BMKUserLocationInternal updateLocationInfo]
+ 912 at BMKUserLocationInternal.mm:131
0x23ac7e: bl 0x1cbcd8 ; bmengine::GetGlobalMan() at
IphoneBaiduMaps.mm:61
0x33941b7e: mov r0, r11
0x33941b80: mov r1, r8
0x33941b82: mov r2, r10
0x33941b84: blx 0x33aace80 ; symbol stub for: CFDictionarySetValue$shim
0x33941b88: movw r0, #36884
0x33941b8c: movt r0, #1571
0x33941b90: add r0, pc
0x33941b92: ldr r4, [r0]
0x33941b94: mov r0, r11
0x23acd6: movs r3, #1
0x23acd8: str r3, [sp]
0x23acda: movs r3, #0
0x23acdc: blx 0x2c7d04 ; symbol stub for: objc_msgSend
0x23ace0: add sp, #4
0x23ace2: pop {r7, pc}
0x35bee92e: ldr r1, [sp, #224]
0x35bee930: ldr r2, [sp, #136]
0x35bee932: ldr r3, [sp, #232]
0x35bee934: blx 0x35c268e4 ; symbol stub for:
CLLocationDictionaryUtilitiesGetTransitionInterval
0x35bee938: movw r0, #1732
0x35bee93c: movt r0, #1078
0x35bee940: add r0, pc
0x35bee942: ldr r1, [r0]
the crash thread messages are not always the same but in the console output, It always said malloc: * mmap(size=1048576) failed (error code=12) error: can't allocate region securely ** set a breakpoint in malloc_error_break to debug
I was so confused by this bug for a few days, any idea? thanks!