Skip to content

Crash on iPad mini with SKGLView #404

Open
@entdark

Description

@entdark

I got a few crash reports about crashes on iPad mini (A1455) and iPad mini 2 (Wi-Fi).
Example of a crash report on iPad mini 2 (Wi-Fi):

Incident Identifier: 44FF5E1A-B0B9-4052-8630-A0E05E4E7857
CrashReporter Key: AF3F796B-1B6B-46D9-B83B-365BF3405414
Hardware Model: iPad4,4
Process: [renamed process] [8979]
Path: /var/containers/Bundle/Application/A536E6F1-85DA-4908-B52C-0B59CB765790/[renamed path]
Identifier: [renamed bundle id]
Version: 1.6 (1.6)
Code Type: ARM-64
Parent Process: ??? [1]

Date/Time: 2017-11-24T18:22:20Z
Launch Time: 2017-11-24T16:45:25Z
OS Version: iPhone OS 11.1 (15B93)
Report Version: 104

Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x1
Crashed Thread: 0

Thread 0 Crashed:
0 libGPUSupportMercury.dylib 0x00000001a2091efc 0x1a2090000 + 7932
1 libGPUSupportMercury.dylib 0x00000001a2092edc 0x1a2090000 + 11996
2 AGXGLDriver 0x00000001a61c1734 0x1a619a000 + 161588
3 GLEngine 0x00000001a71ab01c 0x1a70cd000 + 909340
4 OpenGLES 0x0000000189dcea8c 0x189dc6000 + 35468
5 GLKit 0x0000000193d70988 0x193d4e000 + 141704

iPad mini (A1455) has a similar crash report, it only differs with

Code Type: ARM
OS Version: iPhone OS 9.2 (13C75)

According to googling it happens when the app uses GPU when minimized.
So I guess the OpenGL does not get flushed properly on pause event.

When I used raw OpenGL 2.0 so the OpenGLView view I used this in the main render loop and it worked fine:

if (this.Sleeping) {
	if (!this.wentSleeping) {
		this.GameView.HasRenderLoop = false;
		this.wentSleeping = true;
	}
	return;
} else if (this.wentSleeping) {
	this.wentSleeping = false;
}

But it was added because it crashed on all iOS devices.
When I have migrated to SkiaSharp the problem did not occur at all on all devices, so I thought that is handled on Skia side properly.

Used packages:
Xamarin.Forms 2.4.0.38779
SkiaSharp.Views.Forms 1.59.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions