injectionforxcode icon indicating copy to clipboard operation
injectionforxcode copied to clipboard

EXC_BAD_ACCESS in my app

Open vbonluk opened this issue 8 years ago • 13 comments

I just add method

  • (void)injected { NSLog(@"I've been injected: %@", self); } in my any class. then it crash in if ( [subObject respondsToSelector:@selector(bsweep)] )

and showing EXC_BAD_ACCESS;

my viewcontroller is build for xib.

please help ~

vbonluk avatar Mar 08 '16 09:03 vbonluk

The -injected method is the soft underbelly of injection, particularly so for swift, as it has to “sweep” all instances in your app to find the instances of the injecting class. There must be an instance variable it is mistaking for an object. There are only two ways to debug this. If it is posibble can you send the project through to [email protected] or we can TeamView to track this down as it may be affecting othe people. Is this Xcode 7.2.1 or 7.3b*?

johnno1962 avatar Mar 08 '16 14:03 johnno1962

It is Xcode 7.2.1 . And maybe we can TeamView to track this down. How can I

vbonluk avatar Mar 09 '16 01:03 vbonluk

Do you have TeamViewer app? http://www.teamviewer.com/en/

johnno1962 avatar Mar 09 '16 01:03 johnno1962

yes and where I send the id and password for you ?

vbonluk avatar Mar 09 '16 01:03 vbonluk

injection at johnholdsworth.com

johnno1962 avatar Mar 09 '16 01:03 johnno1962

ok

vbonluk avatar Mar 09 '16 01:03 vbonluk

I have already sent , do you receive it ?

vbonluk avatar Mar 09 '16 01:03 vbonluk

Could this be to do with using “-injected” with non-ARC code?

johnno1962 avatar Mar 11 '16 19:03 johnno1962

Unfortunately, until now I can't run it with -injected 。I desire to use 。。。 but。。。

vbonluk avatar Mar 14 '16 03:03 vbonluk

Is there any method to fix my problem?

vbonluk avatar Mar 14 '16 06:03 vbonluk

Without ARC you can only use the “INJECTION_BUNDLE_NOTIFICATION” notification.

johnno1962 avatar Mar 14 '16 12:03 johnno1962

[[NSNotificationCenter defaultCenter] postNotificationName:@"INJECTION_BUNDLE_NOTIFICATION" object:nil];

I also can't injection 😭

vbonluk avatar Mar 16 '16 03:03 vbonluk

Eh? Injection posts the notification, you shouldn’t be posting it. Have a carefuly look at orta’s original video about injection here: http://artsy.github.io/blog/2016/03/05/iOS-Code-Injection/

johnno1962 avatar Mar 16 '16 13:03 johnno1962