After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 158462 - [dvdreadsrc] invalid reads / is_nav_pack assertion failure
[dvdreadsrc] invalid reads / is_nav_pack assertion failure
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal blocker
: 0.8.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-16 16:00 UTC by Tim-Philipp Müller
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (1.64 KB, patch)
2004-11-22 11:06 UTC, Tim-Philipp Müller
none Details | Review

Description Tim-Philipp Müller 2004-11-16 16:00:35 UTC
Using dvdreadsrc I came across strange failures, like the scheduler erroring 
out for no reason whatsoever, or  
 
   dvdreadsrc.c:516: _read: Assertion `is_nav_pack (data)' failed. 
 
assertion failures. 
 
Valgrind shows this (incl. gst-debug stuff for dvdreadsrc): 
 
DEBUG (0x1c47f788 - 305727:28:00.188537000)      dvdreadsrc(24430) 
dvdreadsrc.c(665):dvdreadsrc_change_state: gstdvdreadsrc: state pending 2 
libdvdread: Using libdvdcss version 1.2.8 for DVD access 
LOG   (0x1c47f788 - 305727:28:00.531832000)      dvdreadsrc(24430) 
dvdreadsrc.c(369):_seek: There are 8 titles on this DVD 
LOG   (0x1c47f788 - 305727:28:00.534591000)      dvdreadsrc(24430) 
dvdreadsrc.c(383):_seek: There are 1 chapters in this title 
LOG   (0x1c47f788 - 305727:28:00.536601000)      dvdreadsrc(24430) 
dvdreadsrc.c(398):_seek: There are 1 angles available in this title 
 
libdvdread: Attempting to retrieve all CSS keys 
libdvdread: (snip) 
libdvdread: Elapsed time 0 
libdvdread: Found 1 VTS's 
libdvdread: Elapsed time 1 
DEBUG (0x1c47f788 - 305727:28:01.481455000)      dvdreadsrc(24430) 
dvdreadsrc.c(665):dvdreadsrc_change_state: gstdvdreadsrc: state pending 4 
DEBUG (0x1c47f788 - 305727:28:01.512332000)      dvdreadsrc(24430) 
dvdreadsrc.c(665):dvdreadsrc_change_state: gstdvdreadsrc: state pending 8 
LOG   (0x1c8125a0 - 305727:28:01.582932000)      dvdreadsrc(24430) 
dvdreadsrc.c(369):_seek: There are 8 titles on this DVD 
LOG   (0x1c8125a0 - 305727:28:01.602962000)      dvdreadsrc(24430) 
dvdreadsrc.c(383):_seek: There are 1 chapters in this title 
LOG   (0x1c8125a0 - 305727:28:01.610617000)      dvdreadsrc(24430) 
dvdreadsrc.c(398):_seek: There are 1 angles available in this title 
 
(thoggen:24430): GStreamer-WARNING **: Unhandled state change from PLAYING to 
READY 
 
(thoggen:24430): GStreamer-WARNING **: Unhandled state change from PLAYING to 
READY 
 
(thoggen:24430): GStreamer-WARNING **: Unhandled state change from PLAYING to 
READY 
No accelerated IMDCT transform found 
 
Thread 4: 
Invalid read of size 1 
   at 0x1CBF128D: _read (dvdreadsrc.c:476) 
   by 0x1CBF167C: dvdreadsrc_get (dvdreadsrc.c:604) 
   by 0x1B95FAE6: gst_pad_call_get_function (gstpad.c:4427) 
   by 0x1B95CB93: gst_pad_pull (gstpad.c:3271) 
   by 0x1CBF6AE4: gst_bytestream_get_next_buf (bytestream.c:156) 
   by 0x1CBF6E43: gst_bytestream_fill_bytes (bytestream.c:230) 
   by 0x1CBF72F0: gst_bytestream_peek_bytes (bytestream.c:351) 
   by 0x1CCC7FDD: find_start_code (gstmpegpacketize.c:189) 
   by 0x1CCC79C7: gst_mpeg_packetize_read (gstmpegpacketize.c:230) 
   by 0x1CCBF5AB: gst_mpeg_parse_loop (gstmpegparse.c:495) 
   by 0x1CCD14B5: loop_group_schedule_function (gstoptimalscheduler.c:1325) 
   by 0x1CCD0D8E: schedule_group (gstoptimalscheduler.c:1151) 
   by 0x1CCD0FDD: gst_opt_scheduler_schedule_run_queue 
(gstoptimalscheduler.c:1198) 
   by 0x1CCD1139: schedule_chain (gstoptimalscheduler.c:1251) 
   by 0x1CCD4F8E: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2613) 
   by 0x1B96A008: gst_scheduler_iterate (gstscheduler.c:738) 
   by 0x1B939227: gst_bin_iterate_func (gstbin.c:1213) 
   by 0x1B9830A8: gst_marshal_BOOLEAN__VOID (gstmarshal.c:509) 
   by 0x1BFE5FB6: g_type_class_meta_marshal (gclosure.c:514) 
   by 0x1BFE5C1F: g_closure_invoke (gclosure.c:437) 
 Address 0x1C644928 is 0 bytes after a block of size 24 alloc'd 
   at 0x1B904EDD: malloc (vg_replace_malloc.c:131) 
   by 0x1C0AB61D: (within /usr/lib/libdvdread.so.3.0.0) 
   by 0x1C0AE589: (within /usr/lib/libdvdread.so.3.0.0) 
   by 0x1C0AE342: ifoRead_PGCIT (in /usr/lib/libdvdread.so.3.0.0) 
   by 0x1C0A8207: ifoOpen (in /usr/lib/libdvdread.so.3.0.0) 
   by 0x1CBF0F85: _seek (dvdreadsrc.c:411) 
   by 0x1CBF1890: dvdreadsrc_get (dvdreadsrc.c:600) 
   by 0x1B95FAE6: gst_pad_call_get_function (gstpad.c:4427) 
   by 0x1B95CB93: gst_pad_pull (gstpad.c:3271) 
   by 0x1CBF6AE4: gst_bytestream_get_next_buf (bytestream.c:156) 
   by 0x1CBF6E43: gst_bytestream_fill_bytes (bytestream.c:230) 
   by 0x1CBF72F0: gst_bytestream_peek_bytes (bytestream.c:351) 
   by 0x1CCC7FDD: find_start_code (gstmpegpacketize.c:189) 
   by 0x1CCC79C7: gst_mpeg_packetize_read (gstmpegpacketize.c:230) 
   by 0x1CCBF5AB: gst_mpeg_parse_loop (gstmpegparse.c:495) 
   by 0x1CCD14B5: loop_group_schedule_function (gstoptimalscheduler.c:1325) 
   by 0x1CCD0D8E: schedule_group (gstoptimalscheduler.c:1151) 
   by 0x1CCD0FDD: gst_opt_scheduler_schedule_run_queue 
(gstoptimalscheduler.c:1198) 
   by 0x1CCD1139: schedule_chain (gstoptimalscheduler.c:1251) 
   by 0x1CCD4F8E: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2613) 
 
Thread 4: 
Invalid read of size 4 
   at 0x1CBF12C0: _read (dvdreadsrc.c:497) 
   by 0x1CBF167C: dvdreadsrc_get (dvdreadsrc.c:604) 
   by 0x1B95FAE6: gst_pad_call_get_function (gstpad.c:4427) 
   by 0x1B95CB93: gst_pad_pull (gstpad.c:3271) 
   by 0x1CBF6AE4: gst_bytestream_get_next_buf (bytestream.c:156) 
   by 0x1CBF6E43: gst_bytestream_fill_bytes (bytestream.c:230) 
   by 0x1CBF72F0: gst_bytestream_peek_bytes (bytestream.c:351) 
   by 0x1CCC7FDD: find_start_code (gstmpegpacketize.c:189) 
   by 0x1CCC79C7: gst_mpeg_packetize_read (gstmpegpacketize.c:230) 
   by 0x1CCBF5AB: gst_mpeg_parse_loop (gstmpegparse.c:495) 
   by 0x1CCD14B5: loop_group_schedule_function (gstoptimalscheduler.c:1325) 
   by 0x1CCD0D8E: schedule_group (gstoptimalscheduler.c:1151) 
   by 0x1CCD0FDD: gst_opt_scheduler_schedule_run_queue 
(gstoptimalscheduler.c:1198) 
   by 0x1CCD1139: schedule_chain (gstoptimalscheduler.c:1251) 
   by 0x1CCD4F8E: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2613) 
   by 0x1B96A008: gst_scheduler_iterate (gstscheduler.c:738) 
   by 0x1B939227: gst_bin_iterate_func (gstbin.c:1213) 
   by 0x1B9830A8: gst_marshal_BOOLEAN__VOID (gstmarshal.c:509) 
   by 0x1BFE5FB6: g_type_class_meta_marshal (gclosure.c:514) 
   by 0x1BFE5C1F: g_closure_invoke (gclosure.c:437) 
 Address 0x1C644930 is 8 bytes after a block of size 24 alloc'd 
   at 0x1B904EDD: malloc (vg_replace_malloc.c:131) 
   by 0x1C0AB61D: (within /usr/lib/libdvdread.so.3.0.0) 
   by 0x1C0AE589: (within /usr/lib/libdvdread.so.3.0.0) 
   by 0x1C0AE342: ifoRead_PGCIT (in /usr/lib/libdvdread.so.3.0.0) 
   by 0x1C0A8207: ifoOpen (in /usr/lib/libdvdread.so.3.0.0) 
   by 0x1CBF0F85: _seek (dvdreadsrc.c:411) 
   by 0x1CBF1890: dvdreadsrc_get (dvdreadsrc.c:600) 
   by 0x1B95FAE6: gst_pad_call_get_function (gstpad.c:4427) 
   by 0x1B95CB93: gst_pad_pull (gstpad.c:3271) 
   by 0x1CBF6AE4: gst_bytestream_get_next_buf (bytestream.c:156) 
   by 0x1CBF6E43: gst_bytestream_fill_bytes (bytestream.c:230) 
   by 0x1CBF72F0: gst_bytestream_peek_bytes (bytestream.c:351) 
   by 0x1CCC7FDD: find_start_code (gstmpegpacketize.c:189) 
   by 0x1CCC79C7: gst_mpeg_packetize_read (gstmpegpacketize.c:230) 
   by 0x1CCBF5AB: gst_mpeg_parse_loop (gstmpegparse.c:495) 
   by 0x1CCD14B5: loop_group_schedule_function (gstoptimalscheduler.c:1325) 
   by 0x1CCD0D8E: schedule_group (gstoptimalscheduler.c:1151) 
   by 0x1CCD0FDD: gst_opt_scheduler_schedule_run_queue 
(gstoptimalscheduler.c:1198) 
   by 0x1CCD1139: schedule_chain (gstoptimalscheduler.c:1251) 
   by 0x1CCD4F8E: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2613) 
 
Thread 4: 
Invalid read of size 4 
   at 0x1CBF12E6: _read (dvdreadsrc.c:502) 
   by 0x1CBF167C: dvdreadsrc_get (dvdreadsrc.c:604) 
   by 0x1B95FAE6: gst_pad_call_get_function (gstpad.c:4427) 
   by 0x1B95CB93: gst_pad_pull (gstpad.c:3271) 
   by 0x1CBF6AE4: gst_bytestream_get_next_buf (bytestream.c:156) 
   by 0x1CBF6E43: gst_bytestream_fill_bytes (bytestream.c:230) 
   by 0x1CBF72F0: gst_bytestream_peek_bytes (bytestream.c:351) 
   by 0x1CCC7FDD: find_start_code (gstmpegpacketize.c:189) 
   by 0x1CCC79C7: gst_mpeg_packetize_read (gstmpegpacketize.c:230) 
   by 0x1CCBF5AB: gst_mpeg_parse_loop (gstmpegparse.c:495) 
   by 0x1CCD14B5: loop_group_schedule_function (gstoptimalscheduler.c:1325) 
   by 0x1CCD0D8E: schedule_group (gstoptimalscheduler.c:1151) 
   by 0x1CCD0FDD: gst_opt_scheduler_schedule_run_queue 
(gstoptimalscheduler.c:1198) 
   by 0x1CCD1139: schedule_chain (gstoptimalscheduler.c:1251) 
   by 0x1CCD4F8E: gst_opt_scheduler_iterate (gstoptimalscheduler.c:2613) 
   by 0x1B96A008: gst_scheduler_iterate (gstscheduler.c:738) 
   by 0x1B939227: gst_bin_iterate_func (gstbin.c:1213) 
   by 0x1B9830A8: gst_marshal_BOOLEAN__VOID (gstmarshal.c:509) 
   by 0x1BFE5FB6: g_type_class_meta_marshal (gclosure.c:514) 
   by 0x1BFE5C1F: g_closure_invoke (gclosure.c:437) 
 Address 0x1C64493C is not stack'd, malloc'd or (recently) free'd 
 
DEBUG (0x1c8125a0 - 305727:31:45.213007000)      dvdreadsrc(24430) 
dvdreadsrc.c(665):dvdreadsrc_change_state: gstdvdreadsrc: state pending 4 
 
(interrupted after 10 mins of nothing else happening; encoding works fine in 
valgrind). 
 
Cheers 
 -Tim 
 
(Note to self: this is EWS, Title #2)
Comment 1 Tim-Philipp Müller 2004-11-22 11:06:09 UTC
Created attachment 34024 [details] [review]
proposed fix

Attached a patch that makes dvdreadsrc work reliably again on all titles I've
tried so far (inspired by transcode 0.6.3 import/dvd_reader.c).

Cheers
 -Tim
Comment 2 Tim-Philipp Müller 2004-11-22 11:11:25 UTC
Marking as blocker; dvdreadsrc element is rather useless if it only works on 
some DVD titles; fix is pretty straight-forward and unlikely to break anything 
that wasn't broken already anyway IMHO. 
 
Cheers 
 -Tim 
 
Comment 3 Thomas Vander Stichele 2004-11-23 12:49:58 UTC
comitted, thanks for patch