EnjoySR / ESJsonFormat-Xcode

将JSON格式化输出为模型的属性
MIT License
2.13k stars 351 forks source link

Xcode crash #13

Closed caoer closed 9 years ago

caoer commented 9 years ago

似乎和插件有关

UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[NSNull absoluteString]: unrecognized selector sent to instance 0x7fff725b2210
UserInfo: (null)
Hints: None
Backtrace:
  0  0x00007fff86baa024 __exceptionPreprocess (in CoreFoundation)
  1  0x000000010c5fbbb4 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2  0x00007fff83e7276e objc_exception_throw (in libobjc.A.dylib)
  3  0x00007fff86bad0ad -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
  4  0x00007fff86af2e24 ___forwarding___ (in CoreFoundation)
  5  0x00007fff86af2998 _CF_forwarding_prep_0 (in CoreFoundation)
  6  0x0000000117b9f1e5 -[ESJsonFormat notificationLog:] at /Users/xxx/Library/Application Support/Alcatraz/Plug-ins/ESJsonFormat/ESJsonFormat/ESJsonFormat.m:47 (in ESJsonFormat)
  7  0x00007fff86b6645c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation)
  8  0x00007fff86a56634 _CFXNotificationPost (in CoreFoundation)
  9  0x00007fff8c3a99d1 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
 10  0x000000010c5d7918 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] (in DVTFoundation)
 11  0x000000010d78a8c7 -[IDEEditorDocument _sendOutDocumentUpdateLocation] (in IDEKit)
 12  0x00007fff8c3ed41b __NSFireDelayedPerform (in Foundation)
 13  0x00007fff86afd2e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
 14  0x00007fff86afcf73 __CFRunLoopDoTimer (in CoreFoundation)
 15  0x00007fff86b7053d __CFRunLoopDoTimers (in CoreFoundation)
 16  0x00007fff86ab8608 __CFRunLoopRun (in CoreFoundation)
 17  0x00007fff86ab7bd8 CFRunLoopRunSpecific (in CoreFoundation)
 18  0x00007fff86ec756f RunCurrentEventLoopInMode (in HIToolbox)
 19  0x00007fff86ec72ea ReceiveNextEventCommon (in HIToolbox)
 20  0x00007fff86ec712b _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 21  0x00007fff8fc079bb _DPSNextEvent (in AppKit)
 22  0x00007fff8fc06f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
 23  0x000000010cb81aaa -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 24  0x00007fff8fbfcbf3 -[NSApplication run] (in AppKit)
 25  0x00007fff8fb79354 NSApplicationMain (in AppKit)
 26  0x00007fff898d05c9 start (in libdyld.dylib)
 27  0x0000000000000001
caoer commented 9 years ago

这是在refactor 一个变量的时候crash的

caoer commented 9 years ago

把监听切换swift的selector注释掉就不会crash了。 感觉通过这样子的方式检查是不是swift有点暴力啊? 毕竟是全局的notification

EnjoySR commented 9 years ago

我也尝试过其他方法来监听Swift与OC项目切换的方法,但是都有或多或少的问题,这个问题我晚上回去尝试修复。非常感谢你的关注。

EnjoySR commented 9 years ago

已修复。只监听需要监听的通知。监听所有通知是当时开发的时候测试用的,谢谢你的关注

caoer commented 9 years ago

@EnjoySR thank you! btw, 你的名字的SR莫非是 silk road. enjoy silk road.. LOL probably not~~~

EnjoySR commented 9 years ago

嘿嘿,瞎取的呐,我这蹩脚英语想不出来什么好名字呐 :8ball: