Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rip of particular disc causes generation of corrupt .cue file and crash #582

Open
eharris opened this issue Oct 18, 2022 · 1 comment
Open

Comments

@eharris
Copy link

eharris commented Oct 18, 2022

I've come across a particular disc, "Rush - Different Stages (Live)" disc 3, that causes whipper to generate a corrupt .cue file and crash.

The problem seems to be related to the first track filename being saved to the .cue incorrectly, as when I manually corrected the first FILE line to reference the correct track 'Rush 03-01 - Bastille Day.flac, changed the .cue to readonly and changed the writeCue method in whipper/common/program.py to ignore if the .cue file is unwritable, the rip comand completed successfully.

Here is the corrupt .cue file that is generated:

REM DISCID 990EAC0B
REM COMMENT "whipper 0.10.0"
CATALOG 0075678312229
FILE "../../../../../../data.wav" WAVE
  TRACK 01 AUDIO
    ISRC USAT27800028
    PREGAP 00:00:32
    INDEX 01 00:00:00
    INDEX 02 00:15:08
  TRACK 02 AUDIO
    ISRC USAT27800029
    INDEX 00 05:01:03
FILE "./Rush 03-02 - By-Tor & The Snow Dog.flac" WAVE
    INDEX 01 00:00:00
FILE "./Rush 03-03 - Xanadu.flac" WAVE
  TRACK 03 AUDIO
    ISRC USAT27800030
    INDEX 01 00:00:00
    INDEX 02 10:24:63
  TRACK 04 AUDIO
    ISRC USAT27800031
    INDEX 00 12:17:63
FILE "./Rush 03-04 - Farewell to Kings.flac" WAVE
    INDEX 01 00:00:00
FILE "./Rush 03-05 - Something for Nothing.flac" WAVE
  TRACK 05 AUDIO
    ISRC USAT27800032
    INDEX 01 00:00:00
FILE "./Rush 03-06 - Cygnus X-1.flac" WAVE
  TRACK 06 AUDIO
    ISRC USAT27800033
    INDEX 01 00:00:00
FILE "./Rush 03-07 - Anthem.flac" WAVE
  TRACK 07 AUDIO
    ISRC USAT27800034
    INDEX 01 00:00:00
  TRACK 08 AUDIO
    ISRC USAT27800035
    INDEX 00 04:39:05
FILE "./Rush 03-08 - Working Man.flac" WAVE
    INDEX 01 00:00:00
FILE "./Rush 03-09 - Fly by Night.flac" WAVE
  TRACK 09 AUDIO
    ISRC USAT27800036
    INDEX 01 00:00:00
FILE "./Rush 03-10 - In the Mood.flac" WAVE
  TRACK 10 AUDIO
    ISRC USAT27800037
    INDEX 01 00:00:00
FILE "./Rush 03-11 - Cinderella Man.flac" WAVE
  TRACK 11 AUDIO
    ISRC USAT27800038
    INDEX 01 00:00:00

Here is the crash traceback (note that line numbers may not be accurate due to local unrelated fixes and improvements in my source tree (these have been submitted as PR's).

Rip quality: 100.00%
INFO:whipper.image.cue:parsing .cue file 'Rush - Different Stages Live (Disc 3 of 3)/Rush - Different Stages Live (Disc 3 of 3).cue'
Traceback (most recent call last):
  File "/usr/bin/whipper", line 33, in <module>
    sys.exit(load_entry_point('whipper==0.10.0', 'console_scripts', 'whipper')())
  File "/usr/lib/python3/dist-packages/whipper/command/main.py", line 61, in main
    ret = cmd.do()
  File "/usr/lib/python3/dist-packages/whipper/command/basecommand.py", line 141, in do
    return self.cmd.do()
  File "/usr/lib/python3/dist-packages/whipper/command/basecommand.py", line 141, in do
    return self.cmd.do()
  File "/usr/lib/python3/dist-packages/whipper/command/cd.py", line 212, in do
    ret = self.doCommand()
  File "/usr/lib/python3/dist-packages/whipper/command/cd.py", line 617, in doCommand
    self.program.verifyImage(self.runner, self.itable)
  File "/usr/lib/python3/dist-packages/whipper/common/program.py", line 641, in verifyImage
    verifytask = image.ImageVerifyTask(cueImage)
  File "/usr/lib/python3/dist-packages/whipper/image/image.py", line 151, in __init__
    path = image.getRealPath(index.path)
  File "/usr/lib/python3/dist-packages/whipper/image/image.py", line 70, in getRealPath
    return self.cue.getRealPath(path)
  File "/usr/lib/python3/dist-packages/whipper/image/cue.py", line 188, in getRealPath
    return common.getRealPath(self._path, path)
  File "/usr/lib/python3/dist-packages/whipper/common/common.py", line 252, in getRealPath
    raise KeyError("Cannot find file for %r" % filePath)
KeyError: "Cannot find file for '../../../../../../data.wav'"
@BBaoVanC
Copy link

I have the same issue, funnily enough with the exact same disc. Any ideas why it's creating the weird file name for the first track?

My cue file (same issue) for good measure
REM DISCID 990EAC0B
REM COMMENT "whipper 0.10.0"
FILE "../../../../../../data.wav" WAVE
  TRACK 01 AUDIO
    ISRC USAT27800028
    PREGAP 00:00:32
    INDEX 01 00:00:00
    INDEX 02 00:15:08
  TRACK 02 AUDIO
    ISRC USAT27800029
    INDEX 00 05:01:03
FILE "02. Rush - By‐Tor & the Snow Dog.flac" WAVE
    INDEX 01 00:00:00
FILE "03. Rush - Xanadu.flac" WAVE
  TRACK 03 AUDIO
    ISRC USAT27800030
    INDEX 01 00:00:00
    INDEX 02 10:24:63
  TRACK 04 AUDIO
    ISRC USAT27800031
    INDEX 00 12:17:63
FILE "04. Rush - Farewell to Kings.flac" WAVE
    INDEX 01 00:00:00
FILE "05. Rush - Something for Nothing.flac" WAVE
  TRACK 05 AUDIO
    ISRC USAT27800032
    INDEX 01 00:00:00
FILE "06. Rush - Cygnus X‐1.flac" WAVE
  TRACK 06 AUDIO
    ISRC USAT27800033
    INDEX 01 00:00:00
FILE "07. Rush - Anthem.flac" WAVE
  TRACK 07 AUDIO
    ISRC USAT27800034
    INDEX 01 00:00:00
  TRACK 08 AUDIO
    ISRC USAT27800035
    INDEX 00 04:39:05
FILE "08. Rush - Working Man.flac" WAVE
    INDEX 01 00:00:00
FILE "09. Rush - Fly by Night.flac" WAVE
  TRACK 09 AUDIO
    ISRC USAT27800036
    INDEX 01 00:00:00
FILE "10. Rush - In the Mood.flac" WAVE
  TRACK 10 AUDIO
    ISRC USAT27800037
    INDEX 01 00:00:00
FILE "11. Rush - Cinderella Man.flac" WAVE
  TRACK 11 AUDIO
    ISRC USAT27800038
    INDEX 01 00:00:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants