-
Notifications
You must be signed in to change notification settings - Fork 577
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
Remove calls to JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions() #73
Comments
Do you have the crash report / stack trace of the crash you see without the call to |
Thanks. I'm not sure it's inherently related to C++ lambdas. On OS X 10.11.1, a test program that uses |
@bdash you're right. It's actually crashing on the last element of the trace, which is the return address for |
Just an update: |
It's definitely fixed if I run everything inside my own thread, which will be fine for this purpose, but I'd still really like to understand what the issue is with |
Update: since upgrading to Xcode 7.1, this crash no longer seems to happen on the main thread in the iOS 9.1 simulator (thanks @bdash). However, I have seen this crash occur on other threads unrelated to JavaScriptCore, such as when I need to test this on a device running 9.0.x (not 9.1) to see if it's an issue there before deciding to remove calls to |
It gets called inside
RealmRPC.mm
andRealmReactTests.m
to prevent crashes. The issue is that calls toJSObjectCallAsFunction
(and others) that result in an exception will in turn make JavaScriptCore want to create a stack trace that includes native functions.My current theory is that JavaScriptCore doesn't correctly handle C++ lambdas (and might be fixed in the RPC server by switching to regular functions when migrating to pure C++ – see #72), though it may instead be caused by something else pertaining to how we link together our framework.
The text was updated successfully, but these errors were encountered: