ios - iOS13 崩溃-[UIWindowScene _enumerateWindowsIncludingInternalWindows:onlyVisibleWindows:asCopy:stopped:withBlock:]?
问题描述
自 iOS 13.0 发布以来,我已经在我们的应用程序中看到了很多这种崩溃的发生:
Fatal Exception: NSRangeException
0 CoreFoundation 0x1846cf278 __exceptionPreprocess
1 libobjc.A.dylib 0x1843f80a4 objc_exception_throw
2 Foundation 0x184998480 -[NSConcretePointerArray dealloc]
3 UIKitCore 0x1888da3b8 -[UIWindowScene _enumerateWindowsIncludingInternalWindows:onlyVisibleWindows:asCopy:stopped:withBlock:]
4 UIKitCore 0x1888d9f74 -[UIWindowScene _topVisibleWindowPassingTest:]
5 UIKitCore 0x1886fc4c4 +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:]
6 UIKitCore 0x1886fc854 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:]
7 UIKitCore 0x18873c080 ____updateTouchesWithDigitizerEventAndDetermineIfShouldSend_block_invoke.52
8 UIKitCore 0x18874b738 _UIEventHIDEnumerateChildren
9 UIKitCore 0x18873f8d0 __dispatchPreprocessedEventFromEventQueue
10 UIKitCore 0x188742dc4 __handleEventQueueInternal
11 UIKitCore 0x18873bc38 __handleHIDEventFetcherDrain
12 CoreFoundation 0x18464d090 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
13 CoreFoundation 0x18464cfe8 __CFRunLoopDoSource0
14 CoreFoundation 0x18464c780 __CFRunLoopDoSources0
15 CoreFoundation 0x1846478cc __CFRunLoopRun
16 CoreFoundation 0x18464716c CFRunLoopRunSpecific
17 GraphicsServices 0x18e47f328 GSEventRunModal
18 UIKitCore 0x1886b1d0c UIApplicationMain
19 MyApp 0x100d3ba64 main + 18 (main.swift:18)
20 libdyld.dylib 0x1844d2424 start
它只发生在 iOS 13.0.0 (17A577)
我们没有太多关于导致这种情况的步骤的上下文,我们目前只有堆栈跟踪。
有没有其他人遇到类似的事情?
关于可能导致这种情况的任何想法?
解决方案
strong
参考您创建的UIWindow- 使用
makeKeyAndVisible
而不是设置window.hidden = false
推荐阅读
- ruby-on-rails - Capistrano 不会使用 Bundler 部署 Rails 应用程序
- azure - Azure AAD 应用程序 ObjectId 和 ApplicationId 有什么区别?
- python - 如何按数字顺序导入图像?
- c++ - 围绕原点旋转多边形
- python - 尝试使用 python 和 bs4 从特定 'td' 中抓取所有 'a' 文本
- android - 如何在 API 级别 15 (Android 4.0.3) 上创建 Android (AVD) 模拟器
- python - 在另一个列表中查找包含 5 个连续字符串的单词
- python - 如何使用熊猫系列对条件进行矢量化?
- python - 在 Django 中测试 Url 是否给出 500 错误
- c# - 关闭的表单仍显示在任务栏中