GNOME Bugzilla – Bug 620119
[dvdspu] Program received signal SIGSEGV, Segmentation fault.
Last modified: 2011-08-23 08:16:01 UTC
Created attachment 162336 [details] gdb-totem.txt Open bug in Launchpad.net: https://bugs.launchpad.net/bugs/587612 Open totem and load film. In minutes/seconds totem frozen Test 1: http://launchpadlibrarian.net/49402115/Sample.mkv Test 2: http://launchpadlibrarian.net/49403492/Sample_2.mkv
Created attachment 162340 [details] gdb-totem.txt
Bug in LWP27885 ? [Switching to Thread 0xb5affb70 (LWP 27885)] 0x01159008 in __memset_sse2 () at ../sysdeps/i386/i686/multiarch/memset-sse2.S:267 267 ../sysdeps/i386/i686/multiarch/memset-sse2.S: No such file or directory. in ../sysdeps/i386/i686/multiarch/memset-sse2.S
@t.i.m please url of git =) I want to see the patch =)
There is no patch, I have just confirmed that the issue still happens with the git version.
valgrind output: ==22441== Invalid write of size 1 ==22441== at 0x4C240A8: memset (mc_replace_strmem.c:586) ==22441== by 0x1ADE45C9: gstspu_clear_comp_buffers (gstdvdspu-render.c:42) ==22441== by 0x1ADE6EBF: gstspu_vobsub_clear_comp_buffers (gstspu-vobsub-render.c:362) ==22441== by 0x1ADE766E: gstspu_vobsub_render (gstspu-vobsub-render.c:505) ==22441== by 0x1ADE1611: gstspu_render (gstdvdspu.c:637) ==22441== by 0x1ADE1352: dvdspu_handle_vid_buffer (gstdvdspu.c:602) ==22441== by 0x1ADE113F: gst_dvd_spu_video_chain (gstdvdspu.c:527) ==22441== by 0x4E8450C: gst_pad_chain_data_unchecked (gstpad.c:4132) ==22441== by 0x4E84DFD: gst_pad_push_data (gstpad.c:4361) ==22441== by 0x89B0C66: gst_base_transform_chain (gstbasetransform.c:2161) ==22441== by 0x4E8450C: gst_pad_chain_data_unchecked (gstpad.c:4132) ==22441== by 0x4E84DFD: gst_pad_push_data (gstpad.c:4361) ==22441== Address 0x1b407750 is 0 bytes after a block of size 2,560 alloc'd ==22441== at 0x4C221A7: malloc (vg_replace_malloc.c:195) ==22441== by 0x4C22221: realloc (vg_replace_malloc.c:476) ==22441== by 0x579B33E: g_realloc (gmem.c:171) ==22441== by 0x1ADE026B: gst_dvd_spu_video_set_caps (gstdvdspu.c:351) ==22441== by 0x4E83A06: gst_pad_set_caps (gstpad.c:2613) ==22441== by 0x4E84621: gst_pad_chain_data_unchecked (gstpad.c:4114) ==22441== by 0x4E84DFD: gst_pad_push_data (gstpad.c:4361) ==22441== by 0x89B0C66: gst_base_transform_chain (gstbasetransform.c:2161) ==22441== by 0x4E8450C: gst_pad_chain_data_unchecked (gstpad.c:4132) ==22441== by 0x4E84DFD: gst_pad_push_data (gstpad.c:4361) ==22441== by 0x81568C8: gst_subtitle_overlay_video_sink_chain (gstsubtitleoverlay.c:1725) ==22441== by 0x4E8450C: gst_pad_chain_data_unchecked (gstpad.c:4132) ==22441==
Created attachment 194381 [details] [review] dvdspu: do not clear out high bits from display area http://dvd.sourceforge.net/spu_notes does not mention that high bits are to be masked, and not clearing them makes a sample work, where clearing them yielded left > right. History does not shed any light, as tracing this code's origin shows the same bitmasks being there in 2007 when it was imported.
I could repro this with gst-launch and dvdspu. Now fixed, though I wonder about whether clearing those bits could break other DVDs, as I've no idea where those masks came from, but possibly from experimenting with some DVDs...
I don't recall where the masks come from, although I have a vague feeling the values aren't allowed to be > 1023 in the spec (DVD are maximum 1024x768 after scaling) - so these DVDs would be out of spec. I think changing the masks is the right way to go, as long as the rest of the code handles larger values OK.
The only "spec" I've seen is reverse engineering documentation, so any subtlety is probably left unseen unless some sample happened to trigger it. It's possible that the SPU display area was modified when the movie was encoded though. Or also that newer DVDs "break" the spec to allow for larger resolution. The movie here was 1280x720, which may or may not have been the resolution on the DVD...
1280x720 isn't a DVD resolution - so this is someone extending the DVD SPU format for higher resolutions - which makes expanding the masks definitely the right move. The highest specified DVD video resolution is 720x576 (PAL) or 720x480 (NTSC) , that gets expanded out to 1024x576/1024x480 for widescreen presentations before the subpicture is overlaid.
commit c437541791bfeac0c7972c6402a50f69b7a2b041 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Mon Aug 22 16:52:13 2011 +0100 dvdspu: do not clear out high bits from display area http://dvd.sourceforge.net/spu_notes does not mention that high bits are to be masked, and not clearing them makes a sample work, where clearing them yielded left > right. History does not shed any light, as tracing this code's origin shows the same bitmasks being there in 2007 when it was imported. https://bugzilla.gnome.org/show_bug.cgi?id=620119