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

[BUG] getPixelBounds occasionally results in exception: Unsupported operation: Infinity or NaN toInt #1645

Closed
greensopinion opened this issue Sep 8, 2023 · 4 comments
Labels
bug This issue reports broken functionality or another error duplicate This issue already exists

Comments

@greensopinion
Copy link
Contributor

What is the bug?

Exception at runtime:

#0      double.floor (third_party/dart/sdk/lib/_internal/vm/lib/double.dart)
#1      CustomPoint.floor (~/.pub-cache/hosted/pub.dev/flutter_map-5.0.0/lib/src/misc/point.dart:58:31)
#2      FlutterMapState.getPixelBounds (~/.pub-cache/hosted/pub.dev/flutter_map-5.0.0/lib/src/map/state.dart:593:47)
#3      FlutterMapState.initState (~/.pub-cache/hosted/pub.dev/flutter_map-5.0.0/lib/src/map/state.dart:38:20)
#4      StatefulElement._firstBuild (~/development/flutter/packages/flutter/lib/src/widgets/framework.dart:5430:55)

How can we reproduce it?

I haven't created a reproduction scenario yet

Is this the same issue as #1522 ?

Do you have a potential solution?

No response

Platforms

all

Severity

Erroneous: Prevents normal functioning and causes errors in the console

@greensopinion greensopinion added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Sep 8, 2023
@JaffaKetchup
Copy link
Member

Hey @greensopinion,
This is likely the same as #1522, which was fixed by #1585, released in v6.0.0-dev.2.
I'm going to close this, please reopen if you can still reproduce on the latest prerelease.

@JaffaKetchup JaffaKetchup closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2023
@JaffaKetchup JaffaKetchup added duplicate This issue already exists and removed needs triage This new bug report needs reproducing and prioritizing labels Sep 8, 2023
@greensopinion
Copy link
Contributor Author

greensopinion commented Sep 16, 2023

I have a reproduction scenario:

final nan = 0.0/0.0; // <-- provides NaN

MapOptions(
     zoom: nan,
...
)

The solution is to avoid passing in NaN for zoom

@RicardoRB
Copy link

Still is happening to me in 'release' version of my app.

@JaffaKetchup
Copy link
Member

@RicardoRB Please create a new issue with a full MRE if this still happens to you with the latest v6.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports broken functionality or another error duplicate This issue already exists
Projects
None yet
Development

No branches or pull requests

3 participants