Menu

#11 Segfault when listing "Monsters University"

v1.0 (example)
closed
nobody
segfault (1)
5
2014-10-27
2014-04-19
erik falor
No

lsdvd segfaults when getting a list of chapters for "Monsters University" when launched from dvd::rip.

The offending command is lsdvd -a -n -c -s -v -Op /dev/sr0

GDB shows this output from the corefile:

% gdb -q ./lsdvd core
Reading symbols from /var/tmp/lsdvd-0.16/lsdvd...done.
[New LWP 18472]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `./lsdvd -a -n -c -s -v -Op /dev/sr0'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000400e6c in dvdtime2msec (dt=0x4) at lsdvd.c:88
88 double fps = frames_per_s[(dt->frame_u & 0xc0) >> 6];
(gdb) p dt->frame_u
Cannot access memory at address 0x7

I have determined that the segfault happens only when the -c flag is supplied on the command line.

Discussion

  • Steve Dibb

    Steve Dibb - 2014-09-25

    Only segfaults on showing the chapters? That is really strange. Could you mount the DVD and attach the IFO and BUP files in a tarball / zip? That'll let me look at it and see where the issue is.

    Also, can you paste full output of the command, but add -x to give all the data, and drop the perl output; also do one without -c and one with.

     
  • erik falor

    erik falor - 2014-09-28

    Thank you for looking into this, Steve.

    As it turns out, adding -x to the commandline also triggers the segfault :(

    I've attached the .IFO and .BUP files, as well as what text output lsdvd gives with and without the -c flags. I hope they help! If you need anything else from me, please let me know.

     
  • Steve Dibb

    Steve Dibb - 2014-09-28

    Okay, it's an assert in libdvdread that's failing that's dumping all the garbage, and lsdvd is expecting things to work, and they aren't.

    Basically, the DVD has garbage data on there designed to break DVD rippers. It's not hard to work around though -- we just need to update our code to do more stringent checks to verify everything says what we expect it to be. I've run into a similar one before, also from Disney -- The Black Cauldron. You can see what I came up with here: http://dvds.beandog.org/doku.php/black_cauldron_the

    Believe it or not, there's an easy workaround -- choose a specific track. :)

    This'll jump through all 99, and dump the output to one file. Tweak it to get the output you're looking if needed:

    for x in `seq 1 99`; do lsdvd . -t $x -x -Op 2> /dev/null > /tmp/lsdvd.track.${x}.out; done;
    

    The IFOs gave me exactly what I need to debug it, so, thanks. I'll take a closer look at it and figure out where the bugs are.

    Oh, and if you want to find out what the exact track is, pop the DVD into a DVD player, and have the on-screen display tell you what the exact length of the feature movie is. Some players will also display which track # is playing, too.

     
  • Steve Dibb

    Steve Dibb - 2014-09-30

    Erik,

    Got it fixed in git. :) If you can test it and let me know, that'd be great.

    Old lsdvd output for track 54:

    Title: 54, Length: 01:42:19.834 Chapters: 33, Cells: 209, Audio streams: 05, Subpictures: 06
    

    New lsdvd output for track 54:

    Title: 54, Length: 00:00:00.000 Chapters: 00, Cells: 00, Audio streams: 00, Subpictures: 00
    

    See mailing list for patch, details.

     
  • Steve Dibb

    Steve Dibb - 2014-09-30
    • status: open --> closed
     
  • erik falor

    erik falor - 2014-10-25

    Sorry for the terribly late feedback, but I just wanted to let you know that this fix indeed worked for Monsters University. Thank you very much!

     
  • Steve Dibb

    Steve Dibb - 2014-10-27

    Thanks for letting us know, Erik. The bugfix is also present in our 0.17 release.

     

Log in to post a comment.