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

Running well but one exception keep showing.. #1

Closed
dvlj opened this issue Oct 4, 2019 · 5 comments
Closed

Running well but one exception keep showing.. #1

dvlj opened this issue Oct 4, 2019 · 5 comments

Comments

@dvlj
Copy link

dvlj commented Oct 4, 2019

Any idea?

════════ Exception caught by scheduler library ═════════════════════════════════
The following assertion was thrown during a scheduler callback:
Failed assertion: boolean expression must not be null

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md

When the exception was thrown, this was the stack
#0 Animation.update
package:flame/animation.dart:149
#1 AnimationComponent.update
package:flame/components/animation_component.dart:49
#2 BirdGround.update
package:flutter_bird/game/bird.dart:115
#3 Bird.update
package:flutter_bird/game/bird.dart:81
#4 FlutterBirdGame.update
package:flutter_bird/game/game.dart:83
...

This exception was thrown in the context of a scheduler callback. When the scheduler callback was registered (as opposed to when the exception was thrown), this was the stack
#0 new _FrameCallbackEntry.
package:flutter/…/scheduler/binding.dart:112
#1 new _FrameCallbackEntry
package:flutter/…/scheduler/binding.dart:115
#2 SchedulerBinding.scheduleFrameCallback
package:flutter/…/scheduler/binding.dart:459
#3 _GameRenderBox._scheduleTick
package:flame/game.dart:108
#4 _GameRenderBox._tick
package:flame/game.dart:117
...
════════════════════════════════════════════════════════════════════════════════

@g0rdan
Copy link
Owner

g0rdan commented Oct 4, 2019

I haven't been touching the project for a while, so at the moment I can't provide an answer. But I'll look up on the issue. Have you tried to update Flame package?

@dvlj
Copy link
Author

dvlj commented Oct 4, 2019

flutter version 1.9.1
flame: 0.10.2. <- working but above error
flame: 0.16.0. <- cant even compile, current code not compatible

@diegolg13
Copy link

First, I would like to thank you for the project. Congratulations. I had the same problems. Test various combinations between Flame and Flutter_svg. Putting both in their most recent versions does not work. I managed to find the right combination
add lines in file "pubspec.yaml"

flame: ^0.15.2
flutter_svg: ^ 0.14.0

Also, add this line " WidgetsFlutterBinding.ensureInitialized(); " to the main.dart file:

void main() async {

  // initial settings
  WidgetsFlutterBinding.ensureInitialized();

............

@g0rdan
Copy link
Owner

g0rdan commented Jan 29, 2020

@diegolg13 Thank you a lot! Honestly, after the last commit, I didn't touch the app at all. I feel shame a bit. Thanks for fixing the bug.

@g0rdan g0rdan closed this as completed Jan 29, 2020
@diegolg13
Copy link

There is no reason to apologize. It turns out that people will download your project and will probably be using an updated version of the flutter.
So there had always been problems. This is part of programming. Your project taught me a lot, please do more. haha ha. maybe an Angry Birds now.

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

3 participants