iPad Air Crashes, iPad3 works ok -> on iOS7


#1

Hi,
The App that I am developing runs fine on iPad3 but crashes on iPad4. Mainly there is a hidden / CGrectZero chart thats get switched with another one. This works ok on iPad3 but it immediately crashes the app on iPad Air. I use ShinobiCharts Premium 2.5.6 and iOS7.  Are you aware of this issue or got some hotfix/resolution? Perhaps other handling of not visible charts is needed on iPad Air?

The crash log:

| Exception Type: | SIGABRT | Code: | ABORT at 0x3a54d1fc |

The stacktrace is as follows: 

Thread 0: Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x3a54d1fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3a5b4a53 pthread_kill + 58
2 libsystem_c.dylib 0x3a4fe02d abort + 76
3 MY_APP 0x001b6ecd +[ShinobiChartLog setLoggingEnabled:]
4 MY_APP 0x001ccbbb SChartGLErrorHandler::handleErrorImpl(char const*) const
5 MY_APP 0x001963c9 -[SChartGLView checkResize]
6 MY_APP 0x00196a91 -[SChartGLView beginRenderWithReloadedData:isRadialChart:]
7 MY_APP 0x0019a223 -[SChartCanvas drawChart:]
8 MY_APP 0x001977c5 -[SChartCanvasRenderView drawRect:]
9 UIKit 0x31ffadd9 -[UIView(CALayerDelegate) drawLayer:inContext:] + 372
10 QuartzCore 0x31c30a79 -[CALayer drawInContext:] + 100
11 QuartzCore 0x31c19515 CA::Layer::display_() + 460
12 QuartzCore 0x31bfd369 CA::Layer::display_if_needed(CA::Transaction*) + 208
13 QuartzCore 0x31bfd001 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24
14 QuartzCore 0x31bfca0d CA::Context::commit_transaction(CA::Transaction*) + 228
15 QuartzCore 0x31bfc81f CA::Transaction::commit() + 314
16 QuartzCore 0x31bf654d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
17 CoreFoundation 0x2f7c1f69 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
18 CoreFoundation 0x2f7bf8f7 __CFRunLoopDoObservers + 286
19 CoreFoundation 0x2f7bfc43 __CFRunLoopRun + 738
20 CoreFoundation 0x2f72a471 CFRunLoopRunSpecific + 524
21 CoreFoundation 0x2f72a253 CFRunLoopRunInMode + 106
22 GraphicsServices 0x344382eb GSEventRunModal + 138
23 UIKit 0x31fdf845 UIApplicationMain + 1136
24 MY_APP 0x0007b4fb main (main.m:17)

Crash in Charts when using Airplay
#2

Hi Okipol,

I’ve had a look into this and it turns out that the line it is crashing on, is the line that it is trying to set our OpenGL buffer size. You can’t set an OpenGL buffer size of 0x0 so we get a GLError and unfortunately this is causing your application to crash.

I’ll raise this as an issue to investigate. It could be that we need to catch this error and provide some default, or maybe provide a more useful error message etc.

You mention that this only happens on the iPad Air? I would expect that setting a frame of CGRectZero on your chart would crash on all devices. Are they both running the same version of iOS?

Until we’ve looked into this issue, I would suggest to not pass CGRectZero to your chart. Could you perhaps give it CGRectMake(0,0,1,1) instead?

Thanks,
Jan Akerman


#3

Hi,

I managed to ommit this issue earlier by swizzling the views ([v1 removeFromSuperView], [view addSubView:v2]… etc).
The iPad3 is running iOS 7.0.4 and the iPad Air was running iOS 7.0.1 but (because of the issue) was upgraded to 7.0.4. The issue oddly only was seen on the iPad Air. The CGRectZero only caused a log when in xCode :“The chart may have to litle space to draw …” or one with equivelant meaning. No crash whatsoever. Thanks for the reply and please do keep me up to date with any activities in the area of this problem. 

Thanks


#4

Hi Okipol,

If you’d like to send your a cut down version of your original project (the one that was causing the crash) in to info@shinobicontrols.com with a reference to this forum post, we could have a look at why this was only happening on the iPad air. As far as I can tell, I would expect it to happen on both devices.

Jan


#5

Hi,
I’ll try to do that once I will be at the office. As far as I remeber the CGRect was swiggled to CGRectZero for the non visible charts/views. The same thing was at initialization - which worked OK …initializeWithFrame:CGRectZero]. There is an UITableView in a Popover in which you choose the views and right after choosing a different chart or even just a different view (current chart will get the CGRectZero frame) the app crashes just on iPadAir:

//ShinobiChart *chart1, *chart2; 

CGrectFrame currFrame = chart1.frame;
chart1.frame = CGRectZero;
chart2.frame = currFrame;

//Additional hidden setting on the CGrectZero view frames.

#6

We get the same stack trace for a crash but we don’t have a root cause on what we are doing to cause it as it is happening in the field.  It happens only on iPad Air for iPads, but we see it on mostly 5S and some 4. Was there ever a solution for this issue?


#7

I did some UIView swizzling.

Add the views to the super view and/or remove from superview when needed instead of assigning a CGRectZero.
Hope that helps you.


#8

I did some UIView swizzling.

Add the views to the super view and/or remove from superview when needed instead of assigning a CGRectZero.
Hope that helps you.

@edit:
The swizlling was the solution and the CGrectZero assign was the source of the problem in my case.


#9

Thanks, I’m not using CGRectZero or doing swizzling. Our stack traces are the same but we still can’t reproduce in-house so we don’t even know what we are doing wrong at this point so trying to work backwards to see what causes this issue.


#10

Hi guys,

I suspect this may be an issue with Airplay which we are still investigating.

We suspect the issue is when the chart is played to an Apple TV and the chart view is resized beyond what our openGL backend allows.

Seen as you can’t reproduce the issue in-house can you check whether the crash happens when people try to connect the app to a scree via AirPlay?

Kind Regards,
Andrew Polkinghorn