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] Spam pinch zoom in and out V5 #1717

Closed
Tracked by #1529
robpot95 opened this issue Nov 4, 2023 · 8 comments · May be fixed by #1750
Closed
Tracked by #1529

[BUG] Spam pinch zoom in and out V5 #1717

robpot95 opened this issue Nov 4, 2023 · 8 comments · May be fixed by #1750
Labels
bug This issue reports broken functionality or another error P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Milestone

Comments

@robpot95
Copy link

robpot95 commented Nov 4, 2023

What is the bug?

When you spam pinching zoom in and out and at the end i get this error:

The following assertion was thrown while handling a gesture:
'package:latlong2/latlong/LatLng.dart': Failed assertion: line 33 pos 16: 'latitude >= -90 && latitude <= 90': is not true.
package:latlong2/latlong/LatLng.dart:33

When the exception was thrown, this was the stack
#2      new LatLng
package:latlong2/latlong/LatLng.dart:33
#3      SphericalMercator.unproject
package:flutter_map/…/geo/crs.dart:398
#4      Crs.pointToLatLng
package:flutter_map/…/geo/crs.dart:37
#5      FlutterMapState.unproject
package:flutter_map/…/map/state.dart:555
#6      MapGestureMixin._offsetToCrs
package:flutter_map/…/gestures/gestures.dart:655
#7      MapGestureMixin.handleScaleUpdate
package:flutter_map/…/gestures/gestures.dart:440
#8      ScaleGestureRecognizer._advanceStateMachine.<anonymous closure>
package:flutter/…/gestures/scale.dart:702
#9      GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:275
#10     ScaleGestureRecognizer._advanceStateMachine
package:flutter/…/gestures/scale.dart:701
#11     ScaleGestureRecognizer.handleEvent
package:flutter/…/gestures/scale.dart:553
#12     PointerRouter._dispatch
package:flutter/…/gestures/pointer_router.dart:98
#13     PointerRouter._dispatchEventToRoutes.<anonymous closure>
package:flutter/…/gestures/pointer_router.dart:143
#14     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#15     PointerRouter._dispatchEventToRoutes
package:flutter/…/gestures/pointer_router.dart:141
#16     PointerRouter.route
package:flutter/…/gestures/pointer_router.dart:127
#17     GestureBinding.handleEvent
package:flutter/…/gestures/binding.dart:488
#18     GestureBinding.dispatchEvent
package:flutter/…/gestures/binding.dart:468
#19     RendererBinding.dispatchEvent
package:flutter/…/rendering/binding.dart:333
#20     GestureBinding._handlePointerEventImmediately
package:flutter/…/gestures/binding.dart:413
#21     GestureBinding.handlePointerEvent
package:flutter/…/gestures/binding.dart:376
#22     GestureBinding._flushPointerEventQueue
package:flutter/…/gestures/binding.dart:323
#23     GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:292
#27     _invoke1 (dart:ui/hooks.dart:188:10)
#28     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:424:7)
#29     _dispatchPointerDataPacket (dart:ui/hooks.dart:119:31)
(elided 5 frames from class _AssertionError and dart:async)
Handler: "onUpdate"
Recognizer: ScaleGestureRecognizer#4d903
    debugOwner: FlutterMapState#8fff9(tickers: tracking 2 tickers)

How can we reproduce it?

When you spam pinching zoom in and out

Do you have a potential solution?

No response

Platforms

Samsung Galaxy S21 (Android 12)

Severity

Minimum: Allows normal functioning

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

Hi @robpot95, what version are you using?

@robpot95
Copy link
Author

robpot95 commented Nov 4, 2023

At the moment i'm using v5, due to issues with v6

Also notice somtimes i could get Infinity to NaN which cause the app freeze

@JaffaKetchup
Copy link
Member

We're unable to provide much support for bugs like this in older versions, but we'll keep it open for now. Thanks for reporting!

@robpot95
Copy link
Author

robpot95 commented Nov 4, 2023

I understand, but can it be avoided until i can uppgradera to v6. Also i have no idea if this bug is in v6

@JaffaKetchup
Copy link
Member

Unfortunately it probably can't be avoided, as it's a bug in the internals. Not sure if it's in V6 either, but there is a gesture rewrite on the way at some point soon, so hopefully that should help.

@mootw
Copy link
Collaborator

mootw commented Dec 2, 2023

This is an issue with latlong2. it asserts that lat, lon objects are within +-90, +-180. which is causing the crash. potentially there is also still an issue with the gesture system too but #1750 (or a fix upstream) might fix the issue

@JaffaKetchup
Copy link
Member

I would imagine we're not applying the extremity constraints correctly or something, and when a frame is skipped, it doesn't do the check? Or something like that maybe?

@JaffaKetchup JaffaKetchup added the S: core Scoped to the core flutter_map functionality label Dec 10, 2023
@JaffaKetchup JaffaKetchup added P: 3 (low) (Default priority for feature requests) and removed needs triage This new bug report needs reproducing and prioritizing labels Feb 6, 2024
@JaffaKetchup
Copy link
Member

Closing this for now. If this needs re-opening, please ping me!

@JaffaKetchup JaffaKetchup closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
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 P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants