Reputation: 21607
I have an app that is intensive computationally but is fairly simple programatically. For example, there are no threads. Everything is straight-line.
If I run the app in the iPhone retina 3.5" simulator, I can get exercise the app enough to get it to cause an access violation without much difficulty:
{Called from the UIView drawRect method}
UIImage *image = [self getImage] ;
[image drawAtPoint:point] ; // Crash here-no identifiable pattern when it crashes here.
The getImage
method either returns a pointer to a UIImage
already loaded or loads the image and returns the pointer. The debugger appears to show a valid UIImage
after a crash.
If I run the app in any of the other simulators, do not encounter a problem. In fact, this is the first access violation I have seen since developing this app.
Is there something that is inherently different with the 3.5" simulator or phone?
Upvotes: 0
Views: 55
Reputation: 21607
I discovered what the problem was. Sort of.
I noticed that it was always crashing on the same same image. I have 1700 images, whenever it was displaying this one in the 3-1/2" simulator---crash.
I loaded the PNG image into photoshop (where it had been created originally). I changed from Indexed color to RGB and no more crash.
I have no idea why it only crashed on that one simulator. Preview, Safari, Chrome and Photoshop had no problem with the image.
Upvotes: 1