[SChartGLView endRender] Issue


#1

Hi,
I have the last version (2.7.3) of ShinobiCharts and my app crash many times in background mode. Any Idea?

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000001

Thread : Crashed: com.apple.main-thread

0  libGPUSupportMercury.dylib     0x2d2128fe gpus_ReturnNotPermittedKillClient

1  libGPUSupportMercury.dylib     0x2d2133cb gpusSubmitDataBuffers

2  IMGSGX554GLDriver              0x24ea4413 

3  GLEngine                       0x28f02389 gliPresentViewES_Exec

4  GLEngine                       0x28f022bb gliPresentViewES

5  OpenGLES                       0x28f0d065 -[EAGLContext presentRenderbuffer:] + 60

6  iSIG                           0x0028ad2f -[SChartGLView endRender]

7  iSIG                           0x00290c95 -[SChartCanvas drawChart:]

8  iSIG                           0x0028bf1d -[SChartCanvasRenderView drawRect:]

9  UIKit                          0x29a67241 -[UIView(CALayerDelegate) drawLayer:inContext:] + 400

10 QuartzCore                     0x2944222d -[CALayer drawInContext:] + 228

11 QuartzCore                     0x2942ae73 CA::Layer::display_() + 514

12 QuartzCore                     0x2940f5b1 CA::Layer::display_if_needed(CA::Transaction*) + 200

13 QuartzCore                     0x2940f275 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24

14 QuartzCore                     0x2940ec51 CA::Context::commit_transaction(CA::Transaction*) + 224

15 QuartzCore                     0x2940ea55 CA::Transaction::commit() + 324

16 UIKit                          0x299e36e5 _afterCACommitHandler + 132

17 CoreFoundation                 0x264f1d95 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20

18 CoreFoundation                 0x264ef453 __CFRunLoopDoObservers + 278

19 CoreFoundation                 0x264ef85b __CFRunLoopRun + 914

20 CoreFoundation                 0x2643d3c1 CFRunLoopRunSpecific + 476

21 CoreFoundation                 0x2643d1d3 CFRunLoopRunInMode + 106

22 GraphicsServices               0x2d8210a9 GSEventRunModal + 136

23 UIKit                          0x29a4cfa1 UIApplicationMain + 1440

24 iSIG                           0x000aa8a7 main (main.m:16)


#2

Hi isilva,

We are aware of this crash and we think caused by apps that try to use OpenGL rendering when in background mode as they don’t have access to the graphics processor.

We are still investigating a fix for this issue and I have made a note in our system to update this forum post when a fix for this issue has been released.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn


#3

There are news about this issue? I’m waiting for 2 months, please give me any solution.

Best Regards


#4

I would like to add some more crashlogs, probably they are related to the problem.ShinobiCharts - Version: 2.7.3-1, Edition: Premium, Release Date: Sep  9 2014

It seems that these crashes are present only on iOS 7 and somehow not happens on iOS8 devices, but we still have not much statistics to be sure 100% about it.

ios 7.1.2   iPad3

Crashed: 1.3 rv:180 (com.apple.main-thread)

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x000000a4

Thread : Crashed: 1.3 rv:180 (com.apple.main-thread)
0  IMGSGX543GLDriver              0x2eb2e308 sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int)
1  IMGSGX543GLDriver              0x2eb2e2b9 CalculateChunkPlaneSizes(GLDTextureRec*, int, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
2  IMGSGX543GLDriver              0x2eb2e2b9 CalculateChunkPlaneSizes(GLDTextureRec*, int, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
3  IMGSGX543GLDriver              0x2eb30a25 sgxConfigureTexturePrivate(GLDTextureRec*)
4  IMGSGX543GLDriver              0x2eb2f341 glrUpdateTexture
5  libGPUSupportMercury.dylib     0x3485e2eb gldLoadFramebuffer
6  GLEngine                       0x31fed555 gleUpdateDrawFramebufferState
7  GLEngine                       0x31fae78d glResolveMultisampleFramebufferAPPLE_Exec
8  bi                             0x001ad9b7 -[SChartGLView endRender] + 246
9  bi                             0x001b39e5 -[SChartCanvas drawChart:] + 3028
10 bi                             0x001aec6d -[SChartCanvasRenderView drawRect:] + 84
11 UIKit                          0x3264ed85 -[UIView(CALayerDelegate) drawLayer:inContext:] + 372
12 QuartzCore                     0x3227c2c1 -[CALayer drawInContext:] + 100
13 QuartzCore                     0x3226510d CA::Layer::display_() + 452
14 QuartzCore                     0x3224903d CA::Layer::display_if_needed(CA::Transaction*) + 208
15 QuartzCore                     0x32248cd5 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24
16 QuartzCore                     0x322486df CA::Context::commit_transaction(CA::Transaction*) + 230
17 QuartzCore                     0x322484ef CA::Transaction::commit() + 314
18 QuartzCore                     0x3224221d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
19 CoreFoundation                 0x2fd7e255 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
20 CoreFoundation                 0x2fd7bbf9 __CFRunLoopDoObservers + 284
21 CoreFoundation                 0x2fd7bf3b __CFRunLoopRun + 730
22 CoreFoundation                 0x2fce6ebf CFRunLoopRunSpecific + 522
23 CoreFoundation                 0x2fce6ca3 CFRunLoopRunInMode + 106
24 GraphicsServices               0x34c0d663 GSEventRunModal + 138
25 UIKit                          0x3263314d UIApplicationMain + 1136
26 bi                             0x00055c37 main (main.m:16)

iOS 7.1.2  iPad Mini

Crashed: 1.3 rv:188 (com.apple.main-thread)

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x03eba004

Thread : Crashed: 1.3 rv:188 (com.apple.main-thread)
0  bi                             0x0038577a SChartGL::VertexMath::singleBaselineColorChooser(SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*, SChartGL::GLVertex3D const*, GLColour4f const&, GLColour4f const&, SChartGL::orientation, float, bool)
1  ???                            0x27d1bd44 
2  bi                             0x003856a5 SChartGL::VertexMath::convertSeries2DToGLVertex3DWithBaseline(float*, SChartGL::GLVertex3D*, int, float, SChartGL::orientation, GLColour4f const&, GLColour4f const&)::$_1::operator()(SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*, SChartGL::GLVertex3D const*, int) const
3  bi                             0x003855e5 std:: __1::__ function::__func<SChartGL::VertexMath::convertSeries2DToGLVertex3DWithBaseline(float*, SChartGL::GLVertex3D*, int, float, SChartGL::orientation, GLColour4f const&, GLColour4f const&)::$_1, std::__1::allocator<SChartGL::VertexMath::convertSeries2DToGLVertex3DWithBaseline(float*, SChartGL::GLVertex3D*, int, float, SChartGL::orientation, GLColour4f const&, GLColour4f const&)::$_1>, GLColour4f const& (SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*, SChartGL::GLVertex3D const*, int)>::operator()(SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*&&, SChartGL::GLVertex3D const*&&, int&&)
4  bi                             0x0039dc7d std::__1::function<GLColour4f const& (SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*, SChartGL::GLVertex3D const*, int)>::operator()(SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*, SChartGL::GLVertex3D const*, int) const
5  bi                             0x00380e33 SChartGL::VertexMath::convertSeries2DToGLVertex3D(float*, SChartGL::GLVertex3D*, int, std::__1::function<GLColour4f const& (SChartGL::GLVertex3D const&, SChartGL::GLVertex3D const*, SChartGL::GLVertex3D const*, int)> const&)
6  bi                             0x003810f9 SChartGL::VertexMath::convertSeries2DToGLVertex3DWithBaseline(float*, SChartGL::GLVertex3D*, int, float, SChartGL::orientation, GLColour4f const&, GLColour4f const&)
7  bi                             0x00371847 SChartGL::Drawer::drawHorizontalFill(float*, std::__1::shared_ptr<SChartGL::SeriesHandle const>, int*, int, GLColour4f const&, GLColour4f const&, GLColour4f const&, GLColour4f const&, bool, bool, float, float, float, SChartGL::orientation, bool, float const*)
8  bi                             0x00319ca3 -[SChartGLView(LineChartSeries) horizontalFill:forSeries:forIndex:withSize:withColor:withColorBelowBaseline:withGradientFillColor:withGradientFillColorBelowBaseline:withBaseline:withMaxOffsetAboveBaseline:withMaxOffsetBelowBaseline:withFillDirection:withGradientFill:andTranslation:]
9  bi                             0x002d675d -[SChartLineSeries drawBin:withDrawer:withGLBaseline:andGLTranslation:currentRenderIndexDict:]
10 bi                             0x0029d5c5 -[SChartMappedSeries drawWithCanvas:withGLBaseline:andGLTranslation:]
11 bi                             0x0033b701 -[SChartMappedSeriesGroup drawSingleSeries:onChart:]
12 bi                             0x0033b8b5 -[SChartMappedSeriesGroup drawSeriesOnChart:]
13 bi                             0x00333acb -[SChartCartesianSeriesGroup drawSeriesOnChart:]
14 bi                             0x003059cb -[SChartCanvas drawChart:]
15 bi                             0x00300d15 -[SChartCanvasRenderView drawRect:]
16 UIKit                          0x2fe0fd85 -[UIView(CALayerDelegate) drawLayer:inContext:] + 372
17 QuartzCore                     0x2fa3d2c1 -[CALayer drawInContext:] + 100
18 QuartzCore                     0x2fa2610d CA::Layer::display_() + 452
19 QuartzCore                     0x2fa0a03d CA::Layer::display_if_needed(CA::Transaction*) + 208
20 QuartzCore                     0x2fa09cd5 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24
21 QuartzCore                     0x2fa096df CA::Context::commit_transaction(CA::Transaction*) + 230
22 QuartzCore                     0x2fa094ef CA::Transaction::commit() + 314
23 QuartzCore                     0x2fa0321d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
24 CoreFoundation                 0x2d53f255 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
25 CoreFoundation                 0x2d53cbf9 __CFRunLoopDoObservers + 284
26 CoreFoundation                 0x2d53cf3b __CFRunLoopRun + 730
27 CoreFoundation                 0x2d4a7ebf CFRunLoopRunSpecific + 522
28 CoreFoundation                 0x2d4a7ca3 CFRunLoopRunInMode + 106
29 GraphicsServices               0x323ce663 GSEventRunModal + 138
30 UIKit                          0x2fdf414d UIApplicationMain + 1136
31 bi                             0x000e9945 main (main.m:16)

#5

Hi guys,

Due to this being such a sporadic issue we’ve found it difficult to track down.

We may have a potential solution that requires calling glFinish() when the application’s  applicationWillResignActive: method is called and passing the gl context into this.

If you could send an email to info@shinobicontrols.com with this forum post as the subject title we’ll send you a sample that may help solve this issue.

Kind regards,

Sam


#6

Hi guys,

In version 2.8.1 we added the method flushPendingGLOperations  on the ShinobiChart class that we recommend calling inside the application’s  applicationWillResignActive:  method to prevent this crash.

If you are still experiencing this issue after implementing this fix please let us know at info@shinobicontrols.com.

Kind regards,
Andrew Polkinghorn