robbiehanson/CocoaLumberjack — Issue #24: Crashing in +[DDLog isRegisteredClass] in ARC+Simulator
Author: samkrishna
Created: 2012-02-24 22:00:15+00:00
State: open

Hi,

It *SEEMS* like the method +[DDLog isRegisteredClass] will crash a project when using it with ARC + Simulator.

Environment:
Lion 10.7.3
iOS 5 SDK
Xcode 4.2.1
iPhone 5.0 Simulator

Currently, the method contains a macro #if check that reads:

#if TARGET_OS_IPHONE (near line 307)

For running in the Simulator, it needs to read:

#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR

such that the non-iOS code gets executed.

If the code is allowed to stand, it will trip up on the following classes:

__ARCLite__
__NSGenericDeallocHandler
_NSZombie_
Object
__IncompleteProtocol
NSLeafProxy
Protocol
NSMessageBuilder

which will throw a does not implement "-methodSignatureForSelector" exception on NSInvocation.

Thanks.