-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script reloading during package manager usage and popups bugs #210
Comments
All this makes popup calling totally incompatible with package loading, since it will always break the panels on first installation unless the user is pointed to first close all popups. |
Attached the recording of another user with this problem. Grabacion.de.pantalla.desde.2023-05-02.23-35-39.mp4https://hydrogenaud.io/index.php/topic,120979.msg1026417.html#msg1026417 |
As shown here with irony, there is no way to stop script execution at that point:
I check after the popup if the properties are accessible (they don't) and I'm able to identify when the panel has been reloaded before closing a popup, but at that point there is no way to do anything but throwing. There is no window.stop(), or any way to simply stop running anything more or silently crash the script instance (and continue with the main one). |
So essentially did something like this: Forcing the user to click a button after installing the script (and that would start the standard loading of the script, with popups, etc.). And since the mouse callbacks are disabled while SMP windows are opened, that's fine. Anyway this is just a workaround. |
…foobar2000. - UI: script will be completely disabled after installing for the first time until user clicks on the setup button (which will initiate a serie of popups). This is a workaround for a [SMP bug](TheQwertiest/foo_spider_monkey_panel#210) during the installation process. Resolve #41
…st time until user clicks on the setup button (which will initiate a serie of popups). This is a workaround for a [SMP bug](TheQwertiest/foo_spider_monkey_panel#210) during the installation process.
WshShell.Popup instances keep running after closing package manager and SMP panel, which turns into weird bugs since the panel gets reloaded after closing the later.
For ex. this popup fires as soon as the package manager is closed:

But then the script is reloaded when the SMP panel window is closed again. That behavior is totally prone to errors when using packages, since the script is loaded multiple times while the window is opened.
The problem comes when popups are present. They are spanned multiple times (since the script keeps reloading everytime you click ok). And the window doesn't close while there is a popup box asking for user input.
When you close one of the popups, since it's trying to reference a script variable no longer present (due to reloading), it crashes.

In other words, if the user keeps trying to close the SMP window before closing the popups.... it may well get 10 copies of the same popup and 10 crashes of the same panel in a row.
The text was updated successfully, but these errors were encountered: