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: foobar2000 crash [Columns UI Item Details / xSF format tags] (Read 1314 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foobar2000 crash [Columns UI Item Details / xSF format tags]

I'm trying to diagnose an old, unconventional and very fickle bug. I'd appreciate some clues! I started a separate thread because I don't understand where exactly the bug resides, and requires explanation.
There seems to be a nasty interaction between the use of multiple instances of Columns UI's Item Details panel, and accessing of the tags of various xSF format files. Crash logs indicate that it also relates to Visual C++ Runtime.

Here's a video demonstration of the crash being triggered with a fresh portable installation, which I've also zipped and uploaded here, if anyone would like to download it and try reproducing the crash on their systems like in the video. (Hopefully this is allowed, if not the crash can be reproduced following the steps below.)

Here's the details:
- Any version of foobar2000 (as far as I am aware) with Columns UI. I'm using the latest versions.
- Using an xSF format component. I'm using kode54's PSF Decoder with a Final Fantasy 7 Demo PSF set in this example, though from memory the crash can be triggered with any combination of xSF files & decoders.
- There must be two or more Item Details panels in the interface.
- Any occurrence of %title% is removed or //commented out from the first Item Details panel in the splitter.
- Adding some xSF files to a playlist, and either clicking or cycling though them with up/down arrows so that the Item Details panels load tag information.
- Eventually (at an undetermined point), this causes foobar2000 to crash.

I asked kode54 about this several years ago, but he was unable to reproduce the error on his system, leading him to question whether my system was stable. Ultimately I am none the wiser.
In the meantime, I've kept my foobar2000 stable by limiting myself to one Columns UI Item Details panel in the interface, until this past week where I've been experimenting with using more Item Details panels again. Alas, the crash issue remains - I'll unsuspectingly click on an xSF format file, and byebye foobar2000. So I'm hoping for a solution, as it's a bummer having this limitation. Based on my experiences with the portable installation, a possible quick-fix may be invoking %title% somewhere in every Item Details panel I'm using, but that's obviously horrible and if I don't have to resort to that I'd prefer not to, and I'm not sure if it'll even work yet.

Also, for reasons I don't understand, sometimes changes to splitter types or positions in the interface have changed the nature of illegal operations and crash locations reported in crash logs, though most crashes are producing none at all. I've kept the few crash logs that were created in the zip. Here are some bits from various different logs that seem crucial to mention:

Code: [Select]
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 73653620h
Access violation, operation: read, address: 00BD18ABh
---
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 00000000h
Access violation, operation: write, address: 00000000h
Last win32 error: 997
---
Call path:
input_entry::g_open_for_info_read[
---
Crash location:
Module: VCRUNTIME140
Offset: 3840h
Symbol: "memmove" (+470h)
---
Crash location:
Module: KERNELBASE
Offset: 138FC2h
Symbol: "RaiseException" (+62h)
---
Unable to identify crash location!

Hope someone can help. Thanks.

Re: foobar2000 crash [Columns UI Item Details / xSF format tags]

Reply #1
If you scroll to the end of crash.txt (I just look at the last, more recent one), it shows console activity before the crash and yours has a whole bunch of errors...

Code: [Select]
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
File too small to contain a valid header.
Done.
Item details: Error reading file info for track "C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\FF7 Demo - Fighting.minipsf": Failed to load tags
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
File too small to contain a valid header.
Done.
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Item details: Error reading file info for track "C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\FF7 Demo - Fighting.minipsf": Not a PSF file
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
File too small to contain a valid header.
Done.
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Item details: Error reading file info for track "C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\FF7 Demo - Mako Reactor.minipsf": Not a PSF file
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
File too small to contain a valid header.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Item details: Error reading file info for track "C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\FF7 Demo - Opening ~ Bombing Mission.minipsf": Not a PSF file
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
File too small to contain a valid header.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\
Tag detected, attempting to read it.
Done.
Item details: Error reading file info for track "C:\Users\Dave\Desktop\foobar2000\ff7 demo PSF\FF7 Demo - Prelude Remix.minipsf": Not a PSF file

I have zero errors on mine..

Code: [Select]
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Fighting.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Mako Reactor.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Opening ~ Bombing Mission.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.
Opened file: FF7 Demo - Prelude Remix.minipsf
From base path: file://Z:\ff7demo psfs\
Tag detected, attempting to read it.
Done.

If they're the exact same files, maybe you do have a stability problem or issue with other software interfering with the files being read. You should test on another PC if you can.

Re: foobar2000 crash [Columns UI Item Details / xSF format tags]

Reply #2
Thanks for taking a look. They're the exact same files yep. I've been contacted by one other person who says they're experiencing the same behaviour using the build I uploaded, too, with various file reading errors in console:

Quote
As SOON as I make that other details view blank, it will say
Item details: Error reading file info for track "G:\foob\ff7demo psfs\FF7 Demo - Opening ~ Bombing Mission.minipsf": Not a PSF file

So, it seems unlikely that there's an instability unique to my computer. Unfortunately, it still leaves me clueless as to what's going on and where to look next.

Re: foobar2000 crash [Columns UI Item Details / xSF format tags]

Reply #3
When displaying info for a selection, Item details reads the metadata for that track in a background thread.

If this is only happening with one input component, it may be that that input component has threading problems.

BTW I reproduced it once. foobar2000 just disappeared (no crash log); Event Viewer states it was a 0xc0000374 (STATUS_HEAP_CORRUPTION).
.

Re: foobar2000 crash [Columns UI Item Details / xSF format tags]

Reply #4
Thanks for responding musicmusic. From memory the crash happens with all of kode54's xSF format components, of which there are at least half a dozen. It's unfortunate that he couldn't reproduce the crash when I last asked him about it, because now those components are discontinued, unless somebody else with the expertise decides to pick them up again at some point. I fear I may be in a group of one with this problem!

It seems I have the following options, in order of preference:

• It makes no sense to me, but because invoking %title% at least once in each details panel prevents these "not valid" console errors & crashes, I can do that as a quick fix, setting the font size to 1 and colour to the same as the BG so the text isn't visible. It's horrible but maybe the least bad option.
• Roll back to using just one Item Details panel. Would be unfortunate because being able to use multiple panels is saving on non-trivial amount of space on-screen and improving my experience.
• Switch to using the ZXTune component for most of these formats. I have no experience with this component though, so may be a "better the devil you know" kind of situation.
• Mass convert these fantasy emulator music files to mp3 (basically a non-starter!)

Re: foobar2000 crash [Columns UI Item Details / xSF format tags]

Reply #5
You can try this script bundled with my JScript Panel 3 component.

https://jscript-panel.github.io/gallery/text-display/

It runs in the main thread only and never attempts to open files for full metadata. Because it's fb2k 2.0 exclusive, normal title formatting methods return stupidly oversized metadata fields without the extra work needed for 1.x.

edit: maybe item details can be updated to avoid full info reads when fb2k 2.0 is detected??

 

Re: foobar2000 crash [Columns UI Item Details / xSF format tags]

Reply #6
unless somebody else with the expertise decides to pick them up again at some point
Unfortunately, the source code for the components themselves are no longer available (though the underlying libraries are). Not sure if anyone managed to save a copy.

• It makes no sense to me, but because invoking %title% at least once in each details panel prevents these "not valid" console errors & crashes, I can do that as a quick fix, setting the font size to 1 and colour to the same as the BG so the text isn't visible.
It may be enough to affect the timing of things, so that two threads aren't trying to read the same file at once. (First Item details uses the cached metadata, then re-renders once the full metadata has loaded.)

edit: maybe item details can be updated to avoid full info reads when fb2k 2.0 is detected??
Yes, I realised that needs doing when writing the last reply  ;D Unfortunately, it's a bit late for Columns UI 2.0.0 now, but will have a look at it for a version after that.
.