Closed sansumbrella closed 11 years ago
Launching in portrait still crashes on rotation back to portrait after a few tries. (lldb) bt
sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) + 8, stop reason = EXC_BAD_ACCESS (code=1, address=0x44) frame #0: 0x31e3cbe0 IMGSGX554GLDriver
sgxTextureGetImageRowBytes(GLDTextureRec, unsigned int, unsigned int) + 8
frame #1: 0x31e3cb92 IMGSGX554GLDriver`CalculateChunkPlaneSizes(GLDTextureRec, int, unsigned int, unsigned int, unsigned int, unsigned int) + 106
frame #2: 0x31e3f2f6 IMGSGX554GLDriversgxConfigureTexturePrivate(GLDTextureRec*) + 86 frame #3: 0x31e3df48 IMGSGX554GLDriver
glrUpdateTexture + 620
frame #4: 0x3667a6c0 libGPUSupportMercury.dylibgldLoadFramebuffer + 104 frame #5: 0x3426bbd4 GLEngine
gleUpdateDrawFramebufferState + 180
frame #6: 0x341e3a60 GLEngineglClear_Exec + 236 frame #7: 0x004b11e6 libglInterpose.dylib
clear + 266
frame #8: 0x000dcbba iosAppTestcinder::gl::clear(color=0x2fd4fa64, clearDepthBuffer=true) + 94 at gl.cpp:223 frame #9: 0x000dcbba iosAppTest
cinder::gl::clear(color=0x2fd4fa64, clearDepthBuffer=true) + 94 at gl.cpp:223
frame #10: 0x000b384e iosAppTestiosAppTestApp::draw(this=0x1e9de400) + 562 at iosAppTestApp.cpp:372 frame #11: 0x000c7ddc iosAppTest
boost::detail::function::void_function_obj_invoker0<std::1::bind<void (iosAppTestApp::)(), iosAppTestApp>, void>::invoke(boost::detail::function::function_buffer&) [inlined] std::*1::enable_if<(t=0x1f05c718, ti=0x1f05c718, f=0x1f05c710, a0=0x1f05c718)) && ((is_placeholder<iosAppTestApp>::value) == (0))) && (!(is_referencewrapper<iosAppTestApp*>::value)), iosAppTestApp&>::type std::1::mu<iosAppTestApp_, std::1::tuple<> >(iosAppTestApp_&, std::1::tuple<>&) + 116 at functional_base:309
frame #12: 0x000c7d92 iosAppTestboost::detail::function::void_function_obj_invoker0<std::__1::__bind<void (iosAppTestApp::_)(), iosAppTestApp_>, void>::invoke(boost::detail::function::function_buffer&) [inlined] std::__1::__bind_return<void (this=0x2fd50198, __f=0x1f05c710, __bound_args=0x1f05c718, __args=0x2fd50198)(), std::__1::tuple<iosAppTestApp_>, std::__1::tuple<> >::type std::__1::__apply_functor<void (iosAppTestApp::*)(), std::__1::tuple<iosAppTestApp*>, 0ul, std::__1::tuple<> >(void (iosAppTestApp::_)()&, std::__1::tuple<iosAppTestApp_>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) + 14 at functional:1668 frame #13: 0x000c7d84 iosAppTest
boost::detail::function::void_function_obj_invoker0<std::1::bind<void (iosAppTestApp::)(), iosAppTestApp>, void>::invoke(boost::detail::function::function_buffer&) [inlined] std::1::bind_return<void (this=0x1f05c710)(), std::1::tuple<iosAppTestApp*>, std::1::tuple<> >::type std::1::bind<void (iosAppTestApp::)(), iosAppTestApp>::operator()<>() + 16 at functional:1727
frame #14: 0x000c7d74 iosAppTestboost::detail::function::void_function_obj_invoker0<std::__1::__bind<void (function_obj_ptr=0x1f05c710)(), iosAppTestApp*>, void>::invoke(boost::detail::function::function_buffer&) + 12 at function_template.hpp:153 frame #15: 0x00120a74 iosAppTest
boost::function0boost::signals2::detail::void_type boost::signals2::detail::call_with_tuple_argsboost::signals2::detail::void_type::m_invoke<boost::function<void (this=0x2fd50308, func=0x1f05c70c, args=(null))> >(void_, boost::function<void ()>&, boost::signals2::detail::unsigned_meta_array<>, std::__1::tuple<>) const + 18 at variadic_slot_invoker.hpp:89 frame #17: 0x001209a0 iosAppTest
boost::signals2::detail::void_type boost::signals2::detail::call_with_tuple_argsboost::signals2::detail::void_type boost::signals2::detail::variadic_slot_invokerboost::signals2::detail::void_type::m_invoke<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (this=0x2fd50724, connectionBody=0x1f05cdd8), boost::function<void ()()> >, boost::signals2::mutex> > >(boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> > const&, boost::signals2::detail::void_type const_) const + 36 at variadic_slot_invoker.hpp:114 frame #19: 0x001207d4 iosAppTest
boost::signals2::detail::void_type boost::signals2::detail::variadic_slot_invokervoid boost::signals2::optional_last_value<void>::operator(this=0x1dd956f0, first=(null), last=(null))boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> >, void_>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> > >(boost::signals2::detail::slot_call_iterator_tboost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> >, void_>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> >, boost::signals2::detail::slot_call_iterator_tboost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, std::__1::__list_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> >, void_>, boost::signals2::detail::connection_body<std::__1::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void (), boost::function<void ()()> >, boost::signals2::mutex> >) const + 160 at optional_last_value.hpp:55 frame #24: 0x00117830 iosAppTest
void boost::signals2::detail::combiner_invokerboost::signals2::detail::signal_impl<void (this=0x1dd95670), boost::signals2::optional_last_value<void>, int, std::__1::less<int>, boost::function<void ()()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() + 606 at signal_template.hpp:245 frame #26: 0x00116700 iosAppTest
boost::signals2::signal<void (this=0x1dd94fb4), boost::signals2::optional_last_valuecinder::app::Window::emitDraw(this=0x1dd94f20) + 22 at Window.cpp:395 frame #28: 0x000e8f7e iosAppTest
-[WindowImplCocoaTouch draw](self=0x1dd832a0, _cmd=0x350d85a0) + 134 at AppCocoaTouch.mm:829
frame #29: 0x000e1e9e iosAppTest-[CinderViewCocoaTouch drawView](self=0x1dd70930, _cmd=0x0017d8ef) + 130 at CinderViewCocoaTouch.mm:98 frame #30: 0x000e513a iosAppTest
-[AppImplCocoaTouch displayLinkDraw:](self=0x1dd681d0, _cmd=0x0017e00b, sender=0x1f05ee50) + 562 at AppCocoaTouch.mm:168
frame #31: 0x004f9c4c libglInterpose.dylib-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 308 frame #32: 0x34a237a8 QuartzCore
CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 160
frame #33: 0x34a23700 QuartzCore`CA::Display::IOMFBDisplayLink::callback(IOMobileFramebufferVsyncNotifyFunc + 154 frame #35: 0x33a165ac IOKit
IODispatchCalloutFromCFMessage + 192
frame #36: 0x32df888a CoreFoundation__CFMachPortPerform + 118 frame #37: 0x32e033e6 CoreFoundation
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION** + 34
frame #38: 0x32e0338a CoreFoundation`CFRunLoopDoSource1 + 138
frame #39: 0x32e0220e CoreFoundation__CFRunLoopRun + 1382 frame #40: 0x32d7523c CoreFoundation
CFRunLoopRunSpecific + 356
frame #41: 0x32d750c8 CoreFoundationCFRunLoopRunInMode + 104 frame #42: 0x3692f33a GraphicsServices
GSEventRunModal + 74
frame #43: 0x34c912b8 UIKitUIApplicationMain + 1120 frame #44: 0x000e7152 iosAppTest
cinder::app::AppCocoaTouch::launch(this=0x1e9de400, title=0x0017c5c0, argc=1, argv=0x2fd51c80) + 94 at AppCocoaTouch.mm:401
frame #45: 0x000dfdce iosAppTestcinder::app::App::executeLaunch(app=0x1e9de400, title=0x0017c5c0, argc=1, argv=0x2fd51c80) + 286 at App.cpp:475 frame #46: 0x000b766c iosAppTest
cinder::app::AppCocoaTouch::executeLaunch(app=0x1e9de400, title=0x0017c5c0, argc=1, argv=0x2fd51c80) + 224 at AppCocoaTouch.h:179
frame #47: 0x000b51b8 iosAppTest`main(argc=1, argv=0x2fd51c80) + 268 at iosAppTestApp.cpp:426Strange... 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:
Is this what you are doing to reproduce the crash?
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.
The video is nice proof. :)
I still couldn't reproduce on iOS 6.0, I'm upgrading and will try again..
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.. :)
Deleted the build/ directory in Cinder/xcode, rebuilt Cinder. Powered down/powered up iPad. Installed clean build. Can't reproduce anymore.
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?
Done. Thanks for your help and patience.
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.