1

My app is crashing on the device after I repeat a certain sequence of actions a few times, generally it occurs after a memory level of one is triggered, and always occurs when one of the view is being loaded. This problem cannot be reproduced in the Simulator.

There are minor memory leaks upon each execution, but memory usage is quite low (as shown in Allocations and Leaks). I have stripped down the code, but the problem persists.

The issue is debugging the problem as there is no message in the console and no crash log.

Any suggestions?

huevos de oro
  • 327
  • 5
  • 17
  • possible duplicate of [Crash log without crash?](http://stackoverflow.com/questions/7416702/crash-log-without-crash) – Black Frog Sep 28 '11 at 14:28
  • this is not a duplicate as all the responses are associated with crashes that have some debugging information presented via EXC_BAD_ACCESS or SIGABRT – huevos de oro Sep 28 '11 at 16:58

2 Answers2

1

OpenGL can cause obscure crashes.

I had a retain cycle in my OpenGL code.

This happened in my custom UIView, where I had a GLKView subview. This subview could never be released, leading to a crash. Solution was to use weak instead of strong.

@property (strong, nonatomic) GLKView* glkView;   // Crash, no crash report, no errors
@property (weak,   nonatomic) GLKView* glkView;   // this works

There was no errors in the log. No crash report. I have exceptions enabled to break on throw, but no exceptions were thrown. I had inserted NSLog's everywhere, but it didn't reveal anything useful. I had zombies enabled, but didn't notice anything unusual.

neoneye
  • 50,398
  • 25
  • 166
  • 151
1

Searching for memory leaks is discussed here - Memory leak detection tools in Xcode.

Memory leaks can be hard to find since they can cause unpredictable effects. Use the Leak tool in xcode and go through your code. It may be worth looking through the programming guide on memory management as you may be releasing something when you shouldn't be (or the other way around). The problem may not necessarily be where you think.

I think it's going to take you meticulously going through your code and checking everything, even if you think something is working the way it should be, just check to be sure - you may be surprised to find that it's not.

Community
  • 1
  • 1
Phil_12d3
  • 388
  • 7
  • 18
  • hmm..what is perplexing is the app is not low on memory... I am familiar with memory leak detection...but my issue is there are no crash reports to go on... what conditions would prevent a crash log from being created when an application crashes. – huevos de oro Sep 28 '11 at 16:59