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

[iOS - iPad] App crashes if video transcoding is interrupted #545

Open
3 tasks done
guillem-sopra opened this issue Jan 13, 2020 · 0 comments · May be fixed by #549
Open
3 tasks done

[iOS - iPad] App crashes if video transcoding is interrupted #545

guillem-sopra opened this issue Jan 13, 2020 · 0 comments · May be fixed by #549

Comments

@guillem-sopra
Copy link

guillem-sopra commented Jan 13, 2020

Bug Report

Problem

In iOS, when one selects a video from the gallery, a transcoding/compression process must be carried out. In iPhone one cannot interrupt or cancel this process, but in iPad you do: since the gallery navigation appears inside a pop-up, you can click anywhere outside the pop-up or the back button. If you do so, the app crashes.

What is expected to happen?

The transcoding process is interrupted, an exception is captured and properly emitted in js.

What does actually happen?

The app crashes becasue of an uncaptured exception happens in the native code:

2020-01-13 18:07:44.521068+0100 MyApp[1556:320750] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager copyItemAtPath:toPath:options:error:]: source path is nil'
*** First throw call stack:
(0x1c239bea0 0x1c156da40 0x1c22a2674 0x1c2d813fc 0x10090f1dc 0x10090f9c0 0x10090f5f8 0x1ee8ee30c 0x1ee8edc00 0x101c03824 0x101c04dc8 0x101c12a78 0x1c232bdd0 0x1c2326c98 0x1c23261cc 0x1c459d584 0x1eef65054 0x1009080e4 0x1c1de6bb4)
libc++abi.dylib: terminating with uncaught exception of type NSException

Information

Tested in iOS 12 and 13.

Command or Code

The app crashes and the catch is never reached:

fileUri = await this.camera.getPicture(options).then((fileURI) => {
      console.log(fileURI);
      return fileURI;
    }).catch((error) => {
    console.error(error)
  });

Environment, Platform, Device

iPad, iOS versions 12 and 13.

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants