bugCompact Disc Input and Control Library - Bugs: bug #38421, Disc with 99 is tracks gives...

 
 

bug #38421: Disc with 99 is tracks gives "Invalid track number".

Submitted by:  Jamie Daws <jawsdaws>
Submitted on:  Wed 27 Feb 2013 01:25:07 AM UTC  
 
Category: run-time errorSeverity: 5 - Average
Item Group: libcdioStatus: Fixed
Privacy: PublicAssigned to: Rocky Bernstein <rocky>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 21 May 2013 12:00:53 PM UTC, comment #14:

Sorry Rocky. I'm am no longer able to test this. :-)

Jamie Daws <jawsdaws>
Fri 17 May 2013 01:08:00 AM UTC, comment #13:

With commit ceb2b7120d3aee2b8aa55002c10c9532c906e3de to libcdio on savannah.gnu.org and commit c94fcc7b041f872d3ffd5ba2642c27ba6cfabe70 to libcdio-paranoia on github, I think this is now fixed.

I'd appreciate if you could try these versions to make sure this really addresses the problem.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Sat 04 May 2013 12:51:25 AM UTC, comment #12:

You were right. It did not work. I would be willing to ship you the CD if that would help. I've now listened to the book, so I'd be willing to donate it to the cause. :-)

cd-info version 0.83 x86_64-pc-linux-gnu
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
CD location : /dev/cdrom
CD driver name: GNU/Linux
access mode: IOCTL

Vendor : hp
Model : DVDWBD TS-LB23P
Revision : HB21
Hardware : CD-ROM or DVD
Can eject : Yes
Can close tray : Yes
Can disable manual eject : Yes
Can select juke-box disc : No

Can set drive speed : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device : Yes

Reading....
Can read Mode 2 Form 1 : Yes
Can read Mode 2 Form 2 : Yes
Can read (S)VCD (i.e. Mode 2 Form 1/2) : Yes
Can read C2 Errors : Yes
Can read IRSC : Yes
Can read Media Channel Number (or UPC) : Yes
Can play audio : Yes
Can read CD-DA : Yes
Can read CD-R : Yes
Can read CD-RW : Yes
Can read DVD-ROM : Yes

Writing....
Can write CD-RW : Yes
Can write DVD-R : Yes
Can write DVD-RAM : Yes
Can write DVD-RW : No
Can write DVD+RW : No
________________________________

Disc mode is listed as: CD-DA
CD-ROM Track List (1 - 99)
#: MSF LSN Type Green? Copy? Channels Premphasis?
1: 00:02:00 000000 audio true yes 2 no
2: 00:30:49 002149 audio true yes 2 no
3: 01:15:39 005514 audio true yes 2 no
4: 02:00:53 008903 audio true yes 2 no
5: 02:45:01 012226 audio true yes 2 no
6: 03:29:58 015583 audio true yes 2 no
7: 04:12:24 018774 audio true yes 2 no
8: 04:59:03 022278 audio true yes 2 no
9: 05:44:23 025673 audio true yes 2 no
10: 06:28:07 028957 audio true yes 2 no
11: 07:13:56 032381 audio true yes 2 no
12: 07:59:02 035777 audio true yes 2 no
13: 08:42:30 039030 audio true yes 2 no
14: 09:29:12 042537 audio true yes 2 no
15: 10:15:07 045982 audio true yes 2 no
16: 11:01:02 049427 audio true yes 2 no
17: 11:45:45 052770 audio true yes 2 no
18: 12:31:26 056201 audio true yes 2 no
19: 13:16:05 059555 audio true yes 2 no
20: 14:01:64 062989 audio true yes 2 no
21: 14:46:54 066354 audio true yes 2 no
22: 15:31:16 069691 audio true yes 2 no
23: 16:15:52 073027 audio true yes 2 no
24: 17:00:28 076378 audio true yes 2 no
25: 17:44:19 079669 audio true yes 2 no
26: 18:31:09 083184 audio true yes 2 no
27: 19:16:12 086562 audio true yes 2 no
28: 20:00:04 089854 audio true yes 2 no
29: 20:46:02 093302 audio true yes 2 no
30: 21:33:54 096879 audio true yes 2 no
31: 22:17:04 100129 audio true yes 2 no
32: 23:02:66 103566 audio true yes 2 no
33: 23:45:74 106799 audio true yes 2 no
34: 24:31:30 110205 audio true yes 2 no
35: 25:18:37 113737 audio true yes 2 no
36: 26:02:45 117045 audio true yes 2 no
37: 26:48:54 120504 audio true yes 2 no
38: 27:34:00 123900 audio true yes 2 no
39: 28:20:19 127369 audio true yes 2 no
40: 29:05:09 130734 audio true yes 2 no
41: 29:51:21 134196 audio true yes 2 no
42: 30:36:28 137578 audio true yes 2 no
43: 31:23:73 141148 audio true yes 2 no
44: 32:06:52 144352 audio true yes 2 no
45: 32:50:47 147647 audio true yes 2 no
46: 33:36:17 151067 audio true yes 2 no
47: 34:22:33 154533 audio true yes 2 no
48: 35:09:08 158033 audio true yes 2 no
49: 35:53:17 161342 audio true yes 2 no
50: 36:37:30 164655 audio true yes 2 no
51: 37:23:73 168148 audio true yes 2 no
52: 38:09:05 171530 audio true yes 2 no
53: 38:53:03 174828 audio true yes 2 no
54: 39:41:29 178454 audio true yes 2 no
55: 40:27:06 181881 audio true yes 2 no
56: 41:11:67 185242 audio true yes 2 no
57: 41:57:03 188628 audio true yes 2 no
58: 42:42:41 192041 audio true yes 2 no
59: 43:27:24 195399 audio true yes 2 no
60: 44:11:64 198739 audio true yes 2 no
61: 44:59:27 202302 audio true yes 2 no
62: 45:39:71 205346 audio true yes 2 no
63: 46:23:59 208634 audio true yes 2 no
64: 47:07:23 211898 audio true yes 2 no
65: 47:52:19 215269 audio true yes 2 no
66: 48:37:30 218655 audio true yes 2 no
67: 49:21:46 221971 audio true yes 2 no
68: 50:06:39 225339 audio true yes 2 no
69: 50:51:25 228700 audio true yes 2 no
70: 51:37:47 232172 audio true yes 2 no
71: 52:26:12 235812 audio true yes 2 no
72: 53:11:33 239208 audio true yes 2 no
73: 53:56:47 242597 audio true yes 2 no
74: 54:42:21 246021 audio true yes 2 no
75: 55:27:45 249420 audio true yes 2 no
76: 56:14:59 252959 audio true yes 2 no
77: 56:59:52 256327 audio true yes 2 no
78: 57:44:24 259674 audio true yes 2 no
79: 58:31:20 263195 audio true yes 2 no
80: 59:16:69 266619 audio true yes 2 no
81: 60:03:03 270078 audio true yes 2 no
82: 60:47:43 273418 audio true yes 2 no
83: 61:33:65 276890 audio true yes 2 no
84: 62:18:24 280224 audio true yes 2 no
85: 63:02:60 283560 audio true yes 2 no
86: 63:47:22 286897 audio true yes 2 no
87: 64:32:57 290307 audio true yes 2 no
88: 65:16:41 293591 audio true yes 2 no
89: 66:01:48 296973 audio true yes 2 no
90: 66:50:31 300631 audio true yes 2 no
91: 67:36:53 304103 audio true yes 2 no
92: 68:21:29 307454 audio true yes 2 no
93: 69:06:25 310825 audio true yes 2 no
94: 69:51:15 314190 audio true yes 2 no
95: 70:33:20 317345 audio true yes 2 no
96: 71:19:29 320804 audio true yes 2 no
97: 72:05:27 324252 audio true yes 2 no
98: 72:49:36 327561 audio true yes 2 no
99: 73:11:68 329243 audio true yes 2 no
170: 73:56:23 332573 leadout (745 MB raw, 745 MB formatted)
Media Catalog Number (MCN): 0000000000000
TRACK 1 ISRC: 000000000000
TRACK 2 ISRC: 000000000000
TRACK 3 ISRC: 000000000000
TRACK 4 ISRC: 000000000000
TRACK 5 ISRC: 000000000000
TRACK 6 ISRC: 000000000000
TRACK 7 ISRC: 000000000000
TRACK 8 ISRC: 000000000000
TRACK 9 ISRC: 000000000000
TRACK 10 ISRC: 000000000000
TRACK 11 ISRC: 000000000000
TRACK 12 ISRC: 000000000000
TRACK 13 ISRC: 000000000000
TRACK 14 ISRC: 000000000000
TRACK 15 ISRC: 000000000000
TRACK 16 ISRC: 000000000000
TRACK 17 ISRC: 000000000000
TRACK 18 ISRC: 000000000000
TRACK 19 ISRC: 000000000000
TRACK 20 ISRC: 000000000000
TRACK 21 ISRC: 000000000000
TRACK 22 ISRC: 000000000000
TRACK 23 ISRC: 000000000000
TRACK 24 ISRC: 000000000000
TRACK 25 ISRC: 000000000000
TRACK 26 ISRC: 000000000000
TRACK 27 ISRC: 000000000000
TRACK 28 ISRC: 000000000000
TRACK 29 ISRC: 000000000000
TRACK 30 ISRC: 000000000000
TRACK 31 ISRC: 000000000000
TRACK 32 ISRC: 000000000000
TRACK 33 ISRC: 000000000000
TRACK 34 ISRC: 000000000000
TRACK 35 ISRC: 000000000000
TRACK 36 ISRC: 000000000000
TRACK 37 ISRC: 000000000000
TRACK 38 ISRC: 000000000000
TRACK 39 ISRC: 000000000000
TRACK 40 ISRC: 000000000000
TRACK 41 ISRC: 000000000000
TRACK 42 ISRC: 000000000000
TRACK 43 ISRC: 000000000000
TRACK 44 ISRC: 000000000000
TRACK 45 ISRC: 000000000000
TRACK 46 ISRC: 000000000000
TRACK 47 ISRC: 000000000000
TRACK 48 ISRC: 000000000000
TRACK 49 ISRC: 000000000000
TRACK 50 ISRC: 000000000000
TRACK 51 ISRC: 000000000000
TRACK 52 ISRC: 000000000000
TRACK 53 ISRC: 000000000000
TRACK 54 ISRC: 000000000000
TRACK 55 ISRC: 000000000000
TRACK 56 ISRC: 000000000000
TRACK 57 ISRC: 000000000000
TRACK 58 ISRC: 000000000000
TRACK 59 ISRC: 000000000000
TRACK 60 ISRC: 000000000000
TRACK 61 ISRC: 000000000000
TRACK 62 ISRC: 000000000000
TRACK 63 ISRC: 000000000000
TRACK 64 ISRC: 000000000000
TRACK 65 ISRC: 000000000000
TRACK 66 ISRC: 000000000000
TRACK 67 ISRC: 000000000000
TRACK 68 ISRC: 000000000000
TRACK 69 ISRC: 000000000000
TRACK 70 ISRC: 000000000000
TRACK 71 ISRC: 000000000000
TRACK 72 ISRC: 000000000000
TRACK 73 ISRC: 000000000000
TRACK 74 ISRC: 000000000000
TRACK 75 ISRC: 000000000000
TRACK 76 ISRC: 000000000000
TRACK 77 ISRC: 000000000000
TRACK 78 ISRC: 000000000000
TRACK 79 ISRC: 000000000000
TRACK 80 ISRC: 000000000000
TRACK 81 ISRC: 000000000000
TRACK 82 ISRC: 000000000000
TRACK 83 ISRC: 000000000000
TRACK 84 ISRC: 000000000000
TRACK 85 ISRC: 000000000000
TRACK 86 ISRC: 000000000000
TRACK 87 ISRC: 000000000000
TRACK 88 ISRC: 000000000000
TRACK 89 ISRC: 000000000000
TRACK 90 ISRC: 000000000000
TRACK 91 ISRC: 000000000000
TRACK 92 ISRC: 000000000000
TRACK 93 ISRC: 000000000000
TRACK 94 ISRC: 000000000000
TRACK 95 ISRC: 000000000000
TRACK 96 ISRC: 000000000000
TRACK 97 ISRC: 000000000000
TRACK 98 ISRC: 000000000000
TRACK 99 ISRC: 000000000000
Last CD Session LSN: 0
audio status: no status
volume level port 0: 255 (0..255) 100 (0..100)
volume level port 1: 255 (0..255) 100 (0..100)
volume level port 2: 0 (0..255) 0 (0..100)
volume level port 3: 0 (0..255) 0 (0..100)
________________________________
CD Analysis Report

Jamie Daws <jawsdaws>
Mon 01 Apr 2013 06:12:31 PM UTC, comment #11:

Sorry, I'll have to wait a few weeks to work on this. Classes are really crazy at the moment.

Jamie Daws <jawsdaws>
Mon 01 Apr 2013 02:05:28 AM UTC, comment #10:

I spent a while looking at this today. I am not totally sure I reproduced the problem, although there is chance that 366feb3 may do better.

Part of the problem I have is that creating a disk with 99 tracks is a bit work to do. So instead I tried reducing the maximum number of tracks to a small number.

If this works on the older cd-info from libcdio, and the last change doesn't help (and I suspect it won't), then attach the output from cd-info from libcdio 0.83.

Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Fri 08 Mar 2013 02:28:48 PM UTC, comment #9:

It's from line 269 in lib/driver/track.c

Jamie Daws <jawsdaws>
Fri 08 Mar 2013 11:13:25 AM UTC, comment #8:

Thanks for the information. I'll have to spend some time looking at the code and will probalby have to make a number of tests myself.

If you have a patch or can give me the location of where WARN: 269 comes from that would help.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Thu 07 Mar 2013 07:51:44 PM UTC, comment #7:

I tried the audio disk with a different disto that is using libcdio 0.83 and everything seems to work with 0.83. I then updated to 0.90, and the bug was back. So it would seem the problem was introduced after 0.83. Hope this helps. Thanks again.

Jamie Daws <jawsdaws>
Thu 07 Mar 2013 07:32:04 PM UTC, comment #6:

Sorry for the delay. Unforunatly the bug is still there with your latest code. My current error, after re adding the line numbers is...

<code>
cdparanoia III release 9.8 libcdio 0.90 x86_64-unknown-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>

Report bugs to -unavailable-

++ WARN: 269 Number of tracks exceeds maximum (100 vs. 99)

401: Invalid track number
++ WARN: 269 Number of tracks exceeds maximum (100 vs. 99)

401: Invalid track number
401: Invalid track number
Ripping from sector 0 (track 255 [0:05.26])
to sector -401 (track 0 [0:00.00])

++ WARN: 269 Number of tracks exceeds maximum (100 vs. 99)

++ WARN: 269 Number of tracks exceeds maximum (100 vs. 99)

++ WARN: 269 Number of tracks exceeds maximum (100 vs. 99)

Done.
</code>

Jamie Daws <jawsdaws>
Mon 04 Mar 2013 02:57:17 AM UTC, comment #5:

Thanks for the information a patch locations. Commit 24044c5 now has more of those locations covered.

So please try again and let's see if this helps. If not, if you could add that debug code to the locations as before and send that along I'd appreciate it.

I think eventually we'll get this solved.

Thanks again.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Thu 28 Feb 2013 05:11:51 PM UTC, comment #4:

Ok I did what you said. :-)

Now I'm sure I'm running the right code. I followed your instrutions, and did not see the "this is patched code" message. However, I still got the same errors when I tried to rip the disc. I did quite a bit of digging and then applied my own patches to lib/drivers/tracks.c I just added line numbers to the "Number of tracks exceeds maximum" in tracks.c With my patch, my output is

jamie@Randy ~ $ libcdio-paranoia 1
cdparanoia III release 9.8 libcdio 0.90 x86_64-pc-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>

Report bugs to -unavailable-

++ WARN: 265 Number of tracks exceeds maximum (100 vs. 99)

401: Invalid track number
++ WARN: 265 Number of tracks exceeds maximum (100 vs. 99)

401: Invalid track number
401: Invalid track number
Ripping from sector 0 (track 255 [0:05.26])
to sector -401 (track 0 [0:00.00])

++ WARN: 265 Number of tracks exceeds maximum (100 vs. 99)

++ WARN: 265 Number of tracks exceeds maximum (100 vs. 99)

++ WARN: 265 Number of tracks exceeds maximum (100 vs. 99)

Done.

So that would indicate a problem around line 265 in lib/drivers/tracks.c Sorry, but I tried to figure it out further, but I am a novice coder and can't see what to do next. Hope this helps! Thank you.

Here's my simple patch.

diff --git a/lib/driver/gnu_linux.c b/lib/driver/gnu_linux.c
index b6a554e..2f65db7 100644
--- a/lib/driver/gnu_linux.c
+++ b/lib/driver/gnu_linux.c
@@ -1183,6 +1183,7 @@ read_toc_linux (void *p_user_data)
u_tracks = p_env->gen.i_tracks - p_env->gen.i_first_track;

if (u_tracks > CDIO_CD_MAX_TRACKS) {
+ printf("This code is patched....\n");
cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
u_tracks, CDIO_CD_MAX_TRACKS);
p_env->gen.i_tracks = CDIO_CD_MAX_TRACKS;
diff --git a/lib/driver/track.c b/lib/driver/track.c
index b4953fd..0f226ff 100644
--- a/lib/driver/track.c
+++ b/lib/driver/track.c
@@ -94,7 +94,7 @@ cdio_get_track_channels(const CdIo_t *p_cdio, track_t i_track)
return -1;
}
if (i_track > CDIO_CD_MAX_TRACKS) {
- cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
+ cdio_log(CDIO_LOG_WARN, "97 Number of tracks exceeds maximum (%d vs. %d)\n",
i_track, CDIO_CD_MAX_TRACKS);
return -1;
}
@@ -262,7 +262,7 @@ cdio_get_track_lsn(const CdIo_t *p_cdio, track_t i_track)
return CDIO_INVALID_LSN;
}
if (i_track > CDIO_CD_MAX_TRACKS && i_track != CDIO_CDROM_LEADOUT_TRACK) {
- cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
+ cdio_log(CDIO_LOG_WARN, "265 Number of tracks exceeds maximum (%d vs. %d)\n",
i_track, CDIO_CD_MAX_TRACKS);
return CDIO_INVALID_LSN;
}
@@ -294,7 +294,7 @@ cdio_get_track_isrc (const CdIo_t *p_cdio, track_t i_track)
}

if (i_track > CDIO_CD_MAX_TRACKS) {
- cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
+ cdio_log(CDIO_LOG_WARN, "297 Number of tracks exceeds maximum (%d vs. %d)\n",
i_track, CDIO_CD_MAX_TRACKS);

Jamie Daws <jawsdaws>
Thu 28 Feb 2013 03:38:59 AM UTC, comment #3:

I need more detail and need to make sure you are running the right code.

So follow these instructions.

1. Apply this patch:

diff --git a/lib/driver/gnu_linux.c b/lib/driver/gnu_linux.c
index b6a554e..b4562f6 100644
--- a/lib/driver/gnu_linux.c
+++ b/lib/driver/gnu_linux.c
@@ -1183,6 +1183,7 @@ read_toc_linux (void *p_user_data)
u_tracks = p_env->gen.i_tracks - p_env->gen.i_first_track;

if (u_tracks > CDIO_CD_MAX_TRACKS) {
+ printf("This code is patched....\n");
cdio_log(CDIO_LOG_WARN, "Number of tracks exceeds maximum (%d vs. %d)\n",
u_tracks, CDIO_CD_MAX_TRACKS);
p_env->gen.i_tracks = CDIO_CD_MAX_TRACKS;

For example save it in /tmp/patch.diff and then apply it with:

patch -p1 < /tmp/patch.diff

2. Compile the source and you should see lib/driver/gnu_linux compiled:

make[3]: Entering directory `.../libcdio/lib/driver'
CC gnu_linux.lo
CCLD libcdio.la

3. Rebuild the examples/track program.

cd examples
rm tracks tracks.o
make tracks

4. Run that

./tracks

5. You should see output that includes this line:

This code is patched....

6. If you don't see that output AND things work we are done.
If you don't see that output AND things don't work then either you
are running the wrong code or the path you are taking isn't the one that
I expect.

7. If you do see "the code is patched...." then attach all of the output
that comes out when you run the code.

8. Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 27 Feb 2013 12:41:11 PM UTC, comment #2:

I am indeed on GNU/Linux, but 37f72ed and f7baf26 libcdio still have the error. I'm fairly confident that I've uninstalled the old versions of libcdio/cd-paranoia and rebuilt them properly.

Jamie Daws <jawsdaws>
Wed 27 Feb 2013 01:54:46 AM UTC, comment #1:

I'm assuming you were using the GNU/Linux platform since that is what cd-paranoia only officially runs on.

If so, try using git commit #37f72ed. If that works I'll make the change to the other drivers.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 27 Feb 2013 01:25:07 AM UTC, original submission:

Using Sabayon 11 amd64. The cd has 99 audio tracks, and works fine with cdparanoia III 10.2.

jamie@Randy ~/Rip $ libcdio-paranoia 1
cdparanoia III release 9.8 libcdio 0.90 x86_64-pc-linux-gnu
(C) 2001 Monty <monty@xiph.org> and Xiphophorus
(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>

Report bugs to -unavailable-

++ WARN: Number of tracks exceeds maximum (100 vs. 99)

401: Invalid track number
++ WARN: Number of tracks exceeds maximum (100 vs. 99)

401: Invalid track number
401: Invalid track number
Ripping from sector 0 (track 255 [0:05.26])
to sector -401 (track 0 [0:00.00])

++ WARN: Number of tracks exceeds maximum (100 vs. 99)

++ WARN: Number of tracks exceeds maximum (100 vs. 99)

++ WARN: Number of tracks exceeds maximum (100 vs. 99)

Done.

Jamie Daws <jawsdaws>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rocky (Posted a comment)
  • -unavailable- added by jawsdaws (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Jun 2014 07:08:08 PM UTCrockyOpen/ClosedOpen=>Closed
    Fri 17 May 2013 01:08:00 AM UTCrockyStatusIn Progress=>Fixed
    Wed 27 Feb 2013 01:54:46 AM UTCrockyStatusNone=>In Progress
      Assigned toNone=>rocky

    Back to the top


    Powered by Savane 3.1-cleanup