Closed sansumbrella closed 11 years ago
If I indicate support for all orientations in the build settings and set the supportedOrientations signal, the app crashes with a similar stack trace after rotation:
sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) + 8, stop reason = EXC_BAD_ACCESS (code=1, address=0x44) frame #0: 0x3216ebe0 IMGSGX554GLDriver
sgxTextureGetImageRowBytes(GLDTextureRec, unsigned int, unsigned int) + 8
frame #1: 0x3216eb92 IMGSGX554GLDriver`CalculateChunkPlaneSizes(GLDTextureRec, int, unsigned int, unsigned int, unsigned int, unsigned int) + 106
frame #2: 0x321712f6 IMGSGX554GLDriversgxConfigureTexturePrivate(GLDTextureRec*) + 86 frame #3: 0x3216ff48 IMGSGX554GLDriver
glrUpdateTexture + 620
frame #4: 0x369ad6c0 libGPUSupportMercury.dylibgldLoadFramebuffer + 104 frame #5: 0x3459dbd4 GLEngine
gleUpdateDrawFramebufferState + 180
frame #6: 0x34515a60 GLEngineglClear_Exec + 236 frame #7: 0x002001e6 libglInterpose.dylib
clear + 266
frame #8: 0x0003de7a TabletSanityTabletSanityApp::draw() + 206 at TabletSanityApp.cpp:36 frame #9: 0x0003de7a TabletSanity
TabletSanityApp::draw() + 206 at TabletSanityApp.cpp:36
frame #10: 0x00052e44 TabletSanitycinder::app::Window::emitDraw(this=0x1fd8f160) + 24 at Window.cpp:404 frame #11: 0x000474b2 TabletSanity
-CinderViewCocoaTouch drawView + 74 at CinderViewCocoaTouch.mm:97
frame #12: 0x000499aa TabletSanity-[AppImplCocoaTouch displayLinkDraw:]() + 162 at AppCocoaTouch.mm:167 frame #13: 0x00248c4c libglInterpose.dylib
-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 308
frame #14: 0x34d557a8 QuartzCoreCA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 160 frame #15: 0x34d55700 QuartzCore
CA::Display::IOMFBDisplayLink::callback(IOMobileFramebuffer, unsigned long long, unsigned long long, unsigned long long, void) + 64
frame #16: 0x36fadfd6 IOMobileFramebufferIOMobileFramebufferVsyncNotifyFunc + 154 frame #17: 0x33d485ac IOKit
IODispatchCalloutFromCFMessage + 192
frame #18: 0x3312a88a CoreFoundation__CFMachPortPerform + 118 frame #19: 0x331353e6 CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 34
frame #20: 0x3313538a CoreFoundation__CFRunLoopDoSource1 + 138 frame #21: 0x3313420e CoreFoundation
__CFRunLoopRun + 1382
frame #22: 0x330a723c CoreFoundationCFRunLoopRunSpecific + 356 frame #23: 0x330a70c8 CoreFoundation
CFRunLoopRunInMode + 104
frame #24: 0x36c6233a GraphicsServicesGSEventRunModal + 74 frame #25: 0x34fc32b8 UIKit
UIApplicationMain + 1120
frame #26: 0x0003e1ea TabletSanitycinder::app::AppCocoaTouch::executeLaunch() + 154 at AppCocoaTouch.h:183 frame #27: 0x0003e01c TabletSanity
main + 256 at TabletSanityApp.cpp:41
frame #28: 0x0003dc68 TabletSanity`start + 40
(lldb)This might not be an issue with Cinder, but instead my device suddenly getting tired. Some forums suggested doing a full restart of the iPad and I haven't seen the crash since doing that. I still wouldn't mind if someone else had a look or some insights on the problem.
See: http://stackoverflow.com/questions/14333158/sgxtexturegetimagerowbytes-exc-bad-access http://appleblogdeveloper.blogspot.com/2013/01/excbadaccess-from-sgxtexturegetimagerow.html
Maddening technology.
Actually, just started experiencing the crash again after restarting the device and using it for a bit. I'm not sure what that means WRT Cinder versus the device being to blame, but I know which users would blame.
It's possible that the crash is related to the development profile and being made this evening. I'm not sure. But the crashes are consistent and occur with an extremely minimal app based on the Basic OpenGL sample.
Updated XCode last night. Haven't seen the crash since then. It seems like it's a bug in the instruction set that XCode generates for the device, since it is specific to the GPU architecture and has been encountered by others with an empty Apple GLKit sample and within Maps.
Closing for now.
This sounds like something that should be reported to apple, if it can be done with the GLKit sample. Also sounds like it is a faulty upload to the device, be it the wrong symbols, instruction set or whatever, but that is really just a shot in the dark.
Thanks Rich,
I will submit a bug report to Apple if it happens again now that I updated to the latest release version of XCode.
When running the Basic OpenGL app on iOS with support for only Portrait orientation set in the "iPad Deployment Info," the application usually crashes shortly after launch with an EXC_BAD_ACCESS. This happens even when the device launches in Portrait orientation. The crash occurs regardless of whether I set a signal for the supported orientations.
The application usually gets through six or seven draw() calls before crashing, which suggests that the OpenGL context is changed out from under the app.
If I don't call gl::clear, the crash happens on gl::drawSolidCircle. gl::color() doesn't trigger the exception. If I remove all gl:: functions, I don't experience the crash.
Worth noting: Word Shift doesn't suffer from this issue, but the latest test apps I have compiled exhibit it consistently. I can't find the difference between them, as it is non-AA, portrait-only, with no supportedOrientations signal response configured.
Maybe @reakinator has an idea about this?
For fun, I added the following code to the draw() method: { cout << "Drawing" << endl; gl::clear( Color( 0, 0, 0 ) ); gl::color( Color::white() ); gl::drawSolidCircle( getWindowCenter(), 40.0f ); } I also disabled AA, since it destroys the iOS GPU CINDER_APP_NATIVE( TabletSanityApp, RendererGl( RendererGl::AA_NONE ) )
Stack trace (this is consistent):
sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) + 8, stop reason = EXC_BAD_ACCESS (code=1, address=0x44) frame #0: 0x3216ebe0 IMGSGX554GLDriver
sgxTextureGetImageRowBytes(GLDTextureRec, unsigned int, unsigned int) + 8 frame #1: 0x3216eb92 IMGSGX554GLDriver`CalculateChunkPlaneSizes(GLDTextureRec, int, unsigned int, unsigned int, unsigned int, unsigned int) + 106 frame #2: 0x321712f6 IMGSGX554GLDriversgxConfigureTexturePrivate(GLDTextureRec*) + 86 frame #3: 0x3216ff48 IMGSGX554GLDriver
glrUpdateTexture + 620 frame #4: 0x369ad6c0 libGPUSupportMercury.dylibgldLoadFramebuffer + 104 frame #5: 0x3459dbd4 GLEngine
gleUpdateDrawFramebufferState + 180 frame #6: 0x34515a60 GLEngineglClear_Exec + 236 frame #7: 0x004241e6 libglInterpose.dylib
clear + 266 frame #8: 0x001140aa TabletSanitycinder::gl::clear(color=0x2fd017d8, clearDepthBuffer=true) + 94 at gl.cpp:223 frame #9: 0x001140aa TabletSanity
cinder::gl::clear(color=0x2fd017d8, clearDepthBuffer=true) + 94 at gl.cpp:223 frame #10: 0x001001e8 TabletSanityTabletSanityApp::draw(this=0x1d525300) + 168 at TabletSanityApp.cpp:36 frame #11: 0x00127ffe TabletSanity
cinder::app::Window::emitDraw(this=0x1d53c080) + 34 at Window.cpp:404 frame #12: 0x0011dd22 TabletSanity-[WindowImplCocoaTouch draw](self=0x1e82a800, _cmd=0x3540a5a0) + 134 at AppCocoaTouch.mm:859 frame #13: 0x0011713e TabletSanity
-[CinderViewCocoaTouch drawView](self=0x1e82ae30, _cmd=0x0019735e) + 130 at CinderViewCocoaTouch.mm:97 frame #14: 0x0011a3da TabletSanity-[AppImplCocoaTouch displayLinkDraw:](self=0x1e8256b0, _cmd=0x00197495, sender=0x1d53e8d0) + 562 at AppCocoaTouch.mm:167 frame #15: 0x0046cc4c libglInterpose.dylib
-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 308 frame #16: 0x34d557a8 QuartzCoreCA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 160 frame #17: 0x34d55700 QuartzCore
CA::Display::IOMFBDisplayLink::callback(IOMobileFramebuffer, unsigned long long, unsigned long long, unsigned long long, void) + 64 frame #18: 0x36fadfd6 IOMobileFramebufferIOMobileFramebufferVsyncNotifyFunc + 154 frame #19: 0x33d485ac IOKit
IODispatchCalloutFromCFMessage + 192 frame #20: 0x3312a88a CoreFoundation__CFMachPortPerform + 118 frame #21: 0x331353e6 CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 34 frame #22: 0x3313538a CoreFoundation__CFRunLoopDoSource1 + 138 frame #23: 0x3313420e CoreFoundation
__CFRunLoopRun + 1382 frame #24: 0x330a723c CoreFoundationCFRunLoopRunSpecific + 356 frame #25: 0x330a70c8 CoreFoundation
CFRunLoopRunInMode + 104 frame #26: 0x36c6233a GraphicsServicesGSEventRunModal + 74 frame #27: 0x34fc32b8 UIKit
UIApplicationMain + 1120 frame #28: 0x0011c4e2 TabletSanitycinder::app::AppCocoaTouch::launch(this=0x1d525300, title=0x00195f07, argc=1, argv=0x2fd02c78) + 94 at AppCocoaTouch.mm:402 frame #29: 0x00114fba TabletSanity
cinder::app::App::executeLaunch(app=0x1d525300, title=0x00195f07, argc=1, argv=0x2fd02c78) + 286 at App.cpp:483 frame #30: 0x0010127c TabletSanitycinder::app::AppCocoaTouch::executeLaunch(app=0x1d525300, title=0x00195f07, argc=1, argv=0x2fd02c78) + 224 at AppCocoaTouch.h:183 frame #31: 0x00100338 TabletSanity
main(argc=1, argv=0x2fd02c78) + 268 at TabletSanityApp.cpp:41