johnno1962 / InjectionApp

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

Thread EXC_BAD_ACCESS #34

Open amisare opened 6 years ago

amisare commented 6 years ago

wx20171124-113250

xcode error information

stuartro commented 6 years ago

I get the same exception, Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0), inside AppDelegate (of all places)—only periodically, though. Sometimes injection works fine, but occasionally my app crashes. Anything I can tweak in compiler settings, etc. that might help?

stuartro commented 6 years ago

I think I discovered the cause—it appears that injection fails for generic classes. Changing a subclass of a generic base-class to inherit from a non-generic base-class allows injection to succeed. I tested with a very basic generic base-class and the only difference between the two cases is inheritance from a generic base-class or not.

johnno1962 commented 6 years ago

Looks like @amisare’s problem was “Injection" and “Remote” are not a good mix but it is also true injection does not work with Generics at all.