Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Crash MapView#onStop() was not called. #9182

Closed
MateusCarvalho opened this issue Jun 4, 2017 · 1 comment · Fixed by #9191
Closed

Crash MapView#onStop() was not called. #9182

MateusCarvalho opened this issue Jun 4, 2017 · 1 comment · Fixed by #9191
Labels
Android Mapbox Maps SDK for Android crash

Comments

@MateusCarvalho
Copy link

MateusCarvalho commented Jun 4, 2017

Hello, I'm using a MapView in an activity and I've implemented all of the Mapview lifecycle methods in the activity, but I still get this error:

Fatal Exception: java.lang.RuntimeException: Unable to destroy activity {com.app / com.MainActivity}: java.lang.IllegalStateException: MapView # onStop () was not called. You must call this method from the parent's {@link Activity # onStop ()} or {@link Fragment # onStop ()}.

The strange thing is that I am not using a fragment, but an activity.

Android API Version: 24
Mapbox Version: 5.0.2
Version of MapboxServices: 2.0.1

@LukasPaczos
Copy link
Member

I had this same exception thrown at me as recent as v5.1.0-beta.3.

I'm not able to reproduce it every time, but I noticed it happened when I pushed activity containing map to background, then resumed it and tried to back up and kill it, then it crashed.

The strange thing is that I am not using a fragment, but an activity.

Exception message is only a tip that you should call MapView # onStop () in the right lifecycle block, either Activity's or Fragment's, depending on your use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants