Chart Crash


#1

Hi Shinobi folks,

I’m seeing a crash behavior on the 2.3 version of the chart framework (it did appear under 2.1 as well) that I can’t seem to figure out if this is something I’m doing wrong or deep in the framework. This isn’t a crash that is easily reproducible. One of my beta testers was affected, but only a handful of times and not on a reproducible basis. I’m using TestFlight for crash reporting and here’s what TestFlight says for a stack trace:

| ktrace |
| 1 | MobiLincCamViewer | 0x00778a68 | TFSignalHandler |
| 2 | libsystem_c.dylib | 0x3bd6fe92 | _sigtramp |
| 3 | libGPUSupportMercury.dylib | 0x372a0758 | gpusSubmitDataBuffers |
| 4 | IMGSGX543GLDriver | 0x32a6bf30 | SubmitPacketsIfAny |
| 5 | GLEngine | 0x34ebc302 | gliPresentViewES |
| 6 | OpenGLES | 0x34ec4dd8 | -[EAGLContext presentRenderbuffer:] |
| 7 | MobiLincCamViewer | 0x001a734c | -[SChartGLView endRender] |
| 8 | MobiLincCamViewer | 0x001aa8fc | -[SChartCanvas drawChart:] |
| 9 | MobiLincCamViewer | 0x001a7ca4 | -[SChartCanvasRenderView drawRect:] |
| 10 | UIKit | 0x3586cd1c | -[UIView(CALayerDelegate) drawLayer:inContext:] |
| 11 | QuartzCore | 0x3561bbe4 | -[CALayer drawInContext:] |
| 12 | QuartzCore | 0x3561a70a | _ZN2CA5Layer8display_Ev |
| 13 | QuartzCore | 0x3561193a | _ZN2CA5Layer17display_if_neededEPNS_11TransactionE |
| 14 | QuartzCore | 0x35611864 | _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE |
| 15 | QuartzCore | 0x35611242 | _ZN2CA7Context18commit_transactionEPNS_11TransactionE |
| 16 | QuartzCore | 0x35611050 | _ZN2CA11Transaction6commitEv |
| 17 | QuartzCore | 0x35610eb0 | _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv |
| 18 | CoreFoundation | 0x33a306cc | __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ |
| 19 | CoreFoundation | 0x33a2e9c0 | __CFRunLoopDoObservers |
| 20 | CoreFoundation | 0x33a2ed16 | __CFRunLoopRun |
| 21 | CoreFoundation | 0x339a1ebc | CFRunLoopRunSpecific |
| 22 | CoreFoundation | 0x339a1d48 | CFRunLoopRunInMode |
| 23 | GraphicsServices | 0x375562ea | GSEventRunModal |
| 24 | UIKit | 0x358b7300 | UIApplicationMain |
| 25 | MobiLincCamViewer | 0x00068a26 | main in main.m on Line 16 |
| 26 | MobiLincCamViewer | 0x000689e7 | start |

Looks like something in the endRender call is crashing when accessing OpenGL API Calls. 

Any ideas?

Wes


#2

More info: After talking to my beta tester it appears like the crash happens right when the app transitions to the background. Hopefully that helps.


#3

Hi Wes, Thanks for the stack trace and the extra info. We’ve not had any reports of problems like this or entering the background. We’ll take a look into it - could you let me know if you’re using any other openGL in your app?


#4

Hi Stu,

That’s a good question to ask. I am actually. I’m using the open source COCOS2D to drive an animated joystick in my app. The app is an IP Camera monitoring app. The joystick is used to control the Pan/Tilt functions of the camera and the chart is used to display the real-time audio levels coming off the camera.

One change I made here recently was to stop updating the chart while in the background. Not sure if that will help or not, but my next release will have this change to see if it makes any difference.

Let me know what info I can provide regarding the other OpenGL package I’m using.

Wes


#5

Hi,

Thanks for the extra info! Hopefully your change to stop updating the chart in the background will alleviate the problem. We’ll be taking a look into this sometime soon and will probably be in touch to get more info about how you’re using COCOS2D.

Thanks

Ryan