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

点击速度过快会闪退 #121

Closed
woshihfh0123 opened this issue Feb 3, 2021 · 2 comments
Closed

点击速度过快会闪退 #121

woshihfh0123 opened this issue Feb 3, 2021 · 2 comments

Comments

@woshihfh0123
Copy link

如果以很快的速度连续点击省市县列表(大概一秒钟内点完省市县),选择区县之后会闪退,报错内容:
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building FullPage(dirty, state: _FullPageState#a856a):
The getter 'code' was called on null.
Receiver: null
Tried calling: code

The relevant error-causing widget was:
FlutterEasyLoading file:///D:/workspace/91Chedai_GIT_NEW/lib/main.dart:137:22
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 _FullPageState._getSelectedId (package:city_pickers/src/full_page/full_page.dart:224:31)
#2 _FullPageState.build (package:city_pickers/src/full_page/full_page.dart:320:29)
#3 StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
[ +167 ms] I/flutter (31682): asd
[ ] E/flutter (31682): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 176 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views.
[ ] E/flutter (31682): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[ ] E/flutter (31682): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[ ] E/flutter (31682): #2 ScrollController.jumpTo (package:flutter/src/widgets/scroll_controller.dart:176:12)
[ ] E/flutter (31682): #3 _FullPageState._onItemSelect. (package:city_pickers/src/full_page/full_page.dart:283:30)
[ ] E/flutter (31682): #4 setTimeout. (package:city_pickers/src/util.dart:57:13)
[ ] E/flutter (31682): #5 _rootRun (dart:async/zone.dart:1182:47)
[ ] E/flutter (31682): #6 _CustomZone.run (dart:async/zone.dart:1093:19)
[ ] E/flutter (31682): #7 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
[ ] E/flutter (31682): #8 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1037:23)
[ ] E/flutter (31682): #9 _rootRun (dart:async/zone.dart:1190:13)
[ ] E/flutter (31682): #10 _CustomZone.run (dart:async/zone.dart:1093:19)
[ ] E/flutter (31682): #11 _CustomZone.bindCallback. (dart:async/zone.dart:1021:23)
[ ] E/flutter (31682): #12 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
[ ] E/flutter (31682): #13 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:397:19)
[ ] E/flutter (31682): #14 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
[ ] E/flutter (31682): #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
[ ] E/flutter (31682):

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════

@hanxu317317
Copy link
Owner

这个问题. 貌似是稳定复现的. ~~ coding

@hanxu317317
Copy link
Owner

Navigator.of(context).pop. 这个方法在那一瞬间. 调用过多. 超过了堆栈. 黑屏了.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants