Skip navigation.
 
ml"could not load inserted library" (DevToolsBundleInjection.framework): why not?
FROM : Mason Mark
DATE : Wed Nov 01 05:42:11 2006

Hello,

I am having one of those moments where a process I've done dozens of 
times mysteriously stops working. I hope somebody can point me in the 
right direction.

The problem: an Xcode 2.4 project (starting with Core Data document-
based template) refuses to let me debug my unit tests. I get a 
complaint from dyld (1, below) and a crash log (2, below).

Xcode runs the tests when I build the test bundle, no problems. But 
when I try to debug the test that is failing, I get rejected as 
described above.

The steps I took to debug the tests are the same as always:

1. Create a custom executable, with the same path as my regular app. 
(Verified that it launches without the special test-injection voodoo, 
so the path is not wrong.)

2. In my custom executable's inspector in Xcode, I added the args "-
SenTest All" and these two environment variables, with the values 
shown below them:

    DYLD_INSERT_LIBRARIES
      $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/
DevToolsBundleInjection.framework

    XCInjectBundle
      $(BUILT_PRODUCTS_DIR)/MakuhariUnitTests.octest

(I did confirm both those evaulate to the correct, existent paths.)

3. Press Run in Xcode. Blammo, it crashes.

4. Clean All (dependencies included), Rebuild, try again

5. Just for fun, quit Xcode, rebooted the Mac, and re-did the above 
steps. Same result, though.

6. Just to see if it would really crash, I disabled the extra arg and 
the XCInjectBundle environment variable: still crashed. So the only 
thing needed to make this thing crash is to add the 
DYLD_INSERT_LIBRARIES environment variable with the value $
(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/
DevToolsBundleInjection.framework, but that is the exact same value 
that I always use (sucessfully in other projects).

7. Downloaded and installed Xcode 2.4.1, but alas, no change...

Now, I have pored over the project for the better part of an hour, 
and I just cannot find anything to make this different than the 
several other Xcode projects on this Mac for which debugging unit 
tests works fine. The only difference I can see is that none of the 
others were Core Data document-based apps, but that should not matter...

What could I be missing that would cause an error loading 
DevToolsBundleInjection.framework for this project? Some kind of 
weird build setting or something? I am back to caveman debugging with 
NSLog() until I get some kind of clue...

Thanks,
--
Mason Mark
Five Speed Software, Inc.



----- [1] here's the output when I run the custom executable -----

[Session started at 2006-10-31 22:55:33 -0500.]
dyld: could not load inserted library: /System/Library/
PrivateFrameworks/DevToolsBundleInjection.framework


RunUnitTests has exited due to signal 5 (SIGTRAP).

----- end -----



----- [2] Here's the crash log generated -----
Host Name:      MacBook-Pro
Date/Time:      2006-10-31 22:55:33.604 -0500
OS Version:    10.4.8 (Build 8L2127)
Report Version: 4

Command: Navcast
Path:    /Build/Debug/Navcast.app/Contents/MacOS/Navcast
Parent:  Xcode [248]

Version: 1.1 (1)

PID:    504
Thread: Unknown

Link (dyld) error:

could not load inserted library: /System/Library/PrivateFrameworks/
DevToolsBundleInjection.framework

----- end -----

Related mailsAuthorDate
ml"could not load inserted library" (DevToolsBundleInjection.framework): why not? Mason Mark Nov 1, 05:42
mlRe: "could not load inserted library" (DevToolsBundleInjection.framework): why not? Chris Hanson Nov 1, 06:03
mlRe: "could not load inserted library" (DevToolsBundleInjection.framework): why not? Mason Mark Nov 1, 06:22