jverify-flutter-plugin icon indicating copy to clipboard operation
jverify-flutter-plugin copied to clipboard

-[_UIConcretePasteboard items] 剪切板崩溃

Open Huanhoo opened this issue 5 years ago • 2 comments

目前发现一个偶现崩溃,看起来像是极光SDK的崩溃。堆栈如下:

#1 Thread
SIGSEGV
SEGV_ACCERR

0 libobjc.A.dylib | objc_retain + 16
-- | --
1 UIKitCore | __UISecurelyDecodePasteboardDataToObject + 132
2 UIKitCore | ___30-[_UIConcretePasteboard items]_block_invoke + 276
3 libdispatch.dylib | __dispatch_call_block_and_release + 24
4 libdispatch.dylib | __dispatch_client_callout + 16
5 libdispatch.dylib | __dispatch_lane_serial_drain$VARIANT$mp + 608
6 libdispatch.dylib | __dispatch_lane_invoke$VARIANT$mp + 416
7 libdispatch.dylib | __dispatch_workloop_worker_thread + 588
8 libsystem_pthread.dylib | _pthread_wqthread + 272

子线程的崩溃,看起来是使用剪切板数据的时候崩的,都是系统堆栈,但是我同时发现了下边这条堆栈消息:

#18 org.hxhg.jiguang.thread

0 libsystem_kernel.dylib | 0x00000001846ad1d4 semaphore_wait_trap
-- | --
1 libdispatch.dylib | 0x0000000184545c90 __dispatch_sema4_wait$VARIANT$mp
2 libdispatch.dylib | 0x00000001845462e8 __dispatch_semaphore_wait_slow
3 UIKitCore | 0x00000001888aba54 -[_UIConcretePasteboard items]
4 xxx | 0x0000000104694a44 +[JCOREPasteInfo objectForName:on:] (JCOREPasteInfo.m:0)
5 xxx | 0x000000010469511c +[JCOREPasteInfo generalDevicePidInfo] (JCOREPasteInfo.m:0)
6 xxx | 0x000000010469c5f4 +[JCOREUtilities devicePID:] (JCOREUtilities.m:0)
7 xxx | 0x000000010469c334 +[JCOREUtilities deviceID:] (JCOREUtilities.m:143)
8 xxx | 0x000000010467ecd8 -[JCORELogin bodyData] (JCORELogin.m:0)
9 xxx | 0x0000000104685640 -[JCORETcpChannelController requestData:] (JCORETcpChannelController.m:259)
10 xxx | 0x000000010468533c -[JCORETcpChannelController doSendTcpRequest:] (JCORETcpChannelController.m:0)
11 xxx | 0x0000000104685100 -[JCORETcpChannelController sendTcpData:] (JCORETcpChannelController.m:216)
12 xxx | 0x00000001046a209c -[JCORENetChannel send:] (JCORENetChannel.m:0)
13 Foundation | 0x0000000184cc3b28 ___NSThreadPerformPerform
14 CoreFoundation | 0x0000000184857b64 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
15 CoreFoundation | 0x0000000184857abc ___CFRunLoopDoSource0
16 CoreFoundation | 0x0000000184857244 ___CFRunLoopDoSources0
17 CoreFoundation | 0x0000000184852274 ___CFRunLoopRun
18 CoreFoundation | 0x0000000184851c34 CFRunLoopRunSpecific
19 Foundation | 0x0000000184b94bcc -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
20 Foundation | 0x0000000184bcdfe0 -[NSRunLoop(NSRunLoop) run]
21 xxx | 0x000000010466cbe0 +[JCOREQueueManager threadEntryPoint:] (JCOREQueueManager.m:33)
22 Foundation | 0x0000000184cc39d0 ___NSThread__start__
23 libsystem_pthread.dylib | 0x00000001845efd98 _pthread_start

这里是极光的代码,并且从调用堆栈上看来是和 -[_UIConcretePasteboard items] 连起来了,推测是线程切换的时候崩溃的

bugly 的跟踪日志里还有一条:

05-11 13:50:25.919 60192 - I BLYLog: 2020/05/11 13:50:25.920 [E] 60192:2 !crash:'UIImage' unrecongized selector 'encodedData' -[NSObject(XXUnrecongizedSelectorCatch) xx_forwardInvocation:] NSObject+XXUnrecongizedSelectorCatch.m(47)

不知道是不是剪切板里包含了非字符串数据后导致的崩溃,此崩溃偶现

Huanhoo avatar May 11 '20 07:05 Huanhoo

升级iOS JCore 版本到最新版本

hyhSuper avatar May 19 '20 09:05 hyhSuper

……升级也不好使 大佬们速度解决吧,顺便注意下有没有在子线程调UIKit 的剪切板函数

Huanhoo avatar Jun 01 '20 06:06 Huanhoo