如何在[UnityAppController(Rendering)repaintDisplayLink]上解决UnhandledException

此崩溃远远超过了我们的崩溃日志,我们只是无法弄清楚是什么原因造成的。因此,我向你们寻求帮助。

我对此主题的研究表明,可能的原因是,我们要么尝试以与游戏使用的方向不同的方向展示广告,要么我们以不同于最小化的方向恢复应用。看起来这是2016年的事情,在Unity 5.6.0中已解决。但这并没有太大帮助,因为我们当前正在使用Unity 2018.4.6f1。

我们无法自己重现此崩溃,但在Firebase Crashlytics上却看到大量类似的崩溃。这就是我们要做的所有事情。

以下一些相关信息:
团结:2018.4.6f1
受影响的设备:iphone,ipad
受影响的操作系统:iOS 9-iOS 13
Xcode版本: 11.1

Unity播放器设置配置:
默认方向:自动旋转
使用动画自动旋转:true
允许自动旋转的方向:横向右,横向左

典型的崩溃日志如下:

Crashed: com.apple.main-thread
0  GameApp            0x100533da8 CrashedCheckBelowForHintsWhy + 118 (CrashReporter.mm:118)
1  GameApp            0x102c9563c void firebase::ReferenceCountedFutureImpl::DeleteT<std::__1::basic_string<char,std::__1::char_traits<char>,std::__1::allocator<char> > >(void*) + 27033940
2  GameApp            0x1005fe8bc RuntimeInvoker_TrueVoid_tDB81A15FA2AB53E2401A76B745D215397B29F783_RuntimeObject_RuntimeObject(void (*)(),MethodInfo const*,void*,void**) + 22071 (Il2CppInvokerTable.cpp:22071)
3  GameApp            0x10126b4b8 il2cpp::vm::Runtime::Invoke(MethodInfo const*,void**,Il2CppException**) + 539 (Runtime.cpp:539)
4  GameApp            0x10126bdf0 il2cpp::vm::Runtime::CallUnhandledExceptionDelegate(Il2CppDomain*,Il2CppDelegate*,Il2CppException*) + 476 (Runtime.cpp:476)
5  GameApp            0x10126bd7c il2cpp::vm::Runtime::UnhandledException(Il2CppException*) + 632 (Runtime.cpp:632)
6  GameApp            0x100cb5424 Scriptinginvocation::Invoke(ScriptingExceptionPtr*,bool) + 362 (Scriptinginvocation.cpp:362)
7  GameApp            0x100cbcbf0 Coroutine::InvokeMoveNext(ScriptingExceptionPtr*) + 71 (Scriptinginvocation.h:71)
8  GameApp            0x100cbc7c8 Coroutine::Run(bool*) + 257 (Coroutine.cpp:257)
9  GameApp            0x100c09fc0 AsyncOperation::InvokeCoroutine() + 21 (AsyncOperation.cpp:21)
10 GameApp            0x100c26590 PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingflags,int) + 455 (PreloadManager.cpp:455)
11 GameApp            0x100c26ba4 PreloadManager::UpdatePreloading() + 565 (PreloadManager.cpp:565)
12 GameApp            0x100c1b6a8 ExecutePlayerLoop(NativePlayerLoopSystem*) + 347 (PlayerLoop.cpp:347)
13 GameApp            0x100c1b6dc ExecutePlayerLoop(NativePlayerLoopSystem*) + 365 (PlayerLoop.cpp:365)
14 GameApp            0x100c1b8bc PlayerLoop() + 45 (RecursionLimit.h:45)
15 GameApp            0x100e71c24 UnityPlayerLoopImpl(bool) + 272 (LibEntryPoint.mm:272)
16 GameApp            0x10052a898 UnityRepaint + 280 (UnityAppController+Rendering.mm:280)
17 GameApp            0x10052a774 -[UnityAppController(Rendering) repaintDisplayLink] + 72 (UnityAppController+Rendering.mm:72)
18 QuartzCore         0x240809ff0 CA::Display::DisplayLink::dispatch_items(unsigned long long,unsigned long long,unsigned long long) + 636
19 IOKit              0x23c6564b0 IODispatchCalloutFromCFMessage + 488
20 CoreFoundation     0x23c36519c __CfmachPortPerform + 188
21 CoreFoundation     0x23c38bda0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
22 CoreFoundation     0x23c38b4ec __CFRunLoopDoSource1 + 440
23 CoreFoundation     0x23c386310 __CFRunLoopRun + 2096
24 CoreFoundation     0x23c3857c0 CFRunLoopRunSpecific + 436
25 GraphicsServices   0x23e58679c GSEventRunmodal + 104
26 UIKitCore          0x268a3ec38 UIApplicationmain + 212
27 GameApp            0x100522310 main + 41 (main.mm:41)
28 libdyld.dylib      0x23be498e0 start + 4

以及UnityAppController + Rendering.mm中的一些相关代码段:

64 - (void)repaintDisplayLink
65 {
66 #if ENABLE_DISPLAY_LINK_PAUSING
67     _displayLink.paused = YES;
68 #endif
69     if (!_didResignactive)
70     {
71         [self repaint];
72         [self processTouchEvents];
73     }
74
75 #if ENABLE_DISPLAY_LINK_PAUSING
76     _displayLink.paused = NO;
77 #endif
78 }
267 extern "C" void UnityRepaint()
268 {
269     @autoreleasepool
270     {
271         // this will handle running on metal just fine (nop)
272         EAGLContextSetCurrentAutoRestore autorestore(GetMainDisplaySurface());
273
274         Profiler_FrameStart();
275
276         UnityInputProcess();
277         UnityPlayerLoop();
278
279         Profiler_FrameEnd();
280     }
281 }

我在这里不知所措,您对造成这种情况的原因有何见解?关于如何解决此崩溃的任何想法?

herongxing 回答:如何在[UnityAppController(Rendering)repaintDisplayLink]上解决UnhandledException

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3124851.html

大家都在问