Page 2 of 2

Re: Kikito's love-loader for 0.9.x

Posted: Sun May 25, 2014 9:51 pm
by SiENcE
I'm also trying to reproduce this bug tomorrow on my laptop. Maybe it's not an love-loader but threading issue with love...

Re: Kikito's love-loader for 0.9.x

Posted: Sun May 25, 2014 10:04 pm
by kikito
Oh, no, I am pretty sure it's my fault. It's always my fault.

Re: Kikito's love-loader for 0.9.x

Posted: Mon May 26, 2014 1:00 pm
by SiENcE
Intel Core i7 M620, 64bit Windows 7 ...

Everything works like it should. FinishedCallback is only called once. I executed it several times and don't get a wrong result. So it's PC/CPU/Speed/Hyperthreading/... dependent.

So maybe ... calling 'endThreadIfAllLoaded' takes sometimes longer than a second update call, that's why 'endThreadIfAllLoaded' is called sometimes more than once (maybe only on very fast PCs).

Re: Kikito's love-loader for 0.9.x

Posted: Mon May 26, 2014 2:29 pm
by Roland_Yonaba
Reminds me this..
A programmer had a problem. He thought to himself, "I know, I'll solve it with threads!". has Now problems. two he
Seen on: D. Lohr's Twitter

Re: Kikito's love-loader for 0.9.x

Posted: Mon May 26, 2014 2:57 pm
by kikito
SiENcE wrote:So it's PC/CPU/Speed/Hyperthreading/... dependent.
Yes, I am afraid it is.
SiENcE wrote:So maybe ... calling 'endThreadIfAllLoaded' takes sometimes longer than a second update call, that's why 'endThreadIfAllLoaded' is called sometimes more than once (maybe only on very fast PCs).
That's what I tried to do with my change - I tried to "make the master thread wait for the loader thread to finish". The master thread would say "I am done. Please stop, and tell me when you are stopped". The loader would say "ok, I'm stopped". And then the master would continue. Next time it updates the thread would be finished. But I must have missed something. I must finish what I'm doing, and then I will give it a deep look.
Roland_Yonaba wrote:
A programmer had a problem. He thought to himself, "I know, I'll solve it with threads!". has Now problems. two he
Yes. Interestingly enough, last week I had thread-related problems at work, too. week What a!