Closed ChristopherBiscardi closed 2 years ago
The lack of loading also seems to occur in the regular progress_tracking
example if you remove the 1s initial delay. Although this example doesn't crash, the progress only ever shows done: 0, total: 5
.
2022-06-01T02:41:42.260194Z INFO progress_tracking: Current progress: Progress { done: 0, total: 5 }
edit: I think this may actually be because the 1s delay causes more logs, thus we see 0/6 and 5/6 until 6/6 happens, so may not be related to the original report
I can reproduce the issue for the stageless_progress
example, but the "normal" progress_tracking
example behaves correctly for me. I extended both examples with asserts on main
and tested them without the long running fake task.
The problem in the stageless example seems to come from a system ordering issue. I was not able to fix the ordering itself.
There is a simple workaround though: let bevy_asset_loader
decide when to change the state and not iyes_progress
. Since in the first frame the progress can currently be { done: 0, total: 0 }
, iyes_progress
thinks everything is done and continues to the next state. The example on main
uses the workaround for now.
I will close this for now as I don't think it's worth investing much more time in a proper fix here. iyes_loopless
Is a stopgap solution until stageless Bevy comes and the workaround seems good enough for that in my opinion. With stageless Bevy, this should be resolved properly.
makes sense to me! Thanks for taking a look at it, the workaround fix has held up in my usage so far.
I verified that the next version coming with Bevy 0.10
does not have this issue.
In the new iyes_loopless stageless_progress example, the
track_fake_long_task
system is load-bearing. If removed, the assets fail to be available.If you remove the system in the current example, the current progress is logged out as
done:0, total: 0
.and if you add a requirement for the
TextureAssets
inquit
, you get a crash becauseRes<TextureAssets>
is not available.There's a possibly unrelated warning as well relating to the
Preparation
label.I think this is because of a race condition relating to
time.seconds_since_startup()
. With the delay, it's fine, without the delay it fails.