EMULAB Forum

clrmamepro [English] => clrmame Discussion => Topic started by: john iv on 23 January 2025, 22:49

Title: Scan deleted my softwarelist.xml
Post by: john iv on 23 January 2025, 22:49
Hi Roman, I've seen this a few times now where a scan is deleting the underlying software.xml file during its scan and failing.
1. Manually output mame.exe -listsoftware > softwarelist.xml
2. Point scanner to softwarelist.xml
3. Observe directory from step 2.
4. Run scanner on softwarelist.xml.
5. softwarelist.xml disappears from directory.
6. Log of scan shows a bunch of 'adding hashes'
7. End of log says, can't parse the softwarelist.xml as it's not there

Any code path that would actually delete the used stand-alone softwarelist.xml?  Attaching log file.

Nightly build from top of tree, x64 Win11.
Title: Re: Scan deleted my softwarelist.xml
Post by: Roman on 24 January 2025, 13:38
Did you touch/add/remove files from the hash folder? If so, such changes are being detected and it regets data
Title: Re: Scan deleted my softwarelist.xml
Post by: john iv on 24 January 2025, 17:51
Nope, not touching those files.
I build mame, bring over all the git \hash contents to its directory then run the mame -listsoftware and run clrmame.  This isn't 100% repro.

Non standard settings, for my filter I'm using (see attached):

It just worked on my morning build, but as I've said I've watched it happen about 4 times throughout the day.  When the scan kills the softwarelist.xml file in the directory, it is not recreated there by the system (I put the softwarelist.xml in the same directory as clrmameui.exe) during the scan.
Title: Re: Scan deleted my softwarelist.xml
Post by: Roman on 24 January 2025, 18:11
Your log says:

2025-01-23 13:10:02   info   hash folder change detected, reloading data

That's happening when it detects a change in the hashfolder.
For detecting a change it builds up a hash from the *.xml files in the specified hashfolder (or MAME's exe hashfolder but I know you're using the settings.xml setting if I'm not mistaken) and it's last written timestamp. If that differs, old export file is removed and gets reimported.

So.....the XML (export) file and MAME's hash files (and your specified hash folder) shouldn't be the same
Title: Re: Scan deleted my softwarelist.xml
Post by: john iv on 24 January 2025, 18:31
Ok, I think I understand.  I can envision a scenario where this may be occuring with me:
1. build mame getting its \hash files as part of my chron job..
2. run scanner, no errors. leave clrmame open.
3. build mame and get its \hash files a second time.
4. run scanner again, hit this issue (do the \hash contents need to change or is a timestamp change sufficient to cause a re-loading?)

So if we're hitting the old export file is removed step, the reimportation in this case is ignoring my filter, and where does the reimportation file live? I have to re-generate the softwarelist.xml manually when this happens.
Title: Re: Scan deleted my softwarelist.xml
Post by: Roman on 24 January 2025, 19:05
I will have a look at it over the weekend or early next week....real life takes over at the moment....
Title: Re: Scan deleted my softwarelist.xml
Post by: Roman on 25 January 2025, 11:07
https://mamedev.emulab.it/clrmamepro/binaries/clrmameUI_20250125.zip

that should do it
Title: Re: Scan deleted my softwarelist.xml
Post by: john iv on 25 January 2025, 17:29
Thanks, will give it a go.  Did you find something?
Title: Re: Scan deleted my softwarelist.xml
Post by: Roman on 25 January 2025, 19:45
Well it simply assumed that the xml file comes from a mame.exe -listsoftware and so it removed the xml file….under the assumption that it recreates it…..but your case is a xml file which was created outside of clrmame
Title: Re: Scan deleted my softwarelist.xml
Post by: john iv on 25 January 2025, 20:03
Cool, thanks for responding to wacky edge cases. ;-)