johnno1962 / InjectionApp

Issue Tracking Repo for Injection as an App
MIT License
111 stars 7 forks source link

'Object cannot be nil' after attempting to perform Injection #14

Closed cprovatas closed 7 years ago

cprovatas commented 7 years ago

2017-01-21 15:40:32.366 JK2-AddOn-Template[16826:233784] Injection attempting connection to: 127.0.0.1:31452 2017-01-21 15:40:32.367 JK2-AddOn-Template[16826:233784] Connected to "Injection" plugin, ready to load x86_64 code. Compiling /Users/charltonprovatas/Documents/JK2-AddOn-Template/JK2-AddOn-Template/AddonDetailedViewController.swift objc[16826]: Class _TtC18JK2_AddOn_Template27AddonDetailedViewController is implemented in both /Users/charltonprovatas/Library/Developer/CoreSimulator/Devices/4B7CE95A-ECBC-4174-BD4F-A6A2EC75E72F/data/Containers/Bundle/Application/01431802-97D6-42D3-A421-E1197701A8F7/JK2-AddOn-Template.app/JK2-AddOn-Template (0x108c606a8) and /Users/charltonprovatas/Library/Developer/Xcode/DerivedData/JK2-AddOn-Template-bgwjpelksodsleftjydcodryvglo/Logs/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle (0x11ffd9650). One of the two will be used. Which one is undefined. 2 injections performed so far. 2017-01-21 15:40:33.189 JK2-AddOn-Template[16826:233557] Ignore any warning, Swizzled JK2_AddOn_Template.AddonDetailedViewController 0x11ffd9650 -> 0x108c606a8 2017-01-21 15:40:33.480 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADInterstitialCache sharedInstance] == 0x108b6a7ab() 2017-01-21 15:40:33.481 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADResourceCachesStatus sharedInstance] == 0x108b5eaf3() 2017-01-21 15:40:33.481 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADInAppPurchaseProductCache sharedInstance] == 0x108b32038() 2017-01-21 15:40:33.482 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADSKStoreProductViewControllerDelegate sharedInstance] == 0x108aa5672() 2017-01-21 15:40:33.482 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADScheduledNotification sharedInstance] == 0x108aa3176() 2017-01-21 15:40:33.507612 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer hash] skipping because key is not bound 2017-01-21 15:40:33.507847 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer hash] skipping because no setter with known type was found. 2017-01-21 15:40:33.508079 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer superclass] skipping because key is not bound 2017-01-21 15:40:33.508490 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer superclass] skipping because no setter with known type was found. 2017-01-21 15:40:33.508740 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer description] skipping because key is not bound 2017-01-21 15:40:33.508985 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer description] skipping because no setter with known type was found. 2017-01-21 15:40:33.509299 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer debugDescription] skipping because key is not bound 2017-01-21 15:40:33.509586 JK2-AddOn-Template[16826:233557] [MediaPlayer] -[MPModelStorePlaybackContainer debugDescription] skipping because no setter with known type was found. 2017-01-21 15:40:33.651 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADClickTrackerCollection sharedInstance] == 0x108b0d2a5() 2017-01-21 15:40:33.652 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADCharacterSets sharedInstance] == 0x108abe1f0() 2017-01-21 15:40:33.652 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADClearcut sharedInstance] == 0x108b2ba9d() 2017-01-21 15:40:33.652 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADDefaultInAppPurchaseFlow sharedInstance] == 0x108aa0956() 2017-01-21 15:40:33.656 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADLogger sharedInstance] == 0x108abac2c() 2017-01-21 15:40:33.656 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADLocationService sharedInstance] == 0x108ad3782() 2017-01-21 15:40:33.661 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADMobileAds sharedInstance] == 0x108ada816() 2017-01-21 15:40:33.662 JK2-AddOn-Template[16826:233557] BundleSweeper: +[Answers sharedInstance] == 0x108a7a362() 2017-01-21 15:40:33.662 JK2-AddOn-Template[16826:233557] BundleSweeper: +[Crashlytics sharedInstance] == 0x108a5cbdf() 2017-01-21 15:40:33.663 JK2-AddOn-Template[16826:233557] BundleSweeper: +[GADAnalytics sharedInstance] == 0x108b5b60d() 2017-01-21 15:40:33.664 JK2-AddOn-Template[16826:233557] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSArrayM insertObject:atIndex:]: object cannot be nil' *** First throw call stack: ( 0 CoreFoundation 0x000000010ecb1d4b exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010e05421e objc_exception_throw + 48 2 CoreFoundation 0x000000010ebe275f -[NSArrayM insertObject:atIndex:] + 1375 3 InjectionLoader 0x000000012de8843f +[BundleInjection(Sweeper) sweepSharedInstances] + 383 4 InjectionLoader 0x000000012de8d131 41+[BundleInjection autoLoadedNotify:hook:]_block_invoke_2 + 1425 5 libdispatch.dylib 0x000000010fd56978 _dispatch_call_block_and_release + 12 6 libdispatch.dylib 0x000000010fd800cd _dispatch_client_callout + 8 7 libdispatch.dylib 0x000000010fd608a4 _dispatch_main_queue_callback_4CF + 406 8 CoreFoundation 0x000000010ec75e49 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 9 CoreFoundation 0x000000010ec3b37d __CFRunLoopRun + 2205 10 CoreFoundation 0x000000010ec3a884 CFRunLoopRunSpecific + 420 11 GraphicsServices 0x00000001115b5a6f GSEventRunModal + 161 12 UIKit 0x000000010b1b4c68 UIApplicationMain + 159 13 JK2-AddOn-Template 0x0000000108a37f6f main + 111 14 libdyld.dylib 0x000000010fdcc68d start + 1 15 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

Injection console shows that Bundle loaded successfully

cprovatas commented 7 years ago

Crash is now not happening. I think it was simply because the View Controller was not yet loaded into memory.