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

Getting Unsupported operation: Infinity or NaN toInt. #153

Closed
HappyMakadiyaS opened this issue May 25, 2023 · 5 comments
Closed

Getting Unsupported operation: Infinity or NaN toInt. #153

HappyMakadiyaS opened this issue May 25, 2023 · 5 comments

Comments

@HappyMakadiyaS
Copy link

Randomly getting Unsupported operation: Infinity or NaN toInt. while zooming or navigating through Map. Steps are not reproducible but many times occur.

======== Exception caught by widgets library =======================================================
The following UnsupportedError was thrown building _VectorTileLayer-[<'clgp8xzs200b301qm7i8k8xo4_vnone_VectorTileLayer'>](dirty, state: _VectorTileLayerState#cc4f6):
Unsupported operation: Infinity or NaN toInt

When the exception was thrown, this was the stack:
#0 double.toInt (dart:core-patch/double.dart)
#1 double.round (dart:core-patch/double.dart:193:34)
#2 CustomPoint.round (package:flutter_map/src/core/point.dart:57:41)
#3 FlutterMapState.getNewPixelOrigin (package:flutter_map/src/map/flutter_map_state.dart:596:47)
#4 new TilePositioningState (package:vector_map_tiles/src/grid/grid_tile_positioner.dart:94:18)
#5 _VectorTileLayerState.build (package:vector_map_tiles/src/grid/grid_layer.dart:332:9)
#6 StatefulElement.build (package:flutter/src/widgets/framework.dart:5080:27)
#7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4968:15)
#8 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5133:11)
#9 Element.rebuild (package:flutter/src/widgets/framework.dart:4690:5)
#10 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2743:19)
#11 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:863:21)
#12 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1289:15)
#13 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1218:9)

====================================================================================================

image
@greensopinion
Copy link
Owner

Thanks for the issue. Can you confirm which version of the library you're using? If it's 4.0, you may want to try 3.3.5 instead.

@greensopinion
Copy link
Owner

I'm having troubles reproducing. Can you provide the exact version of flutter_map and vector_map_tiles (e.g. from pubspec.lock) and if this is in your own application or one of the example applications?

Looking at flutter_map is a similar issue: fleaflet/flutter_map#409

@ibrierley
Copy link

There's historically been a few cases of that error. I think most recent was fleaflet/flutter_map#1370 which hopefully is resolved.

@HappyMakadiyaS
Copy link
Author

@greensopinion
I have encountered that when enableMultiFingerGestureRace is enable in FlutterMap widget then this is issue is being produced frequently.

@greensopinion
Copy link
Owner

thanks for the context - closing since this is an issue with flutter_map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants