S-Man42 / GCWizard

GC Wizard
Other
44 stars 10 forks source link

MapView Crashes (app close) #1029

Open S-Man42 opened 2 years ago

S-Man42 commented 2 years ago

The MapView is crashing when it contains many lines after some zooming/panning actions.

Adding several points: Zoom/Pan, everything's fine. Adding some lines between the points: Zoom/Pan: Memory increases, map lags, and finally the app closes. (See memory graphs attached below)

Maybe not reproducable on emulator, maybe needs a physical device for debugging. (Enable debugging and USB options; for seeing graph use Chrome devtools: https://docs.flutter.dev/development/tools/devtools/overview)

Mike-3 commented 2 years ago

I have this exception in the emulator.

E/flutter (15029): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'double' is not a subtype of type 'Map<String, dynamic>' E/flutter (15029): #0 restoreJsonMapViewData (package:gc_wizard/persistence/map_view/json_provider.dart:99:30) E/flutter (15029): #1 MapViewPersistenceAdapter.setJsonMapViewData (package:gc_wizard/widgets/tools/coords/map_view/mapview_persistence_adapter.dart:259:22) E/flutter (15029): #2 GCWMapViewState._buildEditButtons. (package:gc_wizard/widgets/tools/coords/map_view/gcw_mapview.dart:626:62) E/flutter (15029): #3 GCWPasteButtonState._buildMenuItems.. (package:gc_wizard/widgets/common/gcw_paste_button.dart:76:32) E/flutter (15029): #4 _rootRunUnary (dart:async/zone.dart:1434:47)

But I haven't gotten the app to crash in the emulator yet.

S-Man42 commented 2 years ago

looks interesting

Mike-3 commented 2 years ago

on web Error: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods) but no crash

S-Man42 commented 2 years ago

It must have something to do with the MapLines. See following memory graph:

grafik

  1. First constant part: Heavy zooming and panning only with points. Nothing happens.
  2. Not so quiet part (but still overall constant memory): Some number of points but connected through a Polyline. No action, just displaying
  3. Heavy increasing memory allocation: Zooming and panning with line until app crashes.
S-Man42 commented 2 years ago

Example File (rename ZIP to KML)

S-Man42 commented 2 years ago

No idea... do not find it...

ludoo0d0a commented 2 years ago

Can I get the exact detailed step-by-step scenario to reproduce this issue, please ?

S-Man42 commented 2 years ago

Well it's quite easy:

  1. Open Map

As already said: The crash maybe CANNOT reproduced on an emulator (or web), only on a physical device.

S-Man42 commented 2 years ago

Reproducable vids:

way1 way2

S-Man42 commented 1 year ago

Can anybody still reproduce this?