emmercm / igir

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
https://igir.io/
GNU General Public License v3.0
401 stars 18 forks source link

Error: ENOENT: no such file or directory #367

Closed veraciousnottaken closed 1 year ago

veraciousnottaken commented 1 year ago

Paste the command

igir move zip test --input atari-test --output No-Intro --overwrite --dir-dat-name --single --dat "No-Intro Love Pack (PC XML) (2023-03-19).zip" -vv

Describe the bug

Interesting error only when processing dozens of files and a complete No-Intro file. When I put about 700+ files in the atari7800 and atarist directories I get the following error, but when using the same files and --dat contains only atari files then everything finishes without errors

igir move zip test --input atari-test --output No-Intro --overwrite --dir-dat-name --single --dat AtariDAT.zip
 ______   ______   ______  _______
|      \ /      \ |      \|       \
 \$$$$$$|  $$$$$$\ \$$$$$$| $$$$$$$\
  | $$  | $$ __\$$  | $$  | $$__| $$
  | $$  | $$|    \  | $$  | $$    $$   ROM collection manager
  | $$  | $$ \$$$$  | $$  | $$$$$$$\
 _| $$_ | $$__| $$ _| $$_ | $$  | $$   v1.5.0
|   $$ \ \$$    $$|   $$ \| $$  | $$
 \$$$$$$  \$$$$$$  \$$$$$$ \$$   \$$

√ Scanning for DATs ············ | 13 unique DATs found
√ Scanning for ROMs ············ | 696 unique ROMs found
√ Detecting ROM headers ········ | 696 ROMs processed
ERROR: Atari - 7800: No-Intro\Atari - 7800\Asteroids (USA).zip: written zip has the file Asteroids (USA).a78 with the CRC dfb93f40, expected eac69cf0
ERROR: Atari - 7800: No-Intro\Atari - 7800\Choplifter! (USA).zip: written zip has the file Choplifter! (USA).a78 with the CRC 419bff61, expected d3ba607f
ERROR: Atari - 7800: No-Intro\Atari - 7800\Ballblazer (USA).zip: written zip has the file Ballblazer (USA).a78 with the CRC a4c4808b, expected 44615260
ERROR: Atari - 7800: No-Intro\Atari - 7800\Donkey Kong (USA).zip: written zip has the file Donkey Kong (USA).a78 with the CRC 065e063f, expected d7a55f95
ERROR: Atari - 7800: No-Intro\Atari - 7800\Donkey Kong Junior (USA).zip: written zip has the file Donkey Kong Junior (USA).a78 with the CRC 1c5a1082, expected 6e989686
ERROR: Atari - 7800: No-Intro\Atari - 7800\Centipede (USA).zip: written zip has the file Centipede (USA).a78 with the CRC 020efe25, expected 5f94939e
ERROR: Atari - 7800: No-Intro\Atari - 7800\Baseball (Europe).zip: written zip has the file Baseball (Europe).a78 with the CRC 68d48fdc, expected a8189e81
ERROR: Atari - 7800: No-Intro\Atari - 7800\Dig Dug (USA).zip: written zip has the file Dig Dug (USA).a78 with the CRC 50cb13f3, expected 8ead573d
ERROR: Atari - 7800: No-Intro\Atari - 7800\F-18 Hornet (USA).zip: written zip has the file F-18 Hornet (USA).a78 with the CRC 63d1c7c1, expected fa3e8cbb
ERROR: Atari - 7800: No-Intro\Atari - 7800\Desert Falcon (USA).zip: written zip has the file Desert Falcon (USA).a78 with the CRC a1dc0899, expected a6a62e78
ERROR: Atari - 7800: No-Intro\Atari - 7800\Ace of Aces (USA).zip: written zip has the file Ace of Aces (USA).a78 with the CRC 05a2b94c, expected e682c28f
ERROR: Atari - 7800: No-Intro\Atari - 7800\Crack'ed (USA).zip: written zip has the file Crack'ed (USA).a78 with the CRC e645fd1f, expected 61dcc763
ERROR: Atari - 7800: No-Intro\Atari - 7800\Barnyard Blaster (USA).zip: written zip has the file Barnyard Blaster (USA).a78 with the CRC ed0a587d, expected c086ed30
ERROR: Atari - 7800: No-Intro\Atari - 7800\Basketbrawl (USA).zip: written zip has the file Basketbrawl (USA).a78 with the CRC c8b9d7b5, expected fd3aec38
ERROR: Atari - 7800: No-Intro\Atari - 7800\Dark Chambers (USA).zip: written zip has the file Dark Chambers (USA).a78 with the CRC 366777f1, expected b5a87d19
ERROR: Atari - 7800: No-Intro\Atari - 7800\Double Dragon (USA).zip: written zip has the file Double Dragon (USA).a78 with the CRC aa265865, expected 16e2fc12
ERROR: Atari - 7800: No-Intro\Atari - 7800\Crossbow (USA).zip: written zip has the file Crossbow (USA).a78 with the CRC d2ea5686, expected a2678e2d
ERROR: Atari - 7800: No-Intro\Atari - 7800\Alien Brigade (USA).zip: written zip has the file Alien Brigade (USA).a78 with the CRC c8849d36, expected 3cef22ca
ERROR: Atari - 7800: No-Intro\Atari - 7800\Commando (USA).zip: written zip has the file Commando (USA).a78 with the CRC cd1a98c5, expected 81c6c079
ERROR: Atari - 7800: No-Intro\Atari - 7800\Fatal Run (USA).zip: written zip has the file Fatal Run (USA).a78 with the CRC a44df354, expected 718232bb
ERROR: Atari - 7800: No-Intro\Atari - 7800\Food Fight (USA).zip: written zip has the file Food Fight (USA).a78 with the CRC e64a5cde, expected 03ec1894
ERROR: Atari - 7800: No-Intro\Atari - 7800\Galaga (USA).zip: written zip has the file Galaga (USA).a78 with the CRC 1a0a3eb3, expected cffaa1b7
ERROR: Atari - 7800: No-Intro\Atari - 7800\Hat Trick (USA).zip: written zip has the file Hat Trick (USA).a78 with the CRC cf6f4a6c, expected 6247efa8
ERROR: Atari - 7800: No-Intro\Atari - 7800\Joust (USA).zip: written zip has the file Joust (USA).a78 with the CRC 2c430bce, expected fda13f77
ERROR: Atari - 7800: No-Intro\Atari - 7800\Karateka (USA).zip: written zip has the file Karateka (USA).a78 with the CRC fec21472, expected 7089a354
ERROR: Atari - 7800: No-Intro\Atari - 7800\Kung-Fu Master (USA).zip: written zip has the file Kung-Fu Master (USA).a78 with the CRC 297899bb, expected 37816887
ERROR: Atari - 7800: No-Intro\Atari - 7800\Mario Bros. (USA).zip: written zip has the file Mario Bros. (USA).a78 with the CRC 8021a13b, expected 4d072a3e
ERROR: Atari - 7800: No-Intro\Atari - 7800\Ikari Warriors (USA).zip: written zip has the file Ikari Warriors (USA).a78 with the CRC 8a6c1f15, expected aa0cfb30
ERROR: Atari - 7800: No-Intro\Atari - 7800\Klax (USA) (Proto).zip: written zip has the file Klax (USA) (Proto).a78 with the CRC f26621e3, expected 0ae5c4d3
ERROR: Atari - 7800: No-Intro\Atari - 7800\Jinks (USA).zip: written zip has the file Jinks (USA).a78 with the CRC 0818d8cd, expected 9571c998
ERROR: Atari - 7800: No-Intro\Atari - 7800\Impossible Mission (USA).zip: written zip has the file Impossible Mission (USA).a78 with the CRC 3b1f2f47, expected fa0a683e
ERROR: Atari - 7800: No-Intro\Atari - 7800\Ms. Pac-Man (USA).zip: written zip has the file Ms. Pac-Man (USA).a78 with the CRC e42fc700, expected 5ec9c910
ERROR: Atari - 7800: No-Intro\Atari - 7800\Fight Night (USA).zip: written zip has the file Fight Night (USA).a78 with the CRC 720ebc74, expected 28e38bd7
ERROR: Atari - 7800: No-Intro\Atari - 7800\Meltdown (USA).zip: written zip has the file Meltdown (USA).a78 with the CRC 4a8f2171, expected 14502302
ERROR: Atari - 7800: No-Intro\Atari - 7800\Missing in Action (USA) (Proto).zip: written zip has the file Missing in Action (USA) (Proto).a78 with the CRC ff7a4c60, expected c29973d4
ERROR: Atari - 7800: No-Intro\Atari - 7800\Mean 18 Ultimate Golf (USA).zip: written zip has the file Mean 18 Ultimate Golf (USA).a78 with the CRC cf21d9ac, expected d22f4b02
ERROR: Atari - 7800: No-Intro\Atari - 7800\Motor Psycho (USA).zip: written zip has the file Motor Psycho (USA).a78 with the CRC 1e219482, expected fc414689
ERROR: Atari - 7800: No-Intro\Atari - 7800\Mat Mania Challenge (USA).zip: written zip has the file Mat Mania Challenge (USA).a78 with the CRC aba91829, expected 33bb15ac
ERROR: Atari - 7800: No-Intro\Atari - 7800\Midnight Mutants (USA).zip: written zip has the file Midnight Mutants (USA).a78 with the CRC 187ec84e, expected e7157222
ERROR: Atari - 7800: No-Intro\Atari - 7800\Ninja Golf (USA).zip: written zip has the file Ninja Golf (USA).a78 with the CRC cb48e8dc, expected 9e5d3625
ERROR: Atari - 7800: No-Intro\Atari - 7800\One-on-One Basketball (USA).zip: written zip has the file One-on-One Basketball (USA).a78 with the CRC 7d9370fb, expected 34646e22
ERROR: Atari - 7800: No-Intro\Atari - 7800\Robotron - 2084 (USA).zip: written zip has the file Robotron - 2084 (USA).a78 with the CRC cb22305d, expected ab7bc9ce
ERROR: Atari - 7800: No-Intro\Atari - 7800\Pit Fighter (USA) (Proto).zip: written zip has the file Pit Fighter (USA) (Proto).a78 with the CRC a5e75537, expected f29e8142
ERROR: Atari - 7800: No-Intro\Atari - 7800\Pole Position II (USA).zip: written zip has the file Pole Position II (USA).a78 with the CRC a85fb962, expected 4bf501cb
ERROR: Atari - 7800: No-Intro\Atari - 7800\RealSports Baseball (USA).zip: written zip has the file RealSports Baseball (USA).a78 with the CRC b1508030, expected f33bd4fd
ERROR: Atari - 7800: No-Intro\Atari - 7800\Rampage (USA).zip: written zip has the file Rampage (USA).a78 with the CRC 39a316aa, expected 859d9352
ERROR: Atari - 7800: No-Intro\Atari - 7800\Plutos (USA) (Proto).zip: written zip has the file Plutos (USA) (Proto).a78 with the CRC 2f211f7f, expected 9857c02b
ERROR: Atari - 7800: No-Intro\Atari - 7800\Rampart (USA) (Proto).zip: written zip has the file Rampart (USA) (Proto).a78 with the CRC e8c2a662, expected 9113dc54
ERROR: Atari - 7800: No-Intro\Atari - 7800\Super Skateboardin' (USA).zip: written zip has the file Super Skateboardin' (USA).a78 with the CRC 13b68650, expected faa12091
ERROR: Atari - 7800: No-Intro\Atari - 7800\Planet Smashers (Europe).zip: written zip has the file Planet Smashers (Europe).a78 with the CRC 95dc7e96, expected e8929246
ERROR: Atari - 7800: No-Intro\Atari - 7800\Super Huey UH-IX (USA).zip: written zip has the file Super Huey UH-IX (USA).a78 with the CRC 71846500, expected 629d1032
ERROR: Atari - 7800: No-Intro\Atari - 7800\Sentinel (Europe).zip: written zip has the file Sentinel (Europe).a78 with the CRC 47340df9, expected ba588ff0
ERROR: Atari - 7800: No-Intro\Atari - 7800\Scrapyard Dog (USA).zip: written zip has the file Scrapyard Dog (USA).a78 with the CRC 5cc8c34f, expected db61ae81
ERROR: Atari - 7800: No-Intro\Atari - 7800\Sirius (USA) (Proto).zip: written zip has the file Sirius (USA) (Proto).a78 with the CRC 65ae616e, expected 9d3cd869
ERROR: Atari - 7800: No-Intro\Atari - 7800\Tank Command (USA).zip: written zip has the file Tank Command (USA).a78 with the CRC db91b181, expected 9ffc9515
ERROR: Atari - 7800: No-Intro\Atari - 7800\Title Match Pro Wrestling (USA).zip: written zip has the file Title Match Pro Wrestling (USA).a78 with the CRC bc23c57b, expected a5742a96
ERROR: Atari - 7800: No-Intro\Atari - 7800\Summer Games (USA).zip: written zip has the file Summer Games (USA).a78 with the CRC 65c6df3f, expected 8e4cf69c
ERROR: Atari - 7800: No-Intro\Atari - 7800\Tomcat - The F-14 Fighter Simulator (USA).zip: written zip has the file Tomcat - The F-14 Fighter Simulator (USA).a78 with the CRC 513cb9ee, expected ab48f361
ERROR: Atari - 7800: No-Intro\Atari - 7800\Tower Toppler (USA).zip: written zip has the file Tower Toppler (USA).a78 with the CRC 4407ba04, expected f701bd43
ERROR: Atari - 7800: No-Intro\Atari - 7800\Water Ski (USA).zip: written zip has the file Water Ski (USA).a78 with the CRC 930b30df, expected 09a27634
ERROR: Atari - 7800: No-Intro\Atari - 7800\Xevious (USA).zip: written zip has the file Xevious (USA).a78 with the CRC 75fc124f, expected 44584fa2
ERROR: Atari - 7800: No-Intro\Atari - 7800\Touchdown Football (USA).zip: written zip has the file Touchdown Football (USA).a78 with the CRC aae12695, expected 4162e98f
ERROR: Atari - 7800: No-Intro\Atari - 7800\Xenophobe (USA).zip: written zip has the file Xenophobe (USA).a78 with the CRC 5fd9a141, expected 96ee8584
ERROR: Atari - 7800: No-Intro\Atari - 7800\Winter Games (USA).zip: written zip has the file Winter Games (USA).a78 with the CRC 8981b531, expected 12454060
√ Atari - 7800 ················· | 0/2 BIOSes, 58/112 retail releases written
√ Atari - ST ··················· | 314/314 retail releases written
√ Processing DATs ·············· | 13 DATs processed

and vice versa, if I put only the files Lethal Xcess - Wings of Death II (Europe) (Amiga + ST) (Disk A).ipf and B in the atarist directory and use the full No-Intro it is also finishes without errors

Expected behavior

Pass with no errors.

Debug logs

igir move zip test --input atari-test --output No-Intro --overwrite --dir-dat-name --single --dat "No-Intro Love Pack (PC XML) (2023-03-19).zip" -vv
 ______   ______   ______  _______
|      \ /      \ |      \|       \
 \$$$$$$|  $$$$$$\ \$$$$$$| $$$$$$$\
  | $$  | $$ __\$$  | $$  | $$__| $$
  | $$  | $$|    \  | $$  | $$    $$   ROM collection manager
  | $$  | $$ \$$$$  | $$  | $$$$$$$\
 _| $$_ | $$__| $$ _| $$_ | $$  | $$   v1.5.0
|   $$ \ \$$    $$|   $$ \| $$  | $$
 \$$$$$$  \$$$$$$  \$$$$$$ \$$   \$$

INFO:  DATScanner: Scanning DAT files
DEBUG: DATScanner: Found 1 DAT file
DEBUG: DATScanner: Enumerating DAT archives
DEBUG: DATScanner: Deserializing DAT XML to objects
DEBUG: DATScanner: Parsing DAT files
DEBUG: DATScanner: No-Intro Love Pack (PC XML) (2023-03-19).zip|index.txt: failed to parse XML : Non-whitespace before first tag., Line: 0, Column: 1, Char: A
DEBUG: DATScanner: No-Intro Love Pack (PC XML) (2023-03-19).zip|index.txt: SMDB file has no rows
DEBUG: DATScanner: No-Intro Love Pack (PC XML) (2023-03-19).zip|index.txt: failed to parse DAT file
INFO:  DATScanner: Done scanning DAT files
√ Scanning for DATs ············ | 273 unique DATs found
INFO:  ROMScanner: Scanning ROM files
DEBUG: ROMScanner: Found 792 ROM files
INFO:  ROMScanner: Done scanning ROM files
√ Scanning for ROMs ············ | 696 unique ROMs found
INFO:  HeaderProcessor: Processing file headers
INFO:  HeaderProcessor: Done processing file headers
√ Detecting ROM headers ········ | 696 ROMs processed
INFO:  Processing 273 DATs
...
ERROR: ROMWriter: Atari - 7800: No-Intro\Atari - 7800\Xenophobe (USA).zip: written zip has the file Xenophobe (USA).a78 with the CRC 5fd9a141, expected 96ee8584
DEBUG: ROMWriter: Atari - 7800: deleting 1 moved file
INFO:  ROMWriter: Atari - 7800: done writing 65 candidates
INFO:  StatusGenerator: Atari - 7800: Generating ROM statuses
INFO:  StatusGenerator: Atari - 7800: Done generating ROM statuses
√ Atari - 7800 ················· | 0/2 BIOSes, 58/112 retail releases written
DEBUG: CandidateFilter: Atari - ST: generated 252.4MiB of 314 candidates for 404 parents
INFO:  CandidateFilter: Atari - ST: Done generating candidates 231/404 | ETA: 2s
INFO:  PatchCandidateGenerator: Atari - ST: Generating patched candidates
DEBUG: PatchCandidateGenerator: Atari - ST: 0 unique patches found
INFO:  PatchCandidateGenerator: Atari - ST: Done generating patched candidates
INFO:  CandidateFilter: Atari - ST: Filtering candidates
DEBUG: CandidateFilter: Atari - ST: filtered to 252.4MiB of 314 candidates for 404 parents
INFO:  CandidateFilter: Atari - ST: Done filtering candidates| 0/404
INFO:  ROMWriter: Atari - ST: writing 314 candidates
ERROR: ROMWriter: Atari - ST: No-Intro\Atari - ST\Foundation's Waste (Europe) (Coverdisk - The One - Issue 22) (Amiga + ST).zip: failed to create zip : ENOENT: no such file or directory, open 'P:\Retro\igir-tests\atari-test\atarist\Foundation's Waste (Europe) (Coverdisk - '
¤ Processing DATs ·············· | █████████████████████████ | 272/273
» Atari - ST ··················· | ██████████░░░░░░░░░░░░░░░ | 169/404node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open 'P:\Retro\igir-tests\atari-test\atarist\Lethal Xcess - Wings of Death II (Europe) (Amiga + ST) (Disk B).ipf'
Emitted 'error' event on ReadStream instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'P:\\Retro\\igir-tests\\atari-test\\atarist\\Lethal Xcess - Wings of Death II (Europe) (Amiga + ST) (Disk B).ipf'
}

igir version

1.5.0

Node.js version

18.15.0

Operating system

Windows 10

Additional context

No response

emmercm commented 1 year ago

The first set of logs with CRC mismatches is because of #368. No-Intro only has a headerless Atari 7800 DAT, and your input has headered ROMs that are automatically having their header removed.

emmercm commented 1 year ago

I'm pretty sure the second set of logs with the ENOENT error is because of #338.

Was that a fatal error? Did igir exit as a result?

Did that have the same CLI options as the first set of logs?

veraciousnottaken commented 1 year ago

I added CLI options to issue and yes it was fatal, igir exited to command line. The error occurs consistently on that file but it depends on the initial conditions as described.

emmercm commented 1 year ago

I was really hoping that #345 finished covering all test cases for scenarios like this... I'll keep investigating.

emmercm commented 1 year ago

@veraciousnottaken could you run it with -vvv? That will help give verbose output on what is happening with each file.

veraciousnottaken commented 1 year ago

Here's copy and paste from my command prompt with -vvv atari-test.zip, I tried redirect output to file but it's garbage.

emmercm commented 1 year ago

Oh I'm sure all the carriage returns from the progress bars make log redirection awful, that's something I'll have to look into in the future.

I'm still trying to reproduce this on my end, but I think #338 that I'll release today will fix this.

emmercm commented 1 year ago

See if the v1.6.0 that I just released solves this issue for you.

veraciousnottaken commented 1 year ago

This issue is solved, tested it with 18k files with success!

github-actions[bot] commented 1 year ago

:lock: Inactive issue lock

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.