cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.34k stars 943 forks source link

Crash after rotation when launching in landscape view #277

Closed sansumbrella closed 11 years ago

sansumbrella commented 11 years ago

When an app is launched in a landscape view and then rotated to a portrait view, it crashes. When launched in portrait mode, no crashes occur on rotation. Confirmed with cinder/test/iosAppTest on a retina iPad.

Also posted on forum (which is the better place?): http://forum.libcinder.org/#Topic/23286000001469039

[EDIT] I have seen this crash when rotating to either portrait view from either landscape view. I have not seen it when rotating into landscape. It does not matter what the view was on launch.

sansumbrella commented 11 years ago

Launching in portrait still crashes on rotation back to portrait after a few tries. (lldb) bt

ghost commented 11 years ago

Strange... I have no problems doing what you are describing using iosTestApp on both an iPad 4 with iOS 6 and an iPhone 4s with iOs 5.1 - what device are you testing on?

The stacktrace is a bunch of garble - can you do a clean build of cinder / iosTestApp and retry?

To make sure, this is what I tried:

  1. hold the device in landcape
  2. startup iosTestApp
  3. rotate to portrait

Is this what you are doing to reproduce the crash?

sansumbrella commented 11 years ago

iOS 6.1 on iPad (4th generation Model A1458). Debug build.

Try rotating your device one more time to landscape and back. Demo video: http://www.youtube.com/watch?v=TiJDQPR15uQ

Not seeing the crash in a Release build, but I don't trust it if it crashes in either.

ghost commented 11 years ago

The video is nice proof. :)

I still couldn't reproduce on iOS 6.0, I'm upgrading and will try again..

ghost commented 11 years ago

Hum, can't reproduce on 6.1 one either. The stacktrace really looks like you've got some corrupted or out-of-date build files that are being used. Can you do a super-clean (delete all build dirs / libcinder-iphone_d.a) and try again? Sometimes a restart helps.. :)

sansumbrella commented 11 years ago

Deleted the build/ directory in Cinder/xcode, rebuilt Cinder. Powered down/powered up iPad. Installed clean build. Can't reproduce anymore.

ghost commented 11 years ago

I've run into the same thing and got similar stacktraces (similar in that they are totally random). Sucks, but at least it is surmountable. Would you mind post your conclusion on the forum for other readers too?

sansumbrella commented 11 years ago

Done. Thanks for your help and patience.