libnui / nui3

libnui v3
http://libnui.net
Mozilla Public License 2.0
163 stars 31 forks source link

Background rendering crash #13

Closed mathieugarcia closed 13 years ago

mathieugarcia commented 13 years ago

When putting a NUI application in background (iOS 4+ with multitasking), sometimes an event still finds its way through the engine and process is killed due to GLES rendering while in background.

Thread 0 Crashed:
0   libSystem.B.dylib               0x00078ac8 __kill + 8
1   libSystem.B.dylib               0x00078ab8 kill + 4
2   libSystem.B.dylib               0x00078aaa raise + 10
3   libSystem.B.dylib               0x0008d03a abort + 50
4   IMGSGX535GLDriver               0x00001874 glrReturnNotPermittedKillClient + 20
5   IMGSGX535GLDriver               0x00005360 SubmitPacketsIfAny + 256
6   IMGSGX535GLDriver               0x0000540c gldFlush + 4
7   GLEngine                        0x000e6608 gliPresentViewES + 184
8   OpenGLES                        0x00003754 -[EAGLContext presentRenderbuffer:] + 36
9   BeatMaker 2D OPT                0x0049f730 -[EAGLView EndSession] (nglWindow_UIKit.mm:929)
10  BeatMaker 2D OPT                0x0049ea0c -[nglUIWindow EndSession] (nglWindow_UIKit.mm:721)
11  BeatMaker 2D OPT                0x0049e868 nglWindow::EndSession() (nglWindow_UIKit.mm:1176)
12  BeatMaker 2D OPT                0x0031c9fc nuiMainWindow::Paint() (nuiMainWindow.cpp:399)
13  BeatMaker 2D OPT                0x002a6510 nuiEventTargetBase::CallEvent(void*, nuiDelegateMemento, nuiEvent const&) (nuiFastDelegate.h:649)
14  BeatMaker 2D OPT                0x002a7154 nuiEventTargetBase::OnEvent(nuiEvent const&) (nuiEvent.cpp:265)
15  BeatMaker 2D OPT                0x002a72a0 nuiEventSource::SendEvent(nuiEvent const&) (nuiEvent.cpp:140)
16  BeatMaker 2D OPT                0x002a64b8 nuiEventSource::operator()(nuiEvent const&) (nuiEvent.cpp:153)
17  BeatMaker 2D OPT                0x0049f5f4 -[nglUIWindow Paint] (nglWindow_UIKit.mm:457)
18  QuartzCore                      0x000926fc CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 144
19  QuartzCore                      0x00092820 CA::Display::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 44
20  IOMobileFramebuffer             0x00001bf4 IOMobileFramebufferVsyncNotifyFunc + 68
21  ???                             0x30c60040 0 + 818282560
22  CoreFoundation                  0x0003d30c __CFMachPortPerform + 204
23  CoreFoundation                  0x00034cdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
24  CoreFoundation                  0x00034ca0 __CFRunLoopDoSource1 + 160
25  CoreFoundation                  0x00027566 __CFRunLoopRun + 514
26  CoreFoundation                  0x00027270 CFRunLoopRunSpecific + 224
27  CoreFoundation                  0x00027178 CFRunLoopRunInMode + 52
28  GraphicsServices                0x000045ec GSEventRunModal + 108
29  GraphicsServices                0x00004698 GSEventRun + 56
30  UIKit                           0x0000411c -[UIApplication _run] + 396
31  UIKit                           0x00002128 UIApplicationMain + 664
32  BeatMaker 2D OPT                0x0049cf0c nglApplication::Main(int, char**) (nglApplication_UIKit.mm:214)
33  BeatMaker 2D OPT                0x0011d000 main (BeatMaker.cpp:29)
34  BeatMaker 2D OPT                0x00069020 start + 32

https://gist.github.com/f4f0de94616f5ccc1f57

Test device: iPod Touch 4G

Test OS: iOS 4.1

meeloo commented 13 years ago

fixed