-
Notifications
You must be signed in to change notification settings - Fork 95
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
EXC BAD ACCESS Error on startup on device but not on simulator #36
Comments
Just a quick question what type of device? (arm64 or armv7?) If you're not sure just say model. Haven't seen this before no On Thursday, 28 April 2016, Kenzi Trader [email protected] wrote:
|
It's an iPhone 6 plus, so I geuss arm64. |
Yeah that would be arm64. Okay so I think I see the problem, the reason the simulator doesn't crash is for some reason your Xcode project is using a system installed version of boost (and likely the simulator one can handle the data type difference of potentially an older boost version) Here is the clue '''&) at /Users/.../Frameworks/boost.framework/Headers/math/special_functions/erf.hpp''' So when compiling for arm it is very sensetive to types, so likely the cause of the crash. What you should check is how you have included the ofxiOSBoost library and make sure it is linked correctly, if it is then Xcode should look no further than the local include. If it still is occurring try and Uninstall and system level boost (usually installed by bootstrap or similiar) |
I tried it on an iPhone 5 which is armv7 and had the same result. I removed the boost library on my Mac to make sure the linked version is used. I also print out the BOOST_VERSION macro to be sure to have the right library version. On the simulator everything runs fine. This makes me think this is the infamous C++ static initialization order fiasco. A similar problem was reported here: http://stackoverflow.com/questions/28553143/exc-bad-access-error-building-quantlib-c-program-on-xcode but the solution doesn't work for me. Also there is no explanation what could be causing the problem to help me in the right direction. |
I include ofxiOSBoost in my Xcode project. I also include QuantLib 1.6 from http://iphonesdkdev.blogspot.nl/2015/06/quantlib-16-framework-for-ios-and-mac.html. The project uses c++11 with libc++.
On the simulator the app runs without problems. On a real device it crashes with a EXC_BAD_ACCESS on startup. The stack trace is
It fails when initializing the static vars in the erf.hpp file.
Has anybody any idea how to solve this?
The text was updated successfully, but these errors were encountered: