kikito / love-loader

Threaded resource loading for LÖVE
http://love2d.org
MIT License
131 stars 16 forks source link

Issue with finishedCallback #8

Closed SiENcE closed 6 years ago

SiENcE commented 10 years ago

I get different results when the finishedCallback is called..

Sometimes I get this in the console.

first tween finished
image   table: 0x02945188       left-hand-climber-hi
second tween finished

and sometimes this:

first tween finished
image   table: 0x02945188       left-hand-climber-hi
second tween finished
second tween finished

Testprogram: https://www.love2d.org/forums/download/file.php?id=9951

https://www.love2d.org/forums/viewtopic.php?f=5&t=77904&p=168404#p168318

https://www.love2d.org/forums/viewtopic.php?f=5&t=77904&p=168404#p168404

kikito commented 10 years ago

Hi @SiENcE ,

I just merged a pull request from Tanner which changes how the "all resources are loaded" callback is handled. Could you please try the latest version on master (2.0.2) in your computer to see if it fixes your issue? (I would try myself, but I can't reproduce the problem that you have).

Thanks!

SiENcE commented 10 years ago

I can't see how this should fix the problem. It's only a variable renaming and font loading added.

I tried it and it does not solve the problem. My fix solves it, but it's only a hack :-/.

SiENcE commented 10 years ago

Any news on this?

kikito commented 10 years ago

Hi, sorry, no.

Tanner's PR was more than just a variable renaming thing - he changed the way the "all finished" condition was handled here: https://github.com/kikito/love-loader/commit/1426b8231dae34c59cf6f0ab7db7600bcf5fd6dc

For now, I have no more ideas. Feel free to use your fix, but I can't merge it in good conscience.

SiENcE commented 10 years ago

I try to figure out how to solve it differetly, If I find something, I report it to you.

jbrower commented 10 years ago

@kikito This pull request seemed to solve some issues for me where the loader would never update it's state. I assume this is because I had callbacks being fired multiple times causing the state to become inconsistent. When I implemented this pull request, it seemed to resolve the issue. I will continue to monitor to see if the issue comes back, but until then, I would recommend a merge of this pull request.

kikito commented 6 years ago

Hi, I have marked this project as deprecated and will close all open issues. Thanks for taking the time to report this.