libretro / libretro/libretro-database
libretrodb_tool list issue
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 877
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 24
Description
Guys, i'm hoping you can give me a sanity check on this issue.
I have this bash file:
#bash
for file in *.rdb
do
echo $file\n
libretrodb_tool "$file" list >> "${file%.rdb}.dat"
done
When I simply run the list commands myself, and pipe them to a file, all is well other than the Segmentation fault at the end of each file. No problem, I just remove that programmatically.
When I run the above code, the resulting files have many errors. For example, Tomb Raider.dat ends up like this:
{"sha1": "DE55A7D363A59CF930DAEFBFE2359863B499F527", "md5": "54C65C82FBED56DD47A9914AA1A60482", "crc": "4085E43A", "size": 1282096, "rom_name": "PCTomb5.exe", "description": "Tomb Raider Chronicles (En)", "name": "Tomb Raider Chronicles (En)"}
{"sha1": "E19AE5E7614B65F85CA50375CBB5460AE388481F", "md5": "835ABCC1E4F035CE5B1ACEE2E353ADA3", "crc": "FEF60887", "size": 786432, "rom_name": "tomb4.exe", "description": "Tomb Raider: The Last Revelation (En)", "name": "Tomb Raider: The Last Revelation (En)"}
{"sha1": "8E62F802FC72BE7145B38CF470C3CBAC81875CFA", "md5": "0F092652E6E9831DCB60DD028C343607", "crc": "6782077C", "size": 966656, "rom_name": "tomb3.exe", "description": "Tomb Raider 3 (En)", "name": "Tomb Raider 3 (En)"}
{"sha1": "AED5DA395D95888F63237138593B5ABCC64D6B6A", "md5": "A6E97AB9971C7D94B6F00EE75ECFD4A5", "crc": "4FA5A39B", "size": 912896, "rom_name": "Tomb2.exe", "description": "Tomb Raider 2 (En)", "name": "Tomb Raider 2 (En)"}
{"sha1": "0865F5D6BF0B9641FAF434D7539C21F7BEDC8281", "md5": "29758968E595{"sha1": "DE55A7D363A59CF930DAEFBFE2359863B499F527", "md5": "54C65C82FBED56DD47A9914AA1A60482", "crc": "4085E43A", "size": 1282096, "rom_name": "PCTomb5.exe", "description": "Tomb Raider Chronicles (En)", "name": "Tomb Raider Chronicles (En)"}
{"sha1": "E19AE5E7614B65F85CA50375CBB5460AE388481F", "md5": "835ABCC1E4F035CE5B1ACEE2E353ADA3", "crc": "FEF60887", "size": 786432, "rom_name": "tomb4.exe", "description": "Tomb Raider: The Last Revelation (En)", "name": "Tomb Raider: The Last Revelation (En)"}
{"sha1": "8E62F802FC72BE7145B38CF470C3CBAC81875CFA", "md5": "0F092652E6E9831DCB60DD028C343607", "crc": "6782077C", "size": 966656, "rom_name": "tomb3.exe", "description": "Tomb Raider 3 (En)", "name": "Tomb Raider 3 (En)"}
{"sha1": "AED5DA395D95888F63237138593B5ABCC64D6B6A", "md5": "A6E97AB9971C7D94B6F00EE75ECFD4A5", "crc": "4FA5A39B", "size": 912896, "rom_name": "Tomb2.exe", "description": "Tomb Raider 2 (En)", "name": "Tomb Raider 2 (En)"}
{"sha1": "0865F5D6BF0B9641FAF434D7539C21F7BEDC8281", "md5": "29758968E595
It literally ends right there.
There is a line in Atari - 7800.dat that looks like this:
{"sha1": "2FF076488E39F{"sha1": "58E1A65114689E526AD89A4A47E237161D15AB2B", "md5": "324A08B67016600E5BD21218AA3E84F8", "crc": "629D1032", "size": 49280, "rom_name": "Super Huey UH-IX (USA).a78", "description": "Super Huey UH-IX (USA)", "name": "Super Huey UH-IX (USA)"}
I have no idea what could cause this. It almost seems impossible.
THANK YOU!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the supplied bash loop, a single .rdb file, and libretrodb_tool "$file" list, comparing direct output with redirected output. Trace the list command and its handling of the database and output stream; done means records are not interleaved or truncated and the command exits without a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100