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

A MapboxMapController was used after being disposed #1311

Closed
luiscarielo83 opened this issue May 4, 2023 · 3 comments
Closed

A MapboxMapController was used after being disposed #1311

luiscarielo83 opened this issue May 4, 2023 · 3 comments
Labels

Comments

@luiscarielo83
Copy link

When I close the screen that has the mapbox, it throws me this message:

I/flutter (15285): A MapboxMapController was used after being disposed.
I/flutter (15285): Once you have called dispose() on a MapboxMapController, it can no longer be used.
I/flutter (15285): #0 ChangeNotifier.debugAssertNotDisposed.<anonymous closure (package:flutter/src/foundation/change_notifier.dart:157:9)
I/flutter (15285): #1 ChangeNotifier.debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:164:6)
I/flutter (15285): #2 ChangeNotifier.dispose (package:flutter/src/foundation/change_notifier.dart:323:27)
I/flutter (15285): #3 MapboxMapController.dispose (package:mapbox_gl/src/controller.dart:1230:11)
I/flutter (15285): #4 _MapboxMapState.dispose (package:mapbox_gl/src/mapbox_map.dart:271:18)
I/flutter (15285):

I have the Mapbox widget wrapped in a SingleChildScrollView.

I am using Android devices (v11 and v13).
Version Gradle 7.4.2
Flutter 3.7.12 | Dart 2.19.6 | Android Studio Flamingo 2022.2.1 Patch 1

This is my code:

image

@steveneal
Copy link

I have the same problem and it's crashing my app.

@moshOntong-IT
Copy link

I have the same problem

@stale
Copy link

stale bot commented Sep 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 27, 2023
@stale stale bot closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants