-
Notifications
You must be signed in to change notification settings - Fork 70
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
Raster mode tile cancellation #205
Comments
I'm also having issues with the package overflowing my crashlytics service. |
Likely there's somewhere in the code that we're not handling exceptions across an async boundary, causing exceptions to go to the default exception handler. https://dart.dev/libraries/async/futures-error-handling#potential-problem-failing-to-register-error-handlers-early A couple of options come to mind:
|
Thank you very much for the response. The following works for me to suppress the errors (and in my case, let integration tests now pass with a zero exit code). // flutter pub add executor_lib
import "package:executor_lib/executor_lib.dart";
void main() async {
final originalHandler = FlutterError.onError;
FlutterError.onError = (details) {
// Flutter map currently has a bug with async vector tile loading. On
// cancellation (i.e. when a request for a tile has been sent but its result
// is no longer necessary), a CancellationException is throw and not
// properly handled. Silently ignore this exception type.
if (details.exception is CancellationException) {
return;
}
FlutterError.presentError(details);
// Integration tests rely on overriding FlutterError.onError, so if we are
// in integration tests mode we must take care to also call the original
// handler.
if (kIntegrationTest) originalHandler?.call(details);
};
return runApp(...);
} |
Hi there, Managed to trace various cancellation exceptions in my application that were being handled by the PlatformDispatcher callback to the following places:
|
Thanks for looking into it Mark. In most (all?) cases I wonder if it would make sense to wrap Alternatively we could address the specific cases that you discovered. Unless it's needed, I recommend against configurability since it would add unnecessary complexity. |
Whenever I do fast zoom in/out, I'm getting following error:
I saw that in latest release note for 7.3.1 it is noted that it has something to do with that:
The problem is that visibly slows down the map when it happens, and in addition it also overflows my crashlytics service. Is there some way that this is supposed to be handled outside the library and is it something that is being worked on currently? Also, If someone would like to explain why this feature is now being handled this way and what it enables generally would be great.
The text was updated successfully, but these errors were encountered: