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

PointerEventConverter.expand: The getter 'pointer' was called on null. #39031

Closed
cvolzke4 opened this issue Aug 22, 2019 · 24 comments
Closed

PointerEventConverter.expand: The getter 'pointer' was called on null. #39031

cvolzke4 opened this issue Aug 22, 2019 · 24 comments
Labels
a: production Issues experienced in live production apps f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@cvolzke4
Copy link

cvolzke4 commented Aug 22, 2019

From crash:

NoSuchMethodError: The getter 'pointer' was called on null.
#0      PointerEventConverter.expand (package:flutter/src/gestures/converter.dart:254)
#1      _SyncIterator.moveNext (dart:core-patch/core_patch.dart:144)
#2      ListQueue.addAll (dart:collection/queue.dart:655)
#3      _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:84)
#4      _rootRunUnary (dart:async/zone.dart:1136)
#5      _CustomZone.runUnary (dart:async/zone.dart:1029)
#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:931)
#7      _invoke1 (dart:ui/hooks.dart:252)
#8      _dispatchPointerDataPacket (dart:ui/hooks.dart:161)
@BondarenkoStas
Copy link

@cvolzke4 Please provide flutter doctor -v output as well as the steps to reproduce the issue.

@BondarenkoStas BondarenkoStas added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 6, 2019
@keshava19
Copy link
Contributor

NoSuchMethodError: NoSuchMethodError: The getter 'pointer' was called on null.
Receiver: null
Tried calling: pointer
  File "converter.dart", line 254, in PointerEventConverter.expand
  File "core_patch.dart", line 152, in _SyncIterator.moveNext
  File "queue.dart", line 655, in ListQueue.addAll
  File "binding.dart", line 84, in _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket
  File "zone.dart", line 1136, in _rootRunUnary
  File "zone.dart", line 1029, in _CustomZone.runUnary
  File "zone.dart", line 931, in _CustomZone.runUnaryGuarded
  File "hooks.dart", line 250, in _invoke1
  File "hooks.dart", line 159, in _dispatchPointerDataPacket

Flutter doctor :-

keshava@debian:~$ flutter doctor -v
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale en_IN.UTF-8)
    • Flutter version 1.7.8+hotfix.4 at /home/keshava/Development/flutter
    • Framework revision 20e59316b8 (8 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/keshava/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /home/keshava/Development/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[!] Android Studio (version 3.5)
    • Android Studio at /home/keshava/Development/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.38.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.4.1

[✓] Connected device (1 available)
    • Redmi 6 Pro • 1f04e0bb0405 • android-arm64 • Android 9 (API 28)

! Doctor found issues in 1 category.

@cvolzke4
Copy link
Author

@BondarenkoStas I don't know how to reproduce this.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 11, 2019
@BondarenkoStas
Copy link

@keshava19 Maybe you can come up with any steps how to reproduce it? When it occurs? What command do you run?

@keshava19
Copy link
Contributor

@BondarenkoStas I too don't know how to reproduce this bug.

@BondarenkoStas BondarenkoStas added d: stackoverflow Good question for Stack Overflow f: gestures flutter/packages/flutter/gestures repository. labels Sep 13, 2019
@BondarenkoStas
Copy link

I would advise you to post it to SO as well. It will be very hard to investigate without knowing where to start, but maybe somebody from community already encountered the issue and can help with it. In this case please paste the link to the question here.

@keshava19
Copy link
Contributor

I/flutter (24943): 'package:flutter/src/gestures/converter.dart': Failed assertion: line 249 pos 20: '_pointers.containsKey(datum.device)': is not true. 
I/flutter (24943): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39) 
I/flutter (24943): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5) 
I/flutter (24943): #2 PointerEventConverter.expand 
package:flutter/…/gestures/converter.dart:249
I/flutter (24943): #3 _SyncIterator.moveNext (dart:core-patch/core_patch.dart:152:12) 
I/flutter (24943): #4 ListQueue.addAll (dart:collection/queue.dart:655:25) 
I/flutter (24943): #5 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket 
package:flutter/…/gestures/binding.dart:84
I/flutter (24943): #6 _rootRunUnary (dart:async/zone.dart:1136:13) 
I/flutter (24943): #7 _CustomZone.runUnary (dart:async/zone.dart:1029:19) 
I/flutter (24943): #8 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7) 
I/flutter (24943): #9 _invoke1 (dart:ui/hooks.dart:250:10) 
I/flutter (24943): #10 _dispatchPointerDataPacket (dart:ui/hooks.dart:159:5)

I got this when started the app in debug mode.

@crazecoder
Copy link

crazecoder commented Oct 14, 2019

I also encountered this bug in the production environment. This is the reported log

NoSuchMethodError: The getter 'pointer' was called on null. Receiver: null Tried calling: pointer
1 #0 PointerEventConverter.expand (package:flutter/src/gestures/converter.dart:254)
2 #1 _SyncIterator.moveNext (dart:core-patch/core_patch.dart:144)
3 #2 ListQueue.addAll (dart:collection/queue.dart:655)
4 #3 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:84)
5 #4 _rootRunUnary (dart:async/zone.dart:1136)
6 #5 _CustomZone.runUnary (dart:async/zone.dart:1029)
7 #6 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931)
8 #7 _invoke1 (dart:ui/hooks.dart:263)
9 #8 _dispatchPointerDataPacket (dart:ui/hooks.dart:172)
NoSuchMethodError: The getter 'lastPosition' was called on null. Receiver: null Tried calling: lastPosition
1 #0 PointerEventConverter.expand (package:flutter/src/gestures/converter.dart:281)
2 #1 _SyncIterator.moveNext (dart:core-patch/core_patch.dart:144)
3 #2 ListQueue.addAll (dart:collection/queue.dart:655)
4 #3 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:84)
5 #4 _rootRunUnary (dart:async/zone.dart:1136)
6 #5 _CustomZone.runUnary (dart:async/zone.dart:1029)
7 #6 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931)
8 #7 _invoke1 (dart:ui/hooks.dart:263)
9 #8 _dispatchPointerDataPacket (dart:ui/hooks.dart:172)

How to reproduce it:
https://stackoverflow.com/questions/55022915/gesture-detector-throws-exception-on-3-finger-swipe

@qq326646683
Copy link

same issue
android_error2

@BondarenkoStas BondarenkoStas added framework flutter/packages/flutter repository. See also f: labels. and removed d: stackoverflow Good question for Stack Overflow labels Oct 24, 2019
@brorhb
Copy link

brorhb commented Nov 5, 2019

I have also encountered two times in production now. Sorry to say this is all the crash info I have right now

IMG_0015

@ogrenichv
Copy link

Any news? Was it fixed in 1.12?

@iapicca
Copy link
Contributor

iapicca commented Apr 29, 2020

Hi @cvolzke4
could you please provide a minimal reproducible code sample?
Thank you

@iapicca iapicca added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds and removed f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 29, 2020
@cvolzke4
Copy link
Author

I can't reproduce this, I only have the stack trace reported from the app (#quill).

crazecoder mentioned this may reproduce the issue:
https://stackoverflow.com/q/55022915

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 29, 2020
@iapicca iapicca added a: production Issues experienced in live production apps f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. and removed in triage Presently being triaged by the triage team labels Apr 30, 2020
@iapicca
Copy link
Contributor

iapicca commented Apr 30, 2020

Hi @ogrenichv @keshava19 @brorhb @qq326646683 @crazecoder
could you please provide a reproducible code sample?
Thank you

@iapicca iapicca added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 30, 2020
@mivanzhang
Copy link

similar question with flutter 1.9.1

@mivanzhang
Copy link

image
image

@mivanzhang
Copy link

I found this bug has been fixed in 314eb3b and flutter/engine@132d38c
if you update flutter to 1.12,this will be fixed ,if not ,I advice you to cherry-pick both commits

@iapicca
Copy link
Contributor

iapicca commented May 13, 2020

Hi all
for the issue to be workable is needed a minimal reproducible code sample,
could you please check if the issue is fixed with the latest stable version
Thank you

@mivanzhang
Copy link

Truely ,I don`t know how to reproduce the bug. We got lots of crashes with this bug ,almost 1% users will come into this situation

@lionoggo
Copy link

On Android devices, some special gestures may cause this problem, such as dragging three fingers on the screen to realize the screenshot or other.

@chunhtai
Copy link
Contributor

This should be fixed with the latest stable 1.17. Includes the tree finger gesture @lionoggo mentioned. I will close this issue for now. If you are still seeing this issue after upgrade to latest stable, please reopen this issue

@mivanzhang
Copy link

@chunhtai Is this your fix commit? I found this in flutter 1.12.
314eb3b and flutter/engine@132d38c

@chunhtai
Copy link
Contributor

@mivanzhang Yes, it is

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: production Issues experienced in live production apps f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests