-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Closed
Labels
f: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on
Description
Steps to Reproduce
- Run
flutter create bug. - Update the files as follows:
lib/main.dart:
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
// This makes the visual density adapt to the platform that you run
// the app on. For desktop platforms, the controls will be smaller and
// closer together (more dense) than on mobile platforms.
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
bool _s1 = true;
bool _s2 = true;
bool _s3 = true;
bool _s4 = true;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: ListView(
children: <Widget>[
SizedBox(
height: 32,
),
SwitchListTile(
title: const Text('Switch'),
value: _s1,
onChanged: (value) {
setState(() {
_s1 = value;
});
},
),
SwitchListTile(
title: const Text('Switch'),
value: _s2,
onChanged: (value) {
setState(() {
_s2 = value;
});
},
),
SizedBox(
height: 32,
),
SwitchListTile(
title: const Text('Switch'),
value: _s3,
onChanged: (value) {
setState(() {
_s3 = value;
});
showAboutDialog(context: context);
},
),
SwitchListTile(
title: const Text('Switch'),
value: _s4,
onChanged: (value) {
setState(() {
_s4 = value;
});
showLicensePage(context: context);
},
),
],
),
),
);
}
}-
Touch and hold multiple (3 or 4) tiles in the list, and then release them all at the same time. Randomly delay the release of one of the fingers slightly until after the popup opens.
-
Close any popups that appear after releasing the list tiles.
-
Repeat until the list tiles stop responding to touch events.
Expected results: list tiles continue to respond to touch
Actual results: list tiles stop working
Logs
[+17377 ms] E/flutter (23379): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Null check operator used on a null value
[ ] E/flutter (23379): #0 DragGestureRecognizer.acceptGesture (package:flutter/src/gestures/monodrag.dart:321:60)
[ ] E/flutter (23379): #1 GestureArenaManager._resolveByDefault (package:flutter/src/gestures/arena.dart:251:25)
[ ] E/flutter (23379): #2 GestureArenaManager._tryToResolveArena.<anonymous closure> (package:flutter/src/gestures/arena.dart:232:31)
[ ] E/flutter (23379): #3 _rootRun (dart:async/zone.dart:1182:47)
[ ] E/flutter (23379): #4 _CustomZone.run (dart:async/zone.dart:1093:19)
[ ] E/flutter (23379): #5 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
[ ] E/flutter (23379): #6 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
[ ] E/flutter (23379): #7 _rootRun (dart:async/zone.dart:1190:13)
[ ] E/flutter (23379): #8 _CustomZone.run (dart:async/zone.dart:1093:19)
[ ] E/flutter (23379): #9 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
[ ] E/flutter (23379): #10 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
[ ] E/flutter (23379): #11 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
[ ] E/flutter (23379): #12 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
[ ] E/flutter (23379):
[+1953 ms] I/flutter (23379): ══╡ EXCEPTION CAUGHT BY GESTURE LIBRARY ╞═══════════════════════════════════════════════════════════
[ ] I/flutter (23379): The following assertion was thrown while routing a pointer event:
[ ] I/flutter (23379): 'package:flutter/src/gestures/monodrag.dart': Failed assertion: line 435 pos 12: '_initialButtons ==
[ ] I/flutter (23379): kPrimaryButton': is not true.
[ ] I/flutter (23379):
[ ] I/flutter (23379): Either the assertion indicates an error in the framework itself, or we should provide substantially
[ ] I/flutter (23379): more information in this error message to help you determine and fix the underlying cause.
[ ] I/flutter (23379): In either case, please report this assertion by filing a bug on GitHub:
[ ] I/flutter (23379): https://github.com/flutter/flutter/issues/new?template=BUG.md
[ ] I/flutter (23379):
[ ] I/flutter (23379): When the exception was thrown, this was the stack:
[ ] I/flutter (23379): #2 DragGestureRecognizer._checkEnd (package:flutter/src/gestures/monodrag.dart:435:12)
[ ] I/flutter (23379): #3 DragGestureRecognizer.didStopTrackingLastPointer (package:flutter/src/gestures/monodrag.dart:376:9)
[ ] I/flutter (23379): #4 OneSequenceGestureRecognizer.stopTrackingPointer (package:flutter/src/gestures/recognizer.dart:342:9)
[ ] I/flutter (23379): #5 DragGestureRecognizer._giveUpPointer (package:flutter/src/gestures/monodrag.dart:385:5)
[ ] I/flutter (23379): #6 DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:282:9)
[ ] I/flutter (23379): #7 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:77:12)
[ ] I/flutter (23379): #8 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:122:9)
[ ] I/flutter (23379): #9 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
[ ] I/flutter (23379): #10 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:120:18)
[ ] I/flutter (23379): #11 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7)
[ ] I/flutter (23379): #12 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:358:19)
[ ] I/flutter (23379): #13 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:338:22)
[ ] I/flutter (23379): #14 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:267:11)
[ ] I/flutter (23379): #15 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:295:7)
[ ] I/flutter (23379): #16 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:240:7)
[ ] I/flutter (23379): #17 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:213:7)
[ ] I/flutter (23379): #21 _invoke1 (dart:ui/hooks.dart:265:10)
[ ] I/flutter (23379): #22 _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)
[ ] I/flutter (23379): (elided 5 frames from class _AssertionError and dart:async)
[ ] I/flutter (23379):
[ ] I/flutter (23379): router: Instance of 'PointerRouter'
[ ] I/flutter (23379): route: Closure: (PointerEvent) => void from Function 'handleEvent':.
[ ] I/flutter (23379): event: PointerMoveEvent#649ab(position: Offset(259.1, 330.0))
[ ] I/flutter (23379): ════════════════════════════════════════════════════════════════════════════════════════════════════
[ +135 ms] I/flutter (23379): Another exception was thrown: 'package:flutter/src/gestures/monodrag.dart': Failed assertion: line 435 pos 12: '_initialButtons == kPrimaryButton': is not true.
[+6261 ms] I/chatty (23379): uid=10203(dev.kdrag0n.bug_repro) 1.ui identical 33 lines
[ ] I/flutter (23379): Another exception was thrown: 'package:flutter/src/gestures/monodrag.dart': Failed assertion: line 435 pos 12: '_initialButtons == kPrimaryButton': is not true.
[+1321 ms] I/flutter (23379): Another exception was thrown: 'package:flutter/src/gestures/monodrag.dart': Failed assertion: line 435 pos 12: '_initialButtons == kPrimaryButton': is not true.
[+2460 ms] I/chatty (23379): uid=10203(dev.kdrag0n.bug_repro) 1.ui identical 5 lines
[ +3 ms] I/flutter (23379): Another exception was thrown: 'package:flutter/src/gestures/monodrag.dart': Failed assertion: line 435 pos 12: '_initialButtons == kPrimaryButton': is not true.
Analyzing bug_repro...
No issues found! (ran in 1.9s)
[✓] Flutter (Channel stable, 1.22.1, on Linux, locale en_US.UTF-8)
• Flutter version 1.22.1 at /home/dragon/code/flutter/sdk
• Framework revision f30b7f4db9 (8 days ago), 2020-10-08 10:06:30 -0700
• Engine revision 75bef9f6c8
• Dart version 2.10.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /home/dragon/code/android/sdk
• Platform android-30, build-tools 30.0.1
• ANDROID_HOME = /home/dragon/code/android/sdk
• Java binary at: /opt/android-studio/jre/bin/java
• Java version openjdk version "1.8.0_242-release"
• All Android licenses accepted.
[✓] Android Studio (version 4.0)
• Android Studio at /opt/android-studio
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version openjdk version "1.8.0_242-release"
[✓] Connected device (1 available)
• Pixel 2 XL (mobile) • [REDACTED] • android-arm64 • Android 11 (API 30)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
f: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on