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

Segmentation fault in NativeMap$update on Android #2218

Closed
matteblair opened this issue Dec 14, 2020 · 2 comments
Closed

Segmentation fault in NativeMap$update on Android #2218

matteblair opened this issue Dec 14, 2020 · 2 comments

Comments

@matteblair
Copy link
Member

TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:

  • Repeatedly close and re-open an Activity or Fragment containing a MapView.

RESULT:

Sometimes the process will exit with a segmentation fault in NativeMap$update.

EXPECTED RESULT:

The process runs and exits normally.

ENVIRONMENT:

OTHER:

Several stack traces of these segmentation faults have been provided by @tapetis:

SEGV_ACCERR-1.txt
SEGV_ACCESS-2.txt
SEGV_MAPERR-1.txt
SEGV_MAPERR-2.txt
SEGV_MAPERR-3.txt

@matteblair
Copy link
Member Author

Unfortunately, I have been unable to reproduce this so far. However I do believe this is a real bug - there should be no way to configure or use the Tangram Android SDK that produces a segfault.

I currently believe that the problem is a thread-synchronization issue between MapController and MapRenderer that leads to MapRenderer calling native methods after the native map object has been freed. I am basing this on 3 clues:

  • The segfault occurs inconsistently, which is typical of multi-threading issues.
  • It occurs at the start or end of the activity, which is when MapController creates and frees native objects.
  • It occurs on current builds, but not on the 0.13.0 release - after that release I made some big refactors to the way native map objects are handled (Android JNI Refactor #2187, Reduce allocations in JNI invocations #2206)

@matteblair
Copy link
Member Author

I believe this has been resolved by #2223. If this crash is observed again, this issue should be re-opened.

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

No branches or pull requests

1 participant