{"action":"created","issue":{"url":"https://api.github.com/repos/bang590/JSPatch/issues/677","repository_url":"https://api.github.com/repos/bang590/JSPatch","labels_url":"https://api.github.com/repos/bang590/JSPatch/issues/677/labels{/name}","comments_url":"https://api.github.com/repos/bang590/JSPatch/issues/677/comments","events_url":"https://api.github.com/repos/bang590/JSPatch/issues/677/events","html_url":"https://github.com/bang590/JSPatch/issues/677","id":197527380,"number":677,"title":"JSPatch在iOS7、iOS8下偶现崩溃","user":{"login":"GarfieldGitHub","id":8564299,"avatar_url":"https://avatars.githubusercontent.com/u/8564299?v=3","gravatar_id":"","url":"https://api.github.com/users/GarfieldGitHub","html_url":"https://github.com/GarfieldGitHub","followers_url":"https://api.github.com/users/GarfieldGitHub/followers","following_url":"https://api.github.com/users/GarfieldGitHub/following{/other_user}","gists_url":"https://api.github.com/users/GarfieldGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/GarfieldGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GarfieldGitHub/subscriptions","organizations_url":"https://api.github.com/users/GarfieldGitHub/orgs","repos_url":"https://api.github.com/users/GarfieldGitHub/repos","events_url":"https://api.github.com/users/GarfieldGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/GarfieldGitHub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-26T02:52:55Z","updated_at":"2016-12-27T03:40:17Z","closed_at":null,"body":"这是我们的js脚本：\r\n\r\nrequire('NSUserDefaults');\r\ndefineClass('ZSConfigUtil', {}, {\r\n    usingHttps: function() {\r\n        if (!NSUserDefaults.standardUserDefaults().objectForKey(\"using_https\")) {\r\n            NSUserDefaults.standardUserDefaults().setBool_forKey(NO, \"using_https\");\r\n            NSUserDefaults.standardUserDefaults().synchronize();\r\n            return NO;\r\n        }\r\n        return NSUserDefaults.standardUserDefaults().boolForKey(\"using_https\");\r\n    },\r\n});\r\n\r\n这是崩溃日志：\r\n\r\n\r\n#0 Thread\r\nSIGSEGV\r\nSEGV_ACCERR\r\n解析原始\r\n}\r\n0 JavaScriptCore\tWTFCrash + 53\r\n1 JavaScriptCore\tWTFPrintBacktrace + 130\r\n2 JavaScriptCore\tJSC::MachineThreads::gatherFromOtherThread(JSC::ConservativeRoots&, JSC::MachineThreads::Thread*, JSC::JITStubRoutineSet&, JSC::CodeBlockSet&) + 139\r\n3 JavaScriptCore\tJSC::MachineThreads::gatherConservativeRoots(JSC::ConservativeRoots&, JSC::JITStubRoutineSet&, JSC::CodeBlockSet&, void*) + 97\r\n4 JavaScriptCore\tJSC::Heap::markRoots(double) + 313\r\n5 JavaScriptCore\tJSC::Heap::collect(JSC::HeapOperation) + 302\r\n6 JavaScriptCore\tJSC::MarkedAllocator::allocateSlowCase(unsigned long) + 202\r\n7 JavaScriptCore\t_llint_slow_path_new_func_exp + 225\r\n8 JavaScriptCore\t_llint_entry + 20031\r\n9 JavaScriptCore\t_llint_entry + 20201\r\n10 JavaScriptCore\t_llint_entry + 20677\r\n11 JavaScriptCore\t_callToJavaScript + 335\r\n12 JavaScriptCore\tJSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 37\r\n13 JavaScriptCore\tJSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 351\r\n14 JavaScriptCore\tJSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 62\r\n15 JavaScriptCore\tJSObjectCallAsFunction + 306\r\n16 JavaScriptCore\t-[JSValue callWithArguments:] + 269\r\n17 YouShaQi\tJPForwardInvocation (JPEngine.m:835)\r\n18 CoreFoundation\t____forwarding___ + 355\r\n19 CoreFoundation\t_CF_forwarding_prep_0 + 24\r\n20 YouShaQi\t+[CustomUrlUtils getGlobalImageUrlPre] (CustomUrlUtils.m:31)\r\n21 YouShaQi\t+[CustomImageUtils setImageUrlWithCustomPre:imageUrlStr:imageType:imageSize:] (CustomImageUtils.m:92)\r\n22 YouShaQi\t-[BookDetailViewController createBookInfoView] (BookDetailViewController.m:281)\r\n23 YouShaQi\t-[BookDetailViewController updateBookDetailData:] (BookDetailViewController.m:251)\r\n24 YouShaQi\t__50-[BookDetailViewController startDetailDataRequest]_block_invoke (BookDetailViewController.m:224)\r\n25 YouShaQi\t__55+[CustomRequestUtils createNewRequest:success:failure:]_block_invoke (CustomRequestUtils.m:74)\r\n26 libdispatch.dylib\t__dispatch_call_block_and_release + 11\r\n27 libdispatch.dylib\t__dispatch_client_callout + 23\r\n28 libdispatch.dylib\t_dispatch_main_queue_callback_4CF + 718\r\n29 CoreFoundation\t___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\r\n30 CoreFoundation\t___CFRunLoopRun + 1513\r\n31 CoreFoundation\tCFRunLoopRunSpecific + 476\r\n32 CoreFoundation\tCFRunLoopRunInMode + 106\r\n33 GraphicsServices\tGSEventRunModal + 136\r\n34 UIKit\tUIApplicationMain + 1440\r\n35 YouShaQi\tmain (main.m:16)\r\n\r\n我已经检查过，被替换的方法，所有的调用都是在主线程进行的。"},"comment":{"url":"https://api.github.com/repos/bang590/JSPatch/issues/comments/269265019","html_url":"https://github.com/bang590/JSPatch/issues/677#issuecomment-269265019","issue_url":"https://api.github.com/repos/bang590/JSPatch/issues/677","id":269265019,"user":{"login":"bang590","id":329480,"avatar_url":"https://avatars.githubusercontent.com/u/329480?v=3","gravatar_id":"","url":"https://api.github.com/users/bang590","html_url":"https://github.com/bang590","followers_url":"https://api.github.com/users/bang590/followers","following_url":"https://api.github.com/users/bang590/following{/other_user}","gists_url":"https://api.github.com/users/bang590/gists{/gist_id}","starred_url":"https://api.github.com/users/bang590/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bang590/subscriptions","organizations_url":"https://api.github.com/users/bang590/orgs","repos_url":"https://api.github.com/users/bang590/repos","events_url":"https://api.github.com/users/bang590/events{/privacy}","received_events_url":"https://api.github.com/users/bang590/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T03:40:17Z","updated_at":"2016-12-27T03:40:17Z","body":"可能用 `return require('NSNumber').numberWithBool(NO);` 就没问题？原因待查"}}
{"actor":{"display_login":"bang590"}}