jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
432 stars 24 forks source link

1.7 and 1.8: lyrics no longer display and cannot be edited #315

Closed H2Swine closed 3 months ago

H2Swine commented 11 months ago

Upgraded. OpenLyrics panel now shows "Artist:", "Album:" and "Title:" - but no lyrics. Yes the file in question has lyrics in tags. Double-click? Blank pane. Try the one with debug symbols (whatever that is ...), and it doesn't even react to the pane, it asks me whether I want a playlist there.

Reinstall 1.5 or 1.6, and all works again.

fb2k version 2.1 preview 2023-10-13 [x86] (i.e. 32-bit).

jacquesh commented 11 months ago

Hmm, well that's obviously bad. I don't recall making any changes to tag-loading code (certainly not any particularly significant changes), and certainly a basic test of loading from tags on my machine (running fb2k v2.0 x86) works as expected.

Could you upload a debug log of the issue?

H2Swine commented 11 months ago

There is definitely something weird going on here. Pasting from console window:

INFO-OpenLyrics: LyricPanel::compute_background_image took 589us
INFO-OpenLyrics: LyricPanel::compute_background_image took 2198us
Resampler (RetroArch): 44100 Hz sample rate is excluded
INFO-OpenLyrics: Playback is currently active, using the now-playing track for format preview
INFO-OpenLyrics: Spawning editor window...
INFO-OpenLyrics: Expanding lyric text...
INFO-OpenLyrics: Initializing editor window...

Obviously the Resampler message is unrelated. Then afterwards I double-clicked and got the "Spawning editor window" etc. Looks normal?!

Well now I found out about that external window function. Right-click and open that. Now for sudden the lyrics also show in the normal window. Console output:

INFO-OpenLyrics: LyricPanel::compute_background_image took 968us
INFO-OpenLyrics: LyricPanel::compute_background_image took 2005us
INFO-OpenLyrics: Successfully created D3D device using driver type 0x1
INFO-OpenLyrics: ExternalLyricWindow::SetUpDX took 35553us
INFO-OpenLyrics: LyricPanel::compute_background_image took 1014us
INFO-OpenLyrics: DirectX target size has not changed and setup was not forced, skipping setup...
INFO-OpenLyrics: ExternalLyricWindow::SetUpDX took 75us
INFO-OpenLyrics: Successfully created D3D device using driver type 0x1
INFO-OpenLyrics: ExternalLyricWindow::SetUpDX took 18797us
INFO-OpenLyrics: LyricPanel::compute_background_image took 1688us
INFO-OpenLyrics: No search avoidance info available for track
INFO-OpenLyrics: Searching for lyrics for artist='2 Ton Predator', album='Demon Dealer', title='Bone Brigade'...
INFO-OpenLyrics: Searching for lyrics in tag: 'SYNCEDLYRICS'
INFO-OpenLyrics: Searching for lyrics in tag: 'SYNCED LYRICS'
INFO-OpenLyrics: Searching for lyrics in tag: 'LYRICS'
INFO-OpenLyrics: Found lyrics in tag: 'LYRICS'
INFO-OpenLyrics: Searching for lyrics in tag: 'UNSYNCED LYRICS'
INFO-OpenLyrics: Searching for lyrics in tag: 'UNSYNCEDLYRICS'
INFO-OpenLyrics: Successfully retrieved lyrics from source: Metadata tags
INFO-OpenLyrics: Parsing lyrics text...
INFO-OpenLyrics: Loaded lyrics already form a valid UTF-8 sequence
INFO-OpenLyrics: Parsing LRC lyric text...
INFO-OpenLyrics: Lyric loading complete
INFO-OpenLyrics: Skipping lyric save. Type: 1, Local: yes, Timestamped: yes, Autosave: 2

Closing the external window, and it still shows in the OpenLyrics window - and scrolls, because I had synced lyrics.

Now, what next ... open another track with synced lyrics, open the external window, right ... ... change track ... ... fb2k crashes!

H2Swine commented 11 months ago

Edit: Found it, I think. A second OpenLyrics tab.

I have a tabbed UI element. One of those tabs is "a further split": under that tab is another tabbed UI element. There was a second lyrics tab under that one. Removed that, and everything looks good, even after a restart.

Just to be clear, it that second tab is not "new". It would not make any trouble with 1.6.

jacquesh commented 11 months ago

Hmmm, yeah sounds like an issue with handling multiple panels. I had a lot of trouble with that while working on 1.7, but I thought I'd managed to get it fixed properly. That's disappointing.

That seems like it might also explain not seeing lyrics because part of that change was to have just one panel do the searching (rather than having each panel do its own search, which might cause them to interfere with each other and is just more searching than necessary). Sounds like I've missed something in that logic.

I'll look into it but until it gets fixed I guess the workaround is to keep to a single panel. Thanks for the info!

svshepherd commented 11 months ago

Thanks for your work on this. I am also having this problem, and I also have a layout that includes multiple lyrics panels (arranged differently depending on my needs at the time).

svshepherd commented 11 months ago

Follow up: once I chased down which of the lyrics windows was active, all of the windows started showing lyrics. They continued when the next song started -- but were playing the same lyrics as they'd loaded previously, over and over. Feels like a good lead as to what's happening: seems to be that only the one active panel can do load-lyrics process, and it needs to have focus, but all the other panels display whatever's been last loaded.

@H2Swine did you find similar behavior?

H2Swine commented 11 months ago

@svshepherd Didn't outright test - when I deleted the tab containing the second element, and the lyrics started to show, I did not re-add it. But I experenced something "similar" yes. Quoting myself above:

found out about that external window function. Right-click and open that. Now for sudden the lyrics also show in the normal window. Console output:

svshepherd commented 11 months ago

@H2Swine thanks! Nice to triangulate.

cheatfreak47 commented 8 months ago

Confirming this issue, if you have more than one Lyrics panel anywhere in the GUI (even in tabs you aren't actively looking at) all but the first one won't display lyrics correctly unless you go look at that first one. This is a pretty annoying usability issue if you like having multiple layouts.

hkmelee commented 7 months ago

reload music info can be fix problem. foobar2000 v2.1.2[x64] OpenLyrics v1.8

cheatfreak47 commented 3 months ago

can confirm this is fixed, thanks and nice job!