Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
so my app started to sometimes crash and i don't really know why yet... when it does happen, it happens only when i want to i dismissModelViewController from my main view.

i have an Exit button in the model view that does this:

1. sets a default
2. stops an animation
3. dismisses itself

this same model view has a viewWillDisappear:animated method that does this:

1. removes 4 programatically created views from superView, which were created with viewWillAppear:animated
2. sets off an animation (with a 0 second duration) just to reposition a view in it's original place for the next time the view is appears.

instruments shows spikes under "sampler" at the launch of my app (see attached image). i'm not sure what the spikes in Sampler represent, but i'm pretty sure they're not ideal. later in the timeline there is another spike, when i dismiss my model view, which made the app crash.

any thoughts?

[EDIT] attaching another screen of Core Animation Instruments. this time, CA in my app peaks at 72fps (is that too fast? can i even control the fps of my animations?) while this spike occurs, but the Sampler spikes at the beginning occur without any animation. this time the app didn't crash.
 

Attachments

  • Picture 2.png
    Picture 2.png
    57 KB · Views: 104
  • Picture 3.png
    Picture 3.png
    96.6 KB · Views: 77
I wouldn't worry about spikes in Sampler. Your app uses the CPU, that's what the CPU is for. I'd worry if your app is obviously slow, or too slow, for some definition of slow.

Crashing I would worry about. You'll have to debug that.
 
suddenly it seems that my model view is being loaded lazily whenever it's executed to load, as the program stalls a bit before the model view appears. but i'm not loading it lazily.

the only real difference to my model view is that there are now objects (UISegment controls, labels and UIImageViews) that load off screen within the model view. they are off screen as a button will animate them up onto the screen. they are attached to a UIImageView that is always on screen, so that is why i haven't made them into their own NIB and push the new NIB on screen as another model view.

would the original placement of these objects off screen automatically make this NIB load lazily?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.