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

The method 'visitChildren' was called on null #19

Closed
Cretezy opened this issue Nov 3, 2018 · 3 comments
Closed

The method 'visitChildren' was called on null #19

Cretezy opened this issue Nov 3, 2018 · 3 comments

Comments

@Cretezy
Copy link

Cretezy commented Nov 3, 2018

Sometimes, the plugin calls visitChildren on null, meaning the widget either wasn't even created yet, or was disposed.

I/flutter ( 8887): ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 8887): The following NoSuchMethodError was thrown during a scheduler callback:
I/flutter ( 8887): The method 'visitChildren' was called on null.
I/flutter ( 8887): Receiver: null
I/flutter ( 8887): Tried calling: visitChildren(Closure: (Element) => Null)
I/flutter ( 8887): 
I/flutter ( 8887): When the exception was thrown, this was the stack:
I/flutter ( 8887): #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
I/flutter ( 8887): #1      _AutomaticKeepAliveState._getChildElement (package:flutter_staggered_grid_view/src/widgets/automatic_keep_alive_variable_size_box.dart:128:13)
I/flutter ( 8887): #2      _AutomaticKeepAliveState._addClient.<anonymous closure> (package:flutter_staggered_grid_view/src/widgets/automatic_keep_alive_variable_size_box.dart:93:30)
I/flutter ( 8887): #3      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 8887): #4      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:938:9)
I/flutter ( 8887): #5      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter ( 8887): #6      _invoke (dart:ui/hooks.dart:145:13)
I/flutter ( 8887): #7      _drawFrame (dart:ui/hooks.dart:134:3)
I/flutter ( 8887): ════════════════════════════════════════════════════════════════════════════════════════════════════
@letsar
Copy link
Owner

letsar commented Dec 19, 2018

Hi, have you a code sample when this occurs?

@Cretezy
Copy link
Author

Cretezy commented Dec 19, 2018

I'll try to find one. This was a while back and I had worked around this issue

@jamesblasco
Copy link
Collaborator

Let's open this issue if the problem happens again

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

3 participants