Build crashes on displayAvailable in xcode - xcode

I am building my app from Unity and have been succesfull before, but now seems to have an issue with this DisplayManager.mm:
- (BOOL)displayAvailable:(UIScreen*)targetScreen;
{
return self[targetScreen] != nil;
}
It crashes my build saying: EXC_BAD_ACCESS (code=1, address=0xc)
on this line: return self[targetScreen] != nil;
I have no idea to do about this... Any help is appreciated :-)
Thanks in advance

You can fix this error by changing the code around line 227 to be this:
_displayConnection = [[NSMapTable
mapTableWithKeyOptions:NSPointerFunctionsStrongMemory | NSPointerFunctionsObjectPointerPersonality
valueOptions:NSPointerFunctionsStrongMemory | NSPointerFunctionsObjectPointerPersonality
] retain];
That's how I fixed for myself, but I think you should first try upgrading Unity, I saw some people having this error fixed recently by downloading the latest version of Unity 4 or 5.
Also, I found out that this error can happen if you are using a recent version of Unity and has disabled ARC.

Related

Throwing error while debug and run PO command in Xcode 12

When I am running application on simulator or device and try to use PO command during debug. Xcode is throwing error instead of printing value. It is happening after I have updated Xcode 12.
error: virtual filesystem overlay file
/all-product-headers.yaml' not found
error: couldn't IRGen expression. Please check the above error messages for possible root causes.
What is the solution for this ?
Any help would be appreciated.
Go to /Users/<YOUR_USER>/Library/Developer/Xcode/ and delete "DerivedData" folder.
If in the path of the missing file is the name of a framework e.g. Usabilla.build/Release-iphonesimulator/Usabilla.build/all-product-headers.yaml
Try using an older version, using version 6.4.7 of Usabilla fixed the issue for me.
If the above fixes don't work, here are some info that might help:
https://steipete.com/posts/couldnt-irgen-expression/

Xcode 11 Beta 5 - Loading a plug-in failed

Opening a SwiftUI "Hello World" unaltered project in Xcode 11 beta 5 running on Catalina beta 4 produces a "Loading a plug-in failed" dialog warning.
Has anyone else experienced this or know how to solve it? I deleted Xcode, redownloaded it, reinstalled it and I'm still getting the same error.
No idea how to fix other than deleting the offending module, but that can't be right.
Error details:
Details
Loading a plug-in failed.
Domain: DVTPlugInErrorDomain
Code: 2
Failure Reason: The plug-in “com.apple.dt.UVKit” at path “/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework” could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged.
Recovery Suggestion: The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled.
User Info: {
DVTPlugInDYLDErrorMessageErrorKey = "dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit, 0): Symbol not found: _$s2IDs12IdentifiablePTl\n Referenced from: /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit\n Expected in: /usr/lib/swift/libswiftCore.dylib\n in /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
DVTPlugInExecutablePathErrorKey = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
DVTPlugInIdentifierErrorKey = "com.apple.dt.UVKit";
NSFilePath = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework";
}
--
The bundle “UVKit” couldn’t be loaded.
Domain: NSCocoaErrorDomain
Code: 3588
Failure Reason: The bundle couldn’t be loaded.
Recovery Suggestion: Try reinstalling the bundle.
User Info: {
NSBundlePath = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework";
NSDebugDescription = "dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit, 265): Symbol not found: _$s2IDs12IdentifiablePTl\n Referenced from: /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit\n Expected in: /usr/lib/swift/libswiftCore.dylib\n in /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
NSFilePath = "/Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework/UVKit";
}
--
I was able to get my SwiftUI project running on Catalina beta 4 with Xcode beta 5. I too got the warning mentioned by OP.
And as mentioned in comments, the only negative impact I've seen is being unable to use the preview canvas. Other than that, everything else in my project is running well. Just using the simulator more ;)
Problem is gone on Catalina build 19A558d when installing Xcode 11 GM Seed (build 11A419c, released September 10, 2019)
this will get rid of the error message but will not bring canvas back.
based on:
https://forums.developer.apple.com/thread/120614
Please go to: /Applications/Xcode-beta.app/Contents/PlugIns/UVKit.framework and delete all the shortcut files in all folders of UVKit.framework (Be sure DONOT delete orginal files).

xcodebuild (XCode 7.1) - unexpected successful exit code from cancelled command

I'm getting the following during the bundle resources copying phase in xcodebuild (XCode 7.1):
2015-11-03 22:16:28.218 xcodebuild[28202:300463] DVTAssertions:
Warning in
/Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-9061/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:739
Details: unexpected successful exit code from cancelled command
<C0505:'CpResource Foo.json':P10> Object: <PBXTargetBuildContext:
0x7faec015a440> Method:
-createCommandInvocationRecordFromInvocation: Thread: <NSThread: 0x7faebc8cc070>{number = 10, name = (null)} Please file a bug at
http://bugreport.apple.com with this warning message and any useful
information you can provide.
I have ~170 items I'm copying, but for some reason a few of them give me this error.
EDIT - I just ran the command again and now it works, so it doesn't seem deterministic.
The issue was a duplicate folder in the Copy Bundle Resources section. It used to be two different files, but they were moved so XCode decided to change them both to the folder they got moved into. Go figure.
Had this issue a couple of months ago. Today that error made it's comback.
I have it only if I try to emulate from ionic (--livereload) on a iOS-Device. Seem like if you have Xcode running it occurs. Close Xcode. That fixes it.

Xcode 7 command failed due to signal: illegal instruction 4

I just used Xcode 7's migration tool to migrate a project from Swift 1.2 to 2. After fixing up errors missed and such, all is well except for an error which prevents me from even building: Command failed due to signal: illegal instruction 4.
I have tried the help in these articles (Xcode 7 and Swift 2.0 : Command failed due to signal: Abort trap: 6, and Command failed due to signal: Abort trap: 6) which are not identical issues to mine, but nevertheless they were not able to fix the issue.
I have cleaned the build and removed the derived data folder. I have up to date CocoaPods installation, Xcode tools are at 7.0, and I Swift compile optimization is at None. Is there anything else I'm missing?
Thanks!
So an answer was found thanks to the help of a coworker. We found the offending file in the build error, but there was no line provided. Through process of elimination, we found it to be a line that was declaring a new constant to the result of getting a JSON dictionary ([String : AnyObject], typealiased to JSONDictionary), from inside an optional dictionary. Here is the line:
let objectsDictionary = maybeJSON?[key] as? JSONDictionary
Changed this to two guard statements:
guard let goodJSON = maybeJSON as? JSONDictionary else { return ... }
guard let objectsDictionary = goodJSON[key] as? JSONDictionary else { return ... }
This line worked in Xcode 6.3.2 as it would just provide an optional value, but for some reason, some change in Xcode 7 didn't like this. I hope this can help anyone else who runs across this.
'Illegal instruction' simply means that your binary contains instructions that are invalid for the type of architecture you are trying to run the code with. Start looking at the minimum version in your project build settings.

1347 errors in iOS SDK 4.1

I had tried to build my iPhone app and got 1347 errors!
What did I do wrong?
You can download a txt file with my errors here:
http://www.mediafire.com/?jlabh2ms21z6r24
Sorry, I had to upload a file, because of limited characters...
Did any one else had the same problem and can help me?
esanits
I had to set "iOS deployment Target" to "3.0"
Q: How do you eat an elephant?
A: One bite at a time.
Your turn: How do you deal with 1347 errors?

Resources