Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Compass exception #80

Closed
selankon opened this issue Jul 21, 2021 · 4 comments
Closed

Compass exception #80

selankon opened this issue Jul 21, 2021 · 4 comments

Comments

@selankon
Copy link

Hi,

I get a compass exception, but anyway it locate me:

E/flutter ( 3723): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: NoSuchMethodError: The method 'cast' was called on null.
E/flutter ( 3723): Receiver: null
E/flutter ( 3723): Tried calling: cast<double>()
E/flutter ( 3723): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
E/flutter ( 3723): #1      FlutterCompass.events.<anonymous closure> (package:flutter_compass/flutter_compass.dart:49:59)
E/flutter ( 3723): #2      _MapStream._handleData (dart:async/stream_pipe.dart:213:31)
E/flutter ( 3723): #3      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
E/flutter ( 3723): #4      _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter ( 3723): #5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter ( 3723): #6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter ( 3723): #7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter ( 3723): #8      _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter ( 3723): #9      _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter ( 3723): #10     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
E/flutter ( 3723): #11     _rootRun (dart:async/zone.dart:1346:47)
E/flutter ( 3723): #12     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter ( 3723): #13     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter ( 3723): #14     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter ( 3723): #15     _rootRun (dart:async/zone.dart:1354:13)
E/flutter ( 3723): #16     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter ( 3723): #17     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter ( 3723): #18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter ( 3723): #19     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter ( 3723): #20     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
➜ flutter --version
Flutter 2.0.3 • channel unknown • unknown source
Framework • revision 4d7946a68d (4 months ago) • 2021-03-18 17:24:33 -0700
Engine • revision 3459eb2436
Tools • Dart 2.12.2
@Xennis
Copy link
Owner

Xennis commented Jul 23, 2021

Hi @selankon , which version of the plugin you were using?

@selankon
Copy link
Author

Well, in my pubspec is configured like this:

  flutter_map_location: any # Used to locate the user on the map

Looking my pub cache seem 0.12.0

@Xennis
Copy link
Owner

Xennis commented Jul 24, 2021

Dear @hemanthrajv I'm using your great flutter_compass plugin. Do you might have an idea how the issue above could happen and what to do to prevent it?

Somehow here https://github.com/hemanthrajv/flutter_compass/blob/8855c7189195f4d5ecc04bb31159598c8ff0a9f3/lib/flutter_compass.dart#L49 data was null if I read the stack that was provided by the user correctly.

I don't really have an idea and I also can't reproduce the issue.

@Xennis
Copy link
Owner

Xennis commented Sep 19, 2021

No response for quite some time. Closed.

@Xennis Xennis closed this as completed Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants