"Instruments cannot be opened because of a problem" (xcode4) - macos

I'm trying to profile an app using Instruments, but every time I try to run I get a generic error message saying "Instruments cannot be opened because of a problem". The exact same thing happens if I try to start Instruments manually outside of XCode.
If I try starting Instruments from the command-line, I get the following error details:
dyld: lazy symbol binding failed: Symbol not found:
_CSSymbolicatorCreateWithMachKernel Referenced from:
/Developer/Applications/Instruments.app/Contents/MacOS/../../../../Library/PrivateFrameworks//InstrumentsPlugIn.framework/Versions/A/InstrumentsPlugIn
Expected in:
/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
dyld: Symbol not found: _CSSymbolicatorCreateWithMachKernel
Referenced from:
/Developer/Applications/Instruments.app/Contents/MacOS/../../../../Library/PrivateFrameworks//InstrumentsPlugIn.framework/Versions/A/InstrumentsPlugIn
Expected in:
/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
I just installed all of the available software updates, and it made no difference. Any suggestions on how to fix this?

Okay, I found a workaround that is a bit simpler than reinstalling all of XCode. Basically I got another developer with a working copy of XCode/Instruments to send me a copy of their /System/Library/PrivateFrameworks/CoreSymbolication.framework file/folder.
Then I moved my local copy of CoreSymbolication.framework out of the way and dropped their version in.
After that everything works correctly. And it's quite a bit faster than uninstalling and reinstalling XCode.

Related

Error exporting Xcode archive since version 13.2.1

We have been getting an error in exporting an archive since the release of Xcode 13.2.1, and are also seeing it in 13.3. (13.1 works great)
The error is:
Reached end of file while looking for: Mach-O slice.
I get this when exporting on our jenkins/fastlane server as well on my development machine.
Curious if anyone has found a solution for this?
It can be an internal issue with malformed library files, try to reload it.
You can try: export_xcargs: "-allowProvisioningUpdates"

Xcode - dyld: Library not loaded error

I'm new to MAC and Xcode since I'm a Windows user and I'm really lost. I finally managed to port my game from Windows to MAC and it works in simulator and all but when I launch the executable I get the next error.
dyld: Library not loaded: /opt/local/lib/libSOIL.dylib
Referenced from: /Users/myUser/Documents/Cotc/CourierOfTheCrypts/DerivedData/CourierOfTheCrypts/Build/Products/Release/CourierOfTheCrypts
Reason: image not found
Trace/BPT trap: 5
logout
I've read a lot of topics about the error but I still don't have a clue about it and how to solve it. All the libraries are copied to the executable folder.
If you need more information please let me know, every bit of help is more than welcome!
EDIT: It turns out /opt/... folder does't exist at all...
The solution to my problem is, to execute the following script for each library:
install_name_tool -id #executable_path/libSOIL.dylib "$CONFIGURATION_BUILD_DIR/libSOIL.dylib"
You enter the script in TARGET settings -> RunScript

Xcode tests fail due to missing library in test bundle

Using Xcode 7.3, Cocoapods 0.39.0
At some point in the recent past, perhaps due to an upgrade of Xcode and/or Cocoapods, our tests stopped working with the following runtime issue:
2016-04-18 16:32:55.318 MyApp[15066:9003314] Failed to load test bundle
from file:///<huge filepath to .xctest wrapper>: Error Domain=NSCocoaErrorDomain
Code=3587 "dlopen_preflight(<same huge filepath to .xctest wrapper>): Library not
loaded: #rpath/Nocilla.framework/Nocilla
Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged
or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the
bundle., NSFilePath=<huge filepath to .xctest wrapper>, NSDebugDescription=
dlopen_preflight(<huge filepath to .xctest wrapper>): Library not loaded:
#rpath/Nocilla.framework/Nocilla
I don't know anything like enough about Xcode and test bundle internals to debug this.
How do I restore my tests to working order? Thank you.
Edit: The only way I was able to unblock my work was to remove Nocilla. Fortunately, I discovered it wasn't actually used for anything. We just as well could have relied on it, however, so the question stands.

dyld : Library not loaded - How to make xcode look for library in a path

I am attempting to run my xcode project and I get this error:
dyld: Library not loaded: libosgd.130.dylib
Referenced from: /Users/raj/MyApp-Build-XCODE/bin/Debug/MyApp2.app/Contents/MacOS/Myapp2
Reason: image not found
My project .xcodeproj was created using CMake. I know where this library is present. How can I tell xcode to look for it in a specific path.I am fairly new to xcode 7.Here is what I tried.
I went into the build settings of the project.Expanded "Linking". Then expanded "RunPath Search Paths". Then inside the debug row underneath my project column added the path to the library such as
~/Mypaths/lib/
However I am stilling getting this error when I run project. Any suggestions ?
I faced this problem while I was using Alamofire library
The following step solved it for me:

OBD-II Simulator on OS-X

Has somebody installed OBD-II simulator on mac? I tried downloading it from this site - http://icculus.org/obdgpslogger/obdsim.html for OS-X.
After installation and opening ObdGPSLogger, I can see GPS logger window and different parameter gauges. However, after selecting Logfile, and device there is nothing happening.
In the Raw output, below is the error displayed under StdErr:
Dyld: Library not loaded: /Users/chunky/gpsd//lib/libgps.18.dylib
Referenced from: /Applications/OBD GPS Logger.app/Contents/Resources/bin/obdgpslogger
Reason: image not found
Let me know if you guys know the cause
I had the same issue here, but I got it working on a Mac downloading the obdgpslogger-0.16.tar.gz version (in the Tarball section) from this link.
You need to navigate to the downloaded folder and then run the commands:
mkdir build
cd build
cmake ..
make
make install # optional

Resources