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

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

Closed

Description

@MateusCarvalho

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

Activity

  1. LukasPaczos commented on Jun 5, 2017

    @LukasPaczos
    Contributor

    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.

  2. added
    Android
    on Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidcrash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions