-
-
Notifications
You must be signed in to change notification settings - Fork 878
EXC_BAD_ACCESS in BfTask.m #1327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If the issue is in BFTask, you should open it in the Bolts repository most probably. |
Ok. Thanks. I will close this. |
Can you also post The stacktrace here? |
Sure. The stack trace is: MyProject was compiled with optimization - stepping may behave oddly; variables may not be available. thread #5, queue = 'com.parse.asynctaskqueue.sync', stop reason = EXC_BAD_ACCESS (code=2, address=0x117ea8640) |
The formatting is not the best. Hope you can decipher that |
Are you able to share the project somehow? |
I am not able to share the entire project yet, but if you need something like build settings or other such things, I can post them here. |
Or the same project but without the code, just the app delegate? |
You mean the appdelegate.swift file? |
Yeah, if that’s waht causing the issue. That would really help reproducing |
the relevant lines in the AppDelegate.swift file are:
$$$$$$$$$$$$$ of course replaced with real values. |
Do you have an idea if it's a crash that occur without any call to parse or if you can pinpoint a place in your code that makes it crash? |
I just commented out those lines in the AppDelegate.swift file and the code runs successfully. |
So obviously the error is initiated with the call to
The app now runs successfully after commenting out that line, but of course I am not able to use Parse in the app anymore. |
And without optimizations it’s all good? |
Without optimizations (meaning without setting the "Other C flags" equal to "-fembed-bitcode" when building the Bolts framework) the project runs OK on the device. |
How are you importing the parse SDK? Cocoapods m, Carthage or? |
I downloaded the Parse-SDK-iOS-OSX.zip file from here, then I went to the parse directory, ran the git submodule command to pull in all dependencies, then went to Parse.xcodeproj file, opened it in Xcode, set "Other C flags" equal to "-fembed-bitcode" in Build Settings, built the project, then went to the Products folder and located the "Parse.framework" file. I dragged the "Parse.framework" file into my project. I did the same for the ParseUI.xcodeproj and Bolts.xcodeproj. The end result is that I dragged three frameworks compiled with bitcode into my project: Parse.framework |
That’s probably the issue as the sdk’s Are not built with bitcode, therefore there may be some issues when trying to use them this way. |
I had absolutely no problems running my project until I tried to archive it with Xcode, then I got the "invalid bitcode signature" error. I have been trying to solve that problem for weeks. That was what caused me to try to build the frameworks with bitcode, so that I could archive my project. How can I archive my project when the SDKs are not built with bitcode, because even when setting "Enable Bitcode" to NO in my project build settings, cleaning, deleting derived data folder, restarting Xcode etc, I still get the "invalid bitcode signature". Extremely frustrating. |
You told me that removing the embed bitcode flag fixed the crash. One thing for sure, the distributed SDK’s don’t have bitcode. I’m not sure how your project should be configured but on thing is sure, if you want to use bitcode, you should build the SDK’s yourself. I’ll leave it open in case another user has another idea. Otherwise, I can’t help more without a demo project. |
Yes, fixed it for running on device, but not for archiving. I want to submit the app to the app store and this has been holding me back from doing that for almost 4 weeks now. |
I thought that was what I was doing by doing this
How else can I build the Parse, ParseUI and Bolts frameworks from source? |
Ok so you build it yourself.
It's likely that the built framework is missing all the required architectures for the appstore What is the output of:
|
The output of the command is: input file MyProject/Parse.framework/Parse is not a fat file |
That’s likely the issue, your binary is not compiled for armv7 nor armv7s. You should
OTHERWISE:
|
That is strange, because "valid architectures" for the Parse, ParseUI and Bolts build is set to all three (arm64, armv7 and armv7s). Also the error I am getting when trying to archive is "invalid bitcode signature". Can you get that kind of error message from missing architectures in a build? |
It’s not because valid architectures is set to that value means that all architectures are gonna be built. Can you try doing what I suggested, one way or another? Otherwise please come up with a demo project that reproduces the issue. It’s clear that your problem is related to iOS build system and not the SDK |
I followed your second suggestion and everything worked perfectly.
|
This error occurs while running a project incorporating Parse, ParseUI and Bolts frameworks compiled with bitcode on Xcode 9.4.1. The project is being run on device and the launch screen of the app even comes up, and then it crashes with the error in the title.
This is the relevant code snippet
BOOL completed; @synchronized(self.lock) { completed = self.completed; if (!completed) { [self.callbacks addObject:[^{ [executor execute:executionBlock]; } copy]]; } } if (completed) { [executor execute:executionBlock]; }
the exception is being thrown by the line:
[executor execute:executionBlock];
The text was updated successfully, but these errors were encountered: