injectionforxcode
injectionforxcode copied to clipboard
Crash when trying to inject
Hey,
when trying to inject code while running (in XCode 5.0.1) I'm getting an EXC_BAD_ACESS exception within dyldbootstrap::start(..):
Bundle "InjectionBundle2.bundle" loaded successfully.
dyld: lazy symbol binding failed: Symbol not found: _llvm_gcov_init
Referenced from: /Users/svogelsang/Development/work/testproj/iOS/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle
Expected in: flat namespace
dyld: Symbol not found: _llvm_gcov_init
Referenced from: /Users/svogelsang/Development/work/testproj/iOS/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle
Expected in: flat namespace
The console shows:
Using learnt compilation.
real 0m0.000s
user 0m0.000s
sys 0m0.000s
Building iOSInjectionProject/InjectionBundle.xcodeproj
bash ../iOSInjectionProject/i386/compile_commands.sh # xcodebuild -configuration
Debug -arch i386 -sdk iphonesimulator
real 0m0.041s
user 0m0.028s
sys 0m0.012s
real 0m0.211s
user 0m0.043s
sys 0m0.173s
/usr/bin/touch -c „/Users/svogelsang/Development/work/testproj/iOS/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle“
** COMPILE SUCCEEDED **
Renaming bundle so it reloads..
Loading Bundle…
Disconnected from: /Users/svogelsang/Library/Application Support/iPhone Simulator/7.0.3/Applications/D209C980-CF88-4BBE-BAE4-83303C809990/testproj.app/testproj
Connection from: /Users/svogelsang/Library/Application Support/iPhone Simulator/7.0.3/Applications/D209C980-CF88-4BBE-BAE4-83303C809990/testproj.app/testproj i386 (34)
Using learnt compilation.
real 0m0.000s
user 0m0.000s
sys 0m0.000s
Building iOSInjectionProject/InjectionBundle.xcodeproj
bash ../iOSInjectionProject/i386/compile_commands.sh # xcodebuild -configuration
Debug -arch i386 -sdk iphonesimulator
real 0m0.040s
user 0m0.027s
sys 0m0.012s
real 0m0.218s
user 0m0.046s
sys 0m0.178s
/usr/bin/touch -c „/Users/svogelsang/Development/work/testproj/iOS/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle.bundle“
** COMPILE SUCCEEDED **
Renaming bundle so it reloads..
Loading Bundle…
Err.. never come across that before. Do you have a small test project that demonstrates the problem you can send through? Email is in the plugin menu.
phew....problem is that this is a rather large and complex project. I guess that is also the problem here. I'll try to setup a test project and add all my dependencies one by one and then send you the thing once it starts crashing again.
sorry, otherwise I don’t have a lot to go on.. It seems to be something to do with testing: http://stackoverflow.com/questions/566472/where-are-the-gcov-symbols, try editing the bundle project and adding some of the flags they mention. Let me know how you get on.
Hi, I’m closing this now unless you’ve found what the problem is.
I have this same problem.
I think that problem is caused by CLang Code Coverage. As mention in http://stackoverflow.com/questions/19290946/clang-code-coverage-mac-os-x-linker-error the best answer is to add following Linker Flags in InjectionBundle.xcodeproj:
-Wall -fprofile-arcs -ftest-coverage
Thanks Maciej. Sebastian. is there any chance you can verify this works and I’ll push it onto github.
@johnno1962 I'm sorry. I cannot even reproduce my old issue with Xcode 6.1.1. Everything works fine now.
Thanks for letting me know. I’ll leave things as they are for now and leave this open for reference.
Had the same problem. @MaciejGad suggestion worked for me as well.
-Wall -fprofile-arcs -ftest-coverage
Had the same problem,-Wall -fprofile-arcs -ftest-coverage
worked for me. but after the bundle was loaded,all my viewcontrollers was gone.