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: JScript Panel (Read 297162 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: JScript Panel

Reply #1275
I would add, that by deselecting Album Art in background, nothing should appear in the background, instead the blur/crop image appears

Nope. :/


Re: JScript Panel

Reply #1276
I would add, that by deselecting Album Art in background, nothing should appear in the background, instead the blur/crop image appears

Nope. :/

Ok I reloaded the sample and it seems to work.

I confirm, the module must be reloaded, configure / samples / Text Display.

Re: JScript Panel

Reply #1277
There may be a bug when using Text Display and toggling album art while listening to streams which supply album art. I'm not doing a new component release just for this but people can download this file and save it inside their component folder\samples\js overwriting the existing file...

https://raw.githubusercontent.com/jscript-panel/component/main/samples/js/text_display.js


Re: JScript Panel

Reply #1278
I installed the last version 3.3.5 and I have a problem in JS Playlist. If I watch the properties of the audio tracks, Foobar2000 mark as "loved", but in the playlist the songs in the mood column shows the heart empty. Another thing I noticed is that the heart is only "clickable" and shows full when the album tracks are independent audio files and are not in the Image+Cue format in FLAC for example, if I click nothing happens. This did not happen previously and in the console nothing appears.

I also tried to clear the authorization on both components Last.fm Playcount Sync / Last.fm Scrobbling and authorize again them, but nothing changes. If I click the "Last.fm Playcount Sync" and then on "import loved tracks" or "show loved tracks" on Library menu, It shows all the tracks correctly.

In any case, the songs played by Foobar2000 are displayed on my Last.fm profile page, it does scrobbling well.

This shows when I click "import loved tracks" on the console.

Last.fm Playcount Sync: On page 1 of 9, 200 matches were found from a possible 200
Last.fm Playcount Sync: On page 2 of 9, 194 matches were found from a possible 200
Last.fm Playcount Sync: On page 3 of 9, 198 matches were found from a possible 200
Last.fm Playcount Sync: On page 5 of 9, 159 matches were found from a possible 200
Last.fm Playcount Sync: On page 6 of 9, 182 matches were found from a possible 200
Last.fm Playcount Sync: On page 4 of 9, 184 matches were found from a possible 200
Last.fm Playcount Sync: On page 8 of 9, 186 matches were found from a possible 200
Last.fm Playcount Sync: On page 7 of 9, 194 matches were found from a possible 200
Last.fm Playcount Sync: On page 9 of 9, 152 matches were found from a possible 154
Have you tried turning it off and on again??

Re: JScript Panel

Reply #1279
By default, JSPlaylist writes a tag named MOOD but you can make it play nice with foo_lastfm_playcount_sync by doing the following:

1) hold shift + win key and then right click the panel>Edit Properties. Enable the last option, "Love tracks with foo_lastfm_playcount_sync"
2) Then right click the panel>Panel Settings>Columns tab. Find Mood in the columns list and edit the title formatting to become...

Code: [Select]
[%lfm_loved%]

Now the column should show loved tracks and clicking the heart should toggle the current value as it's bound to the context menu item which triggers loving/unloving tracks with the playcount sync component.

Re: JScript Panel

Reply #1280
Because this is no longer found in the samples?:

https://gist.githubusercontent.com/marc2k3/1d449cc5bbb2fcfdb51157e49d679ad6/raw/514a4415078ffe4143ba7560ba60a37f5f8e6a17/spinny%2520album%2520art%2520nonsense.txt

For me it's a worthy sample.

One thing I noticed is a freeze when updating the last plays / play count I entered in the text display:

[$crlf()$rgb(31,143,104)📃Last played on $date(%last_played%)$crlf()]

$if(%play_count%,
Track played
$ifequal(%play_count%,1, only once,
$ifequal(%play_count%,2, twice , %play_count% times)),)




Re: JScript Panel

Reply #1281
Quote
Because this is no longer found in the samples?:

It never was.

Quote
For me it's a worthy sample.

Nope. The clue is in the name... "Spinny Album Art Nonsense"

There's nothing I can with regards to its senstivity to other CPU intensive things that might happen in the background. But I really wouldn't expect playback stats updates to trouble it unless you've enabled the option to sync with file tags??

Re: JScript Panel

Reply #1282
If you are referring to the option you see in the image it is disability:



The problem remains.

Re: JScript Panel

Reply #1283
By default, JSPlaylist writes a tag named MOOD but you can make it play nice with foo_lastfm_playcount_sync by doing the following:

1) hold shift + win key and then right click the panel>Edit Properties. Enable the last option, "Love tracks with foo_lastfm_playcount_sync"
2) Then right click the panel>Panel Settings>Columns tab. Find Mood in the columns list and edit the title formatting to become...

Code: [Select]
[%lfm_loved%]

Now the column should show loved tracks and clicking the heart should toggle the current value as it's bound to the context menu item which triggers loving/unloving tracks with the playcount sync component.

Thanks @marc2k3 it works! 😉
Have you tried turning it off and on again??


Re: JScript Panel

Reply #1285
Hi Marc2k3,

I have an issue with the Properties + Other Info (POI) sample, which in my case is set to Follow selected track (playlist). I'm running fooBar 2.1 2023-10-13 x86 with jscript 3.3.5. I made no modifications to the sample or the js sources.

If you select on a (youtube short) track with a "weird" character like a smiley and the file has no length (yet), fooBar immediately crashes to the desktop without writing a crashdump.
If the track has either length or no weird character in the name fooBar does not crash.
I isolated the problem by removing all other panel besides POI and standard Playlist view and fooBar still crashes. My full skin without POI but including a lot of other JS3 stuff does not crash.

If you set POI to Prefer now playing and play some normal audiotrack, fooBar does not crash when you select the video. If you play the video (while another normal track is already playing!) everything is fine. As a result additional info like length is retrieved I think. So the next time you select the video even when POI is set to Follow selected track and you are not playing audio, fooBar does not crash.

Sample:
https://www.youtube.com/shorts/dteLwLlaOvg

www.youtube.com/shorts/dteLwLlaOvg

I checked a lot of youtube videos and as far as I can see the problem only occurs if the video has no length AND weird characters.

Can you look into this?

Re: JScript Panel

Reply #1286
I can't test online clips because I don't have internet on my dev machine.

I guess you could see if this crashes (test in a blank panel, select playlist items to trigger)...

Code: [Select]
function on_item_focus_change() {
var handle = fb.GetFocusItem();
if (!handle) return console.log("nothing selected");

var handles = fb.CreateHandleList(handle);
console.log(JSON.stringify(handles.GetOtherInfo(), null, 4));
}

function on_playlist_switch() {
on_item_focus_change();
}

on_item_focus_change();

If this doesn't crash, try the plain Properties sample. In theory, one of these should crash??

Re: JScript Panel

Reply #1287
I can't test online clips because I don't have internet on my dev machine.

I guess you could see if this crashes (test in a blank panel, select playlist items to trigger)...

Code: [Select]
function on_item_focus_change() {
var handle = fb.GetFocusItem();
if (!handle) return console.log("nothing selected");

var handles = fb.CreateHandleList(handle);
console.log(JSON.stringify(handles.GetOtherInfo(), null, 4));
}

function on_playlist_switch() {
on_item_focus_change();
}

on_item_focus_change();

If this doesn't crash, try the plain Properties sample. In theory, one of these should crash??

DEBUG CODE
I changed the original POI code to your debug code.
If I select a working video it writes the console.log. Log attached to this post.
The moment I select a video with no length and weird character in %title% fooBar crashes immediately. I cannot access the console.log (in what location is it stored?)

PROPERTIES
When I change the POI code to the Properties code, fooBar does not crash if I select a video with no length and weird character in %title%. When I play it, fooBar adds length to the video and it runs fine.



Re: JScript Panel

Reply #1290
Well I'm stumped then. :/

Can you test the Item Properties panel that is part of Columns UI? After adding, you must right click>Options and in the Information sections bit, enable All other sections. Obviously make sure the problematic JSP panel is removed first.

The reason I ask is because both my component this CUI panel are using the same internal fb2k method (track_property_callback_v2) and I really can't understand why it's crashing? If the CUI panel were to crash then I'd figure the bug would be fb2k at fault but it's hard to point fingers when I'm unable to test/reproduce. :O

Re: JScript Panel

Reply #1291
@Defender - I see you have a lot of other components too besides JScript. Including very nasty ones like foo_ui_hacks. Can you check if Windows Event Viewer and its Application log has anything helpful logged about the crash to desktop. It should tell a component name causing the issue.
I was trying to reproduce your crash too. I don't know how you click the video link without it having a length. When foo_youtube is installed just adding the url to playlist gives it length. Nuking foobar's metadata store nukes the length but also the characters you blame for the issue. I created artificial test file with the same tags and no length and can't trigger any crashing.

Re: JScript Panel

Reply #1292
With this update I solved a lot of problems.

Proof that the problem wasn't my skin mod.

Fixed the switch problems I had on the graphics modules, fixed the spin disc rotation much, much smoother.

There remains a very slight problem with the playback statistics with a very slight freeze on the spin discs.

video test:

https://www.youtube.com/watch?v=g9EBLrIe3D8

Re: JScript Panel

Reply #1293
Well I'm stumped then. :/

Can you test the Item Properties panel that is part of Columns UI? After adding, you must right click>Options and in the Information sections bit, enable All other sections. Obviously make sure the problematic JSP panel is removed first.

The reason I ask is because both my component this CUI panel are using the same internal fb2k method (track_property_callback_v2) and I really can't understand why it's crashing? If the CUI panel were to crash then I'd figure the bug would be fb2k at fault but it's hard to point fingers when I'm unable to test/reproduce. :O

CUI-IP. I already did that yesterday with all sections enabled.
CUI-IP does not crash. Probably because it only gives info on the current (already) playing file. No file playing? No info.

As far as I can see your JS-POI already gives info upon the selection of a track but fails on not earlier played files with no length and weird characters in %title% (to be named "culprit" from now on).

Interestingly enough ... if I set JS-POI to Prefer now playing, then play some audiotrack and queue the culprit as the next track. JS-POI does NOT crash when this culprit starts to play and shows the correct information. Also because of playing (with resulting added metadata?) it is no longer a culprit.

Re: JScript Panel

Reply #1294
@Defender - I see you have a lot of other components too besides JScript. Including very nasty ones like foo_ui_hacks. Can you check if Windows Event Viewer and its Application log has anything helpful logged about the crash to desktop. It should tell a component name causing the issue.
I was trying to reproduce your crash too. I don't know how you click the video link without it having a length. When foo_youtube is installed just adding the url to playlist gives it length. Nuking foobar's metadata store nukes the length but also the characters you blame for the issue. I created artificial test file with the same tags and no length and can't trigger any crashing.

@Case and Marc2k3

Yesterday I removed everything in my skin before I started testing except for a panel with JS3-POI and the standard Playlist View. With this minimal skin JS3-POI crashes on a culprit.

fooBar does not write an event in the windows log upon "crashing". Maybe it is just a very fast exit. I do get the "crash" screen upon starting fooBar afterwards though.
If I remove the "running" file after a "crash" I do not get the screen from the screenshot upon restarting fooBar.

I retested my (full) skin now without fui_ui_hacks. Still "crashes".
I don't use foo_ui_hacks in my skin, but need it to reset stuff switching back from Georgia or Georgia-ReBorn with an assigned keyboard shortcut.

Re: JScript Panel

Reply #1295
@Case and Marc2k3

I also deleted my full skin after removing foo_ui_hacks (and Georgia and Georgia-ReBorn from the FCL) and created a new vanilla skin which only contains:
Playlist switcher
JS3-POI
Playlist View

So no code anywhere by me. Exited and restarted fooBar. Still "crashes" when I select a culprit.

Remember ... Crash only occurs:
1) If you are not playing audio and you click on a culprit (JS3-POI selection mode does not matter)
2) Playing an audiofile and you click on a culprit while JS3-POI is in Follow selected track selection mode

Re: JScript Panel

Reply #1296
I don't know about marc2k3, but I'd like to try to replicate the crash if you share a config that does it. If I can replicate it I might be able to help him debug it.

Re: JScript Panel

Reply #1297
I don't know about marc2k3, but I'd like to try to replicate the crash if you share a config that does it. If I can replicate it I might be able to help him debug it.

I'm using Youtube Search component from foo_youtube 3.9 beta 3 (also checked 3.8.1) to search YouTube videos and add them to my playlist.

If you use the default search provider youtube.web in this component it only returns videos with length as far as I can see. It does also return a lot of garbage that plays fine but has no sound and no video. It does not return any Youtube shorts videos. Since all the returned videos and garbage have length JS3-POI does not cause a crash.

If you use youtube-dl as a search provider in this component you don't get the garbage, you get Youtube Shorts videos, but some of those have no length and have weird characters in the title. Upon selecting one of those in a foobar install with JS3-POI in it fooBar crashes.

If I write down the name of one of the culprits, then delete my playlist in foobar, go to youtube in my webbrowser, search for the culprit in my webbrowser on the youtube website, I can play the file just fine inside my webbrowser.
If you select the url and drop it in fooBar it will get no length also. And selecting the file subsequently crashes fooBar if it contains JS3-POI.

If you load the cui-vanilla.fcl or the cui-vanilla+yt-search.fcl and then drop for instance the following url in your playlist fooBar with JS3-POI in it will crash.

www.youtube.com/shorts/RCmvO_9DyyE

I hope you are able to reproduce it now.

Also included a screenshot of my normal skin with a culprit. First track under Youtube Shorts group. No length and weird characters. Instant crash guaranteed.
Second track under shorts also has weird character, but length. So no crash there.

 

Re: JScript Panel

Reply #1298
I can't trigger a crash. I don't know what I'm supposed to search for with the search element in the layout. Everything I try has length. And dragging the url you linked comes up with an entry that has a length.

If you make a fresh portable foobar2000 install without involving any skins and just install JScript panel and youtube-dl, can you make things crash?

If you have a way to reproduce the crash easily I really don't understand why you don't provide a simple config that shows it. Should be super simple to make a minimal foobar with the required components and configs that crashes just by clicking the playlist entry. Then just zip/7zip/rar that dir up and share.

Re: JScript Panel

Reply #1299
I managed to trigger the crash (it wasn't easy since there are quite a few prerequisities...) It was logged in the Windows Event Viewer:

Code: [Select]
Faulting application name: foobar2000.exe, version: 2.1.0.0, time stamp: 0x65292aa0
Faulting module name: jscript9.dll, version: 11.0.19041.3570, time stamp: 0x8ebdb297
Exception code: 0xc0000602
Fault offset: 0x0019803c
Faulting process ID: 0x5fa8
Faulting application start time: 0x01da03939e0484ac
Faulting application path: F:\foobar2000\foobar2000-2.1-x86\foobar2000.exe
Faulting module path: C:\Windows\System32\jscript9.dll
Report ID: 569abd91-ea0c-436e-af4d-4668eac781f2
Faulting package full name:
Faulting package-relative application ID:

The exception code is STATUS_FAIL_FAST_EXCEPTION ('A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.')

I've attached an FPL file that may trigger it for other people (with the right set-up).
.