Skip to content
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

[Known Issue] Native methods throwing Objective-C exceptions crash on Simulator when called from JavaScript #1044

Open
mbektchiev opened this issue Dec 28, 2018 · 0 comments

Comments

@mbektchiev
Copy link
Contributor

mbektchiev commented Dec 28, 2018

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • iOS Runtime: 5.2.0-2018-12-28-111556-01

Describe the bug
App crashes when calling a native function which throws an Objective-C exception from JavaScript, because of libffi's missing support for stack unwinding on iOS Simulator.

To Reproduce
Execute an app containing the following code on a Simulator:

try { 
  NSArray.alloc().init().objectAtIndex(3);
} catch (e) {
  console.log("Caught error: ", e);
}

=> app crashes

Expected behavior
The exception should be caught and logged and program execution should continue. It works as expected on actual devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant