whipper-team / whipper

Python CD-DA ripper preferring accuracy over speed
GNU General Public License v3.0
1.14k stars 89 forks source link

whipper crashes after tracking. #516

Open lockheed opened 3 years ago

lockheed commented 3 years ago

Whatever CD I try to rip, whipper either stops (because CD cannot be found in Accurip DB) or (for those CDs that can be found) it crashes on a later stage, after scanning tracks. For example:

$ whipper cd rip INFO:whipper.command.cd:using configured read offset 102 INFO:whipper.command.cd:checking device /dev/sr0 WARNING:whipper.program.utils:command 'eject -t /dev/sr0' returned with exit code '1' (b'eject: CD-ROM tray close command failed: Input/output error') CDDB disc id: fa109a11 MusicBrainz disc id rg3Dt3UdQfTQpGkS0xkPa5XZJkI- MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+17+318920+150+3439+19876+36824+54498+71600+96693+125918+152787+172373+183675+203151+214774+234411+249856+270098+287688&tracks=17&id=rg3Dt3UdQfTQpGkS0xkPa5XZJkI- Disc duration: 01:10:50.266, 17 audio tracks

Matching releases:

Artist : Various Artists Title : Siesta 8 - Muzyka Świata & Stare Radio (Disc 1 of 2): Muzyka Świata Duration: 01:11:03.906 URL : https://musicbrainz.org/release/14d2d27e-4571-4505-bac9-1c0346c7c040 Release : 14d2d27e-4571-4505-bac9-1c0346c7c040 Type : Compilation Barcode : 600753409374 Country : Poland Cat no : 5340937

Track 1 finished, found 699 Q sub-channels with CRC errors Track 2 finished, found 5528 Q sub-channels with CRC errors Track 3 finished, found 5863 Q sub-channels with CRC errors Track 4 finished, found 5917 Q sub-channels with CRC errors Track 5 finished, found 5628 Q sub-channels with CRC errors Track 6 finished, found 8094 Q sub-channels with CRC errors Track 7 finished, found 10135 Q sub-channels with CRC errors Track 8 finished, found 8929 Q sub-channels with CRC errors Track 9 finished, found 157 Q sub-channels with CRC errors Track 10 finished, found 3701 Q sub-channels with CRC errors Track 11 finished, found 6733 Q sub-channels with CRC errors Track 12 finished, found 3510 Q sub-channels with CRC errors Track 13 finished, found 6967 Q sub-channels with CRC errors Track 14 finished, found 4767 Q sub-channels with CRC errors Track 15 finished, found 7194 Q sub-channels with CRC errors Track 16 finished, found 5738 Q sub-channels with CRC errors Track 17 finished, found 10305 Q sub-channels with CRC errors Traceback (most recent call last): File "/snap/whipper/25/usr/bin/whipper", line 11, in load_entry_point('whipper==0.9.1.dev100+g04ff005', 'console_scripts', 'whipper')() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/main.py", line 56, in main ret = cmd.do() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/cd.py", line 155, in do self.itable = self.program.getTable(self.runner, File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/common/program.py", line 135, in getTable itable.getMusicBrainzDiscId()) File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/image/table.py", line 372, in getMusicBrainzDiscId disc = put(values[0], values[1], values[2], values[3:]) File "/snap/whipper/25/usr/lib/python3/dist-packages/discid/disc.py", line 76, in put disc.put(first, last, disc_sectors, track_offsets) File "/snap/whipper/25/usr/lib/python3/dist-packages/discid/disc.py", line 176, in put raise TOCError(self._get_error_msg()) discid.disc.TOCError: Disc too long

or another case

Track 1 finished, found 6186 Q sub-channels with CRC errors Track 2 finished, found 4891 Q sub-channels with CRC errors Track 3 finished, found 5003 Q sub-channels with CRC errors Track 4 finished, found 6576 Q sub-channels with CRC errors Track 5 finished, found 1714 Q sub-channels with CRC errors Track 6 finished, found 5650 Q sub-channels with CRC errors Track 7 finished, found 6089 Q sub-channels with CRC errors Track 8 finished, found 6298 Q sub-channels with CRC errors Track 9 finished, found 877 Q sub-channels with CRC errors Track 10 finished, found 6159 Q sub-channels with CRC errors Track 11 finished, found 5402 Q sub-channels with CRC errors Track 12 finished, found 4892 Q sub-channels with CRC errors Track 13 finished, found 5268 Q sub-channels with CRC errors Track 14 finished, found 5521 Q sub-channels with CRC errors Track 15 finished, found 7095 Q sub-channels with CRC errors Track 16 finished, found 5975 Q sub-channels with CRC errors Traceback (most recent call last): File "/snap/whipper/25/usr/bin/whipper", line 11, in load_entry_point('whipper==0.9.1.dev100+g04ff005', 'console_scripts', 'whipper')() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/main.py", line 56, in main ret = cmd.do() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/basecommand.py", line 141, in do return self.cmd.do() File "/snap/whipper/25/usr/lib/python3/dist-packages/whipper/command/cd.py", line 160, in do assert self.itable.getCDDBDiscId() == self.ittoc.getCDDBDiscId(), \ AssertionError: full table's id ed141f10 differs from toc id ef0d6410

This issue is the same whether I am using SNAP version, or build from source (both cases the latest release of whipper).

github-actions[bot] commented 3 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing instructions.

JoeLametta commented 3 years ago

Hi, could you try ripping those CDs again in whipper as explained here? Could you also run the following commands on the same device (same CDs), then post the content of the generated files (cdrdao_disk-info_CD1.log, cdrdao_read-toc_fast_CD1.log, cdrdao_read-toc_slow_CD1.log, cdrdao_fast_CD1.toc, cdrdao_slow_CD1.toc, cdrdao_disk-info_CD2.log, cdrdao_read-toc_fast_CD2.log, cdrdao_read-toc_slow_CD2.log, cdrdao_fast_CD2.toc, cdrdao_slow_CD2.toc)?

For the first CD:

sudo umount /dev/sr0
cdrdao disk-info --device /dev/sr0 > cdrdao_disk-info_CD1.log 2>&1
cdrdao read-toc --device /dev/sr0 --fast-toc cdrdao_fast_CD1.toc > cdrdao_read-toc_fast_CD1.log 2>&1
cdrdao read-toc --device /dev/sr0 cdrdao_slow_CD1.toc > cdrdao_read-toc_slow_CD1.log 2>&1

For the other CD:

sudo umount /dev/sr0
cdrdao disk-info --device /dev/sr0 > cdrdao_disk-info_CD2.log 2>&1
cdrdao read-toc --device /dev/sr0 --fast-toc cdrdao_fast_CD2.toc > cdrdao_read-toc_fast_CD2.log 2>&1
cdrdao read-toc --device /dev/sr0 cdrdao_slow_CD2.toc > cdrdao_read-toc_slow_CD2.log 2>&1

BTW: which CD drive are you using?

lockheed commented 3 years ago

Thanks for the tips.

  1. When I run whipper cd rip -L eac I get
    
    $ whipper cd rip -L eac
    INFO:whipper.command.cd:using configured read offset 102
    CRITICAL:whipper.command.cd:No logger named eac found!
    Traceback (most recent call last):
    File "/usr/lib/python3.9/site-packages/whipper/command/cd.py", line 317, in handle_arguments
    self.logger = result.getLoggers()[self.options.logger]()
    KeyError: 'eac'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/whipper", line 33, in sys.exit(load_entry_point('whipper==0.9.0', 'console_scripts', 'whipper')()) File "/usr/lib/python3.9/site-packages/whipper/command/main.py", line 42, in main cmd = Whipper(sys.argv[1:], os.path.basename(sys.argv[0]), None) File "/usr/lib/python3.9/site-packages/whipper/command/basecommand.py", line 114, in init self.cmd = self.subcommands[self.options.remainder[0]]( File "/usr/lib/python3.9/site-packages/whipper/command/basecommand.py", line 114, in init self.cmd = self.subcommands[self.options.remainder[0]]( File "/usr/lib/python3.9/site-packages/whipper/command/basecommand.py", line 104, in init self.handle_arguments() File "/usr/lib/python3.9/site-packages/whipper/command/cd.py", line 321, in handle_arguments raise ValueError(msg) ValueError: No logger named eac found!



When I run 'whipper cd rip -h' I do not see any section listing installed loggers.

2. I uploaded logs for CD1 here: https://filebin.net/snufw3iv0g3eknhc/CD1_logs.zip?t=mevu13km  (link will expire in 1 week).
I do not remember what was CD2 so let's put that one on hold.
JoeLametta commented 3 years ago
1. When I run
   whipper cd rip -L eac

[...] When I run 'whipper cd rip -h' I do not see any section listing installed loggers.

Do you need an alternative logger? Anyway that probably happens because you've not installed the eac logger plugin (link here).

Analyzing the provided files it seems that the toc file generated by cdrdao's slow read-toc pass isn't correct:

diff

cdrdao's toc2cue command produces the following cue sheet for the fast toc file:

toc2cue fast toc ``` FILE "data.wav" BINARY TRACK 01 AUDIO FLAGS DCP INDEX 01 00:00:00 TRACK 02 AUDIO FLAGS DCP INDEX 01 00:43:64 TRACK 03 AUDIO FLAGS DCP INDEX 01 04:23:01 TRACK 04 AUDIO FLAGS DCP INDEX 01 08:08:74 TRACK 05 AUDIO FLAGS DCP INDEX 01 12:04:48 TRACK 06 AUDIO FLAGS DCP INDEX 01 15:52:50 TRACK 07 AUDIO FLAGS DCP INDEX 01 21:27:18 TRACK 08 AUDIO FLAGS DCP INDEX 01 27:56:68 TRACK 09 AUDIO FLAGS DCP INDEX 01 33:55:12 TRACK 10 AUDIO FLAGS DCP INDEX 01 38:16:23 TRACK 11 AUDIO FLAGS DCP INDEX 01 40:47:00 TRACK 12 AUDIO FLAGS DCP INDEX 01 45:06:51 TRACK 13 AUDIO FLAGS DCP INDEX 01 47:41:49 TRACK 14 AUDIO FLAGS DCP INDEX 01 52:03:36 TRACK 15 AUDIO FLAGS DCP INDEX 01 55:29:31 TRACK 16 AUDIO FLAGS DCP INDEX 01 59:59:23 TRACK 17 AUDIO FLAGS DCP INDEX 01 63:53:63 ```

And this one for the slow toc:

toc2cue slow toc ``` FILE "data.wav" BINARY TRACK 01 AUDIO FLAGS DCP INDEX 01 00:00:00 TRACK 02 AUDIO FLAGS DCP INDEX 01 00:43:64 TRACK 03 AUDIO FLAGS DCP INDEX 01 04:23:01 TRACK 04 AUDIO FLAGS DCP INDEX 01 08:08:74 TRACK 05 AUDIO FLAGS DCP INDEX 01 12:04:48 TRACK 06 AUDIO FLAGS DCP INDEX 01 15:52:50 TRACK 07 AUDIO FLAGS DCP INDEX 01 21:27:18 TRACK 08 AUDIO FLAGS DCP INDEX 01 27:56:68 TRACK 09 AUDIO FLAGS DCP INDEX 01 33:55:12 TRACK 10 AUDIO FLAGS DCP INDEX 00 70:50:20 INDEX 01 109:08:43 TRACK 11 AUDIO FLAGS DCP INDEX 01 111:39:20 TRACK 12 AUDIO FLAGS DCP INDEX 01 115:58:71 TRACK 13 AUDIO FLAGS DCP INDEX 01 118:33:69 TRACK 14 AUDIO FLAGS DCP INDEX 01 122:55:56 TRACK 15 AUDIO FLAGS DCP INDEX 01 126:21:51 TRACK 16 AUDIO FLAGS DCP INDEX 01 130:51:43 TRACK 17 AUDIO FLAGS DCP INDEX 01 134:46:08 ``` Unfortunately this looks like an upstream bug in cdrdao.