Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Georgia-ReBORN - A Clean foobar2000 Theme (Read 172743 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Georgia-ReBORN - A Clean foobar2000 Theme

Reply #825
I am not sure what are you trying to test with that, it's not doing what you think it does. New requests should also be directly skipped on shutdown.

Anyway here is a test file which crashes if you delete "window.IsUnload = true;" line; but works fine with it. Note the script will try to access a list of urls and close foobar immediately. So upon foobar restart, it will do the same and effectively make it unusable unless the last line of code closing foobar is removed.

Also note the interval ms affects how it's handled. 30 ms seems to work fine, but higher settings may crash too.  For sure 3000 ms will crash, there is a small window of time between the shutdown request and the actual shutdown and you have to use that.

That can be avoided with a direct abort routine at the callback and a stack of request similar to your approach, but the stack should be managed at the callback (not saying all this is needed, just that it would be the best approach, but the other one may be good enough).

Alternatively, wget or similar may be used to retrieve data from web without all these problems... it may be wise to apply this fix to xmlhttp requests too (and beware of similar behaviors on any activeX object).

 

Re: Georgia-ReBORN - A Clean foobar2000 Theme

Reply #826
@regor,

sorry for the confusion and never mind. I just tried a too unrealistic/aggressive approach just to illustrate the issue
that it should be gracefully handled by foobar itself when exiting abruptly during HTTP requests...

Your approach works just fine and is the correct way to handle this situation, we don't even need the safeguard
at the beginning of bioSend, I have tested it and it works just fine. As you pointed out:
Quote
there is a small window of time between the shutdown request and the actual shutdown and you have to use that.
With my unrealistic/aggressive approach it failed  ;)

Anyways, all is good, thx for that regor =)
Btw, can you add your workaround here:
https://github.com/Wil-B/Biography/pull/7 or make a new PR for WilB?

@Majestyk, I have already made a commit here:
https://github.com/TT-ReBORN/Georgia-ReBORN/commit/7032ff781487054a368cbd6f42cea521a932b4a8

-TT