liodali / osm_flutter

OpenStreetMap plugin for flutter
https://pub.dev/packages/flutter_osm_plugin
MIT License
239 stars 98 forks source link

Non-Fatal error ; Null check operator used on a null value. #470

Open JobiJoba opened 1 year ago

JobiJoba commented 1 year ago

Hi,

I get some non critical error in Crashlytics coming from the module on Android:

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown Uncaught async exception.
       at RenderRepaintBoundary.toImage(proxy_box.dart:3380)
       at MethodChannelOSM._capturePng(osm_method_channel.dart:341)
       at MethodChannelOSM.customAdvancedPickerMarker(osm_method_channel.dart:503)
       at MobileOSMController.changeIconAdvPickerMarker(osm_controller.dart:417)
       at MobileOSMController.initMap.<fn>(osm_controller.dart:224)

and

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Exception: Error to draw you custom icon. Error thrown Uncaught async exception.
       at MethodChannelOSM._capturePng(osm_method_channel.dart:331)
       at MethodChannelOSM.customUserLocationMarker(osm_method_channel.dart:528)
       at MobileOSMController.initMap(osm_controller.dart:246)
       at MobileOSMController.initPositionMap(osm_controller.dart:171)
       at BaseMapController.init.<fn>(base_map_controller.dart:51)

It's not a fatal issue so it's not critical, just hope it can help.

Plugin version:

flutter_osm_interface:
    dependency: transitive
    description:
      name: flutter_osm_interface
      sha256: "9d1c747635ce8a58ceb623825f0fe4d469272645458ce839d466f9d03dff2729"
      url: "https://pub.dev"
    source: hosted
    version: "0.7.0"
  flutter_osm_plugin:
    dependency: "direct main"
    description:
      name: flutter_osm_plugin
      sha256: "9b1ac5f677a143a297839c0e18d5bb9d53bdef3a6605a1bf47385753f74a8149"
      url: "https://pub.dev"
    source: hosted
    version: "0.70.1"
  flutter_osm_web:
    dependency: transitive
    description:
      name: flutter_osm_web
      sha256: "010ce652943db001ec46ebeb3402d9cbbff598187dea9ef0c7966fa5963292ac"
      url: "https://pub.dev"
    source: hosted
    version: "0.6.0"
liodali commented 1 year ago

that related to marker icon did you await changeIconAdvPickerMarker ?

JobiJoba commented 1 year ago

I don't use that method (or any other changeIcon).

liodali commented 1 year ago

can you share OSMOption ?