0
我使用自定義UIScrollView呈現PDF文檔,但最近這已使應用程序隨機崩潰 - 有時在渲染PDF後有時崩潰,有時在解散其中的此自定義ScrollView的UIViewController一個子視圖。我無法針對這次事故做出具體的模式。需要幫助確定崩潰或任何解決方法建議。使用CGPDFDocument呈現PDF的自定義ScrollView隨機崩潰應用程序
critical: Stacktrace:
critical: at <unknown> <0xffffffff>
critical: at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (intptr,intptr,intptr) <0x00012>
critical: at CoreAnimation.CALayerDelegate.Dispose (bool) [0x00015] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/CoreAnimation/CALayerDelegate.cs:47
critical: at Foundation.NSObject.Finalize() [0x00000] in /Users/builder/data/lanes/4991/80b8487d/source/xamarin-macios/src/Foundation/NSObject2.cs:129
critical: at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) [0x0001f] in <75fdc35757ef4b00a24457129d1dc3e2>:0
critical:
Native stacktrace:
critical: 0 myappname 0x00533b6f mono_handle_native_crash + 239
critical: 1 myappname 0x0053ff25 mono_sigsegv_signal_handler + 293
critical: 2 libsystem_platform.dylib 0x0d4e2e5b _sigtramp + 43
critical: 3 ??? 0xffffffff 0x0 + 4294967295
critical: 4 myappname 0x006fccfb xamarin_dyn_objc_msgSend + 43
critical: 5 ??? 0x23b0cdd8 0x0 + 598789592
critical: 6 ??? 0x28ba4e5c 0x0 + 683298396
critical: 7 ??? 0x22a23b08 0x0 + 581057288
critical: 8 ??? 0x22a23091 0x0 + 581054609
critical: 9 myappname 0x005afbec mono_gc_run_finalize + 812
critical: 10 myappname 0x006203f3 sgen_client_run_finalize + 19
critical: 11 myappname 0x006889e9 sgen_gc_invoke_finalizers + 249
critical: 12 myappname 0x005b179a finalizer_thread + 762
critical: 13 myappname 0x0064e4f5 start_wrapper + 661
critical: 14 libsystem_pthread.dylib 0x0d4f3047 _pthread_body + 184
critical: 15 libsystem_pthread.dylib 0x0d4f2f8f _pthread_body + 0
critical: 16 libsystem_pthread.dylib 0x0d4f284a thread_start + 34
critical:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
這似乎是內存訪問錯誤,你能分享你如何使用CGPDFDocument代碼? –