karosLi/KKJSBridge

多次操作h5页面会Crash

lyjappleclub opened this issue · 0 comments

两种hook方式都会这样,我没用你们的webView 用了自定义的

  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3)
    • frame #0: 0x000000018a42f504 libobjc.A.dylibobjc_storeWeak + 200 frame #1: 0x0000000191e093b4 WebKit-[WKScriptMessage _initWithBody:webView:frameInfo:name:] + 132
      frame #2: 0x0000000191fd4474 WebKitScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::FrameInfoData const&, WebCore::SerializedScriptValue&) + 208 frame #3: 0x000000019216b328 WebKitWebKit::WebUserContentControllerProxy::didPostMessage(IPC::Connection&, WTF::ObjectIdentifierWebCore::PageIdentifierType, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&) + 180
      frame #4: 0x000000019236f40c WebKitvoid IPC::callMemberFunctionImpl<WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&), std::__1::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData, unsigned long long, IPC::DataReference>, 0ul, 1ul, 2ul, 3ul>(WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&), IPC::Connection&, std::__1::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData, unsigned long long, IPC::DataReference>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) + 88 frame #5: 0x000000019236eac8 WebKitvoid IPC::handleMessage<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::)(IPC::Connection&, WTF::ObjectIdentifierWebCore::PageIdentifierType, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&)>(IPC::Connection&, IPC::Decoder&, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifierWebCore::PageIdentifierType, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&)) + 104
      frame #6: 0x0000000191e3c880 WebKitIPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 112 frame #7: 0x00000001920a8b68 WebKitWebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 36
      frame #8: 0x0000000191e29638 WebKitIPC::Connection::dispatchMessage(IPC::Decoder&) + 104 frame #9: 0x0000000191e25f88 WebKitIPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_deleteIPC::Decoder >) + 208
      frame #10: 0x0000000191e28d70 WebKitIPC::Connection::dispatchIncomingMessages() + 368 frame #11: 0x0000000199884914 JavaScriptCoreWTF::RunLoop::performWork() + 272
      frame #12: 0x0000000199884be4 JavaScriptCoreWTF::RunLoop::performWork(void*) + 40 frame #13: 0x000000018a678108 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
      frame #14: 0x000000018a67805c CoreFoundation__CFRunLoopDoSource0 + 84 frame #15: 0x000000018a6777c8 CoreFoundation__CFRunLoopDoSources0 + 184
      frame #16: 0x000000018a672694 CoreFoundation__CFRunLoopRun + 1068 frame #17: 0x000000018a671f40 CoreFoundationCFRunLoopRunSpecific + 480
      frame #18: 0x0000000194902534 GraphicsServicesGSEventRunModal + 108 frame #19: 0x000000018e7fd580 UIKitCoreUIApplicationMain + 1940
      frame #20: 0x000000010470e0dcmain(argc=1, argv=0x000000016b727788) at main.m:14:16 frame #21: 0x000000018a4f0e18 libdyld.dylibstart + 4
      (lldb)