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

cmd/ebitenmobile: better way to handle panics instead of converting errors on mobiles #916

Open
hajimehoshi opened this issue Aug 13, 2019 · 8 comments

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Aug 13, 2019

See #800

Now panics are converted to errors, but this is hacky. We should find a better way to handle panic to report to Crashlytics.

https://firebase.google.com/docs/crashlytics/ndk-reports

@hajimehoshi
Copy link
Owner Author

NDK reports did not work well...

http://blog.httrack.com/blog/2013/08/23/catching-posix-signals-on-android/ sounds the last resort?

@hajimehoshi
Copy link
Owner Author

Finally succeeded to get the report! Screenshot from Gyazo

(I tried the crashing version and tried the non-crashing version next, that reported to Crashlytics the last crash.)

The symbols are hidden. I'd need to upload this.

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Aug 21, 2019

Hmm, I wasn't able to find a way to upload symbols in a shared library.

Another way (using CoffeeCatch) didn't work due to compile errors (macro conflicts?). Even they were fixed, there seems a lot of reported issues.

EDIT: xroche/coffeecatch#29 seems critical :-/

@hajimehoshi
Copy link
Owner Author

@hajimehoshi hajimehoshi removed this from the v1.10.0 milestone Oct 5, 2019
@hajimehoshi
Copy link
Owner Author

This issue is not easy to solve.

@hajimehoshi hajimehoshi changed the title mobile: Better way to handle panics instead of converting errors cmd/ebitenmobile: Better way to handle panics instead of converting errors Jul 26, 2020
@hajimehoshi hajimehoshi added this to the v2.1.0 milestone Jul 26, 2020
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Mar 9, 2021

  • When panics happens, there are no guarantees about the state of Go runtime.
  • Usually the panic message is written to write1. There is no obvious way to get the output without modifying the runtime.

So, my vague idea is to use a modified runtime when compiling apps with ebitenmobile. I'm not sure it'd be possible.

@hajimehoshi hajimehoshi modified the milestones: v2.1.0, v2.2.0 Mar 9, 2021
@hajimehoshi hajimehoshi modified the milestones: v2.2.0, v2.3.0 Sep 10, 2021
@hajimehoshi hajimehoshi removed this from the v2.3.0 milestone Feb 5, 2022
@hajimehoshi hajimehoshi changed the title cmd/ebitenmobile: Better way to handle panics instead of converting errors cmd/ebitenmobile: better way to handle panics instead of converting errors on mobiles Nov 11, 2022
@hajimehoshi
Copy link
Owner Author

So, my vague idea is to use a modified runtime when compiling apps with ebitenmobile. I'm not sure it'd be possible.

It's possible with -overlay.

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