Skip to main content
Topic: Spider Monkey Panel (foo_spider_monkey_panel) (Read 51098 times) previous topic - next topic
davideleo and 1 Guest are viewing this topic.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #300
@TheQwertiest :
Hello TheQwerties,

I installed your new SMP ver 1.2.3-beta (kindly note that I did NOT removed the debug library from the user-component directory and did not disabled the Advanced settings I set for the debug of the ver 1.2.3-test). I was supposed to keep all this as-is not having had different instruction.

Then I edited the Library Tree ver 2.1.2 JS as instructed (replacing all the occurances). Attached is the modified JS in case you would check if I did all right.

And this is the outcome:
1) What's good is that not Library Tree can start-up with the default view, there are no crash.
2) What's bad is that as soon as I select the View by Folder Structure, Foobar UI freezes and it doesn't came back to live even waiting 1+ hour. So, I have to kill the process Foobar.
To be noted that after the kill, I can restart Foobar and the Library Tree JS results not loaded in the target SMP panel (that panel configuration is lost or deleted by the system).

I tried this 5 times and all runs went exactly the same.
Unfortunately I could not collect any console log because of Foobar freeze.

Kindly let me know if you need me to execute some other tests or collect debug info.
Thanks and regards, Andrea


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #302
@TheQwertiest : I will try right away. I will let you know asap.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #303
@Qwertyiest
Tidying my script to process new tracks. In this script I get a list of handles to be processed and then I used to call
fb.RunContextCommandWithMetadb("Tagging/Remove all pictures",myHandles,8);
to delete all embedded images. I've replaced this with the RemoveAttachedImages method of the handles list and it works great.

I also want to optimise my files so I currently use a context menu command;
fb.RunContextCommandWithMetadb("Utilities/Optimize file layout + minimize file size",myHandles,8);
However this generates a popup information box that I have to close every time. Would it be possible to create another method such as myHandles.OptimizeAndMinimize on the list of handles to avoid the popup message?

 

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #304
Looks like our friend marc2k3 has implemented IMetadbHandleList OptimiseFileLayout in his foo_jscript_panel to address my request. Thanks marc2k3. Hopefully this will find it's way into the next foo_spider_monkey_panel.....please.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #305
@Black_Over_Bills_Mothers, sorry, I have quite a few things that I want (and need) to do in SMP, so it will have to wait for a bit. It is noted though, and I'll come back to it after I finish at least some of planned features.


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #307
Hello @TheQwertiest, many thanks for promptly notifing me.
I immediately tested the new Spider Monkey Panel v1.2.3-beta+61085bf2.
It is working well and in my case it saves approximately 75MB or RAM (compared with the special build you gave me dated 6 of November).
Great job!
Kind regards, Andrea

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #308
Quote
saves approximately 75MB or RAM (compared with the special build you gave me dated 6 of November)
It's probably caused by the new SpiderMonkey (JavaScript engine), which was updated in the nightly builds =)

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #309
Quote
saves approximately 75MB or RAM (compared with the special build you gave me dated 6 of November)
It's probably caused by the new SpiderMonkey (JavaScript engine), which was updated in the nightly builds =)

@TheQwertiest : But I was not using V2 method. So, I think the 75MB savings is due to the new V2 method merged into the legacy V1.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #310
* double post removed *
I'm late

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #311
First time I ever see this kind of error:
Quote
Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (test by davideleo)
Font failed:
WinAPI error: CreateFont failed with error (0x0): The operation completed successfully.

The code which generates the error is as simple as this:
Code: [Select]
this.font = gdi.Font("Segoe UI", 12);

The crash occurs only once every two times.


Any clue?



P.S.
As a test, I replaced the error generating line with the following:
Code: [Select]
this.font =  window.GetFontCUI(0);

The script still crashes once every two times, but for a different reason:
Quote
Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (test by davideleo)
FillSolidRect failed:
GdiPlus error: FillRectangle failed with error (0x2): InvalidParameter

Once again, the error-generatng line is as innocent as it can get:
Code: [Select]
gr.FillSolidRect(this.x, this.y, this.width, this.height, colours.LightGray);
I'm late

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #312
@davideleo , can you try the latest nightly version and check if it has the same error?

As for `gr.FillSolidRect(this.x, this.y, this.width, this.height, colours.LightGray);` error, this usually happens when you supply invalid dimensions. E.g. zero height or width.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #313
Hi @TheQwertiest , I tested the script with the nightly build and it behaves in the exact same way, notifying the same errors.
Switching from one version to the other, I watched the behavior on startup, though, which I did not consider previously. The original script (the one with gdi.Font()) always crashes on startup and at the first attempt to reload it. Subsequent attempts alternate success and failure.
The "control" script (the one with window.GetFontCUI()) totally freezes foobar2000 on startup. I can hear the sound of the crash notification, but all I see is a blank window preview when I move the mouse over the taskbar icon (see the attached picture). I can start foobar2000 (albeit with a crash) only with the original script and replace it with the control script only once foobar2000 is running. The control script will than work and crash every other time.

Something I did not mention before is that it is not a proper crash: the code stops working, but the last painted window is not replaced by the "Aw, crashed :(" orange window (I have to manually resize the window to trigger that).


As for `gr.FillSolidRect(this.x, this.y, this.width, this.height, colours.LightGray);` error, this usually happens when you supply invalid dimensions. E.g. zero height or width.
For doubt's sake I outputted the FillSolidRect() arguments to the console and they are the same the one time it crashes and the one it works. 


P.S.
Maybe it's a clue, maybe not: I tried reverting to SMP v1.2.1 and found out that with this older version both scripts freeze foobar2000 on startup.
I'm late

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #314
Hello @TheQwertiest, I do not know why but yesterday I had again Out-of-memory errors (3 or 4 in a couple of hours) running Library Tree and the beta of SMP 1.2.3 dated (build 11 of November).
I do not remember to have done something different or unusual than the previous days...
The only big change in between is Windows 10 update from 1903 to 1909.
Kindly let me know if you need me collecting specific data/logs.
Regards, Andrea

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #315
Unresponsive script - Don't ask me again - Option NOT working

Hello @TheQwertiest, I noticed that even if I select the option "Don't ask me again", it doesn't work and every time I restart Foorbar I get the notifying window herein attached.

Kind regards, Andrea

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #316
Unresponsive script - Don't ask me again - Option NOT working
It's not supposed to persist between fb2k restarts, i.e. it's intentional. It only suppresses the warning in the current panel for the current fb2k instance.

Regarding OOM errors: not sure what I can do to help you. As I've said before, your library *is* huge and WilB's script is not designed for minimal memory usage (the performance of the script would have been likely worse if it was though - time-memory trade-off and all that). Maybe playing around with GC settings might help you (i.e. in preferences > advanced), but I have no specific suggestions :\

@davideleo , can you provide the script that reproduces the problem?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #317
@TheQwertiest, many thanks for your kind reply.
All the best, Andrea

 
SimplePortal 1.0.0 RC1 © 2008-2019