Bug 124500 - [GStreamer] Crash when using adaptive bitrate with MediaSource
Summary: [GStreamer] Crash when using adaptive bitrate with MediaSource
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://dashif.org/reference/players/j...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 06:45 PST by Philippe Normand
Modified: 2018-09-12 06:32 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2013-11-18 06:45:34 PST
The linked url plays for a few seconds then a seek to 0 at rate=0 is attempted, this is not working.

I use gst git master though, someone needs to check with 1.0.x and 1.2.x.
Comment 1 Sergio Villar Senin 2013-11-27 05:17:24 PST
The same happens to me. The WebProcess actually crashes.

I'm using debian's gst packages version 1.2.1
Comment 2 Xabier Rodríguez Calvar 2013-11-27 09:32:05 PST
I am not getting a crash, but MiniBrowser just hangs.
GStreamer 1.2.1 from WebKitGTK+ dependencies.
Comment 3 Philippe Normand 2013-12-02 04:28:08 PST
(In reply to comment #2)
> I am not getting a crash, 

Not here, like I say in comment 0 it plays a bit and crashes.

> but MiniBrowser just hangs.
> GStreamer 1.2.1 from WebKitGTK+ dependencies.

Here too.
Comment 4 Xabier Rodríguez Calvar 2013-12-02 04:43:12 PST
(In reply to comment #3)
> Not here, like I say in comment 0 it plays a bit and crashes.

After playing a bit with it, it plays a bit and then crashes with debug and with release sometimes it hangs and sometimes it crashes.
Comment 5 Philippe Normand 2013-12-02 09:22:56 PST
Program received signal SIGSEGV, Segmentation fault.
pixman_blt_sse2 (src_bits=src_bits@entry=0x7fff5c051500, 
    dst_bits=dst_bits@entry=0x7fff13c00000, src_stride=<optimized out>, 
    src_stride@entry=1280, dst_stride=<optimized out>, dst_stride@entry=1280, 
    src_bpp=src_bpp@entry=32, src_x=src_x@entry=0, src_y=src_y@entry=0, 
    dest_x=dest_x@entry=0, dest_y=dest_y@entry=0, width=width@entry=1280, 
    height=<optimized out>, height@entry=720, dst_bpp=32) at pixman-sse2.c:4524
4524		    xmm0 = load_128_unaligned ((__m128i*)(s));
(gdb) bt
#0  pixman_blt_sse2 (src_bits=src_bits@entry=0x7fff5c051500, 
    dst_bits=dst_bits@entry=0x7fff13c00000, src_stride=<optimized out>, 
    src_stride@entry=1280, dst_stride=<optimized out>, dst_stride@entry=1280, 
    src_bpp=src_bpp@entry=32, src_x=src_x@entry=0, src_y=src_y@entry=0, 
    dest_x=dest_x@entry=0, dest_y=dest_y@entry=0, width=width@entry=1280, 
    height=<optimized out>, height@entry=720, dst_bpp=32) at pixman-sse2.c:4524
#1  0x00007fffebe50e3f in pixman_blt_sse2 (height=720, width=1280, dest_y=0, dest_x=0, 
    src_y=0, src_x=0, dst_bpp=32, src_bpp=32, dst_stride=<optimized out>, 
    src_stride=<optimized out>, dst_bits=<optimized out>, src_bits=<optimized out>)
    at pixman-sse2.c:5801
#2  sse2_blt (imp=0x613790, src_bits=0x7fff5c051500, dst_bits=0x7fff13c00000, 
    src_stride=1280, dst_stride=1280, src_bpp=32, dst_bpp=32, src_x=0, src_y=0, dest_x=0, 
    dest_y=0, width=1280, height=720) at pixman-sse2.c:5796
#3  0x00007fffebdeb1f2 in pixman_blt (src_bits=<optimized out>, dst_bits=<optimized out>, 
    src_stride=<optimized out>, dst_stride=<optimized out>, src_bpp=<optimized out>, 
    dst_bpp=<optimized out>, src_x=src_x@entry=0, src_y=src_y@entry=0, 
    dest_x=dest_x@entry=0, dest_y=dest_y@entry=0, width=width@entry=1280, 
    height=height@entry=720) at pixman.c:754
#4  0x00007ffff410656f in draw_image_boxes (_dst=0xe84db0, image=<optimized out>, 
    boxes=<optimized out>, dx=0, dy=0) at cairo-image-compositor.c:106
#5  0x00007ffff413bbfa in upload_boxes (compositor=<optimized out>, 
    compositor=<optimized out>, boxes=0x7fffffffa8f0, extents=0x7fffffffab70)
    at cairo-spans-compositor.c:514
#6  composite_aligned_boxes (boxes=0x7fffffffa8f0, extents=0x7fffffffab70, 
    compositor=0x7ffff41ea6c0 <spans.11895>) at cairo-spans-compositor.c:616
#7  clip_and_composite_boxes (compositor=compositor@entry=0x7ffff41ea6c0 <spans.11895>, 
    extents=extents@entry=0x7fffffffab70, boxes=boxes@entry=0x7fffffffa8f0)
    at cairo-spans-compositor.c:868
#8  0x00007ffff413bc9e in clip_and_composite_boxes (
    compositor=0x7ffff41ea6c0 <spans.11895>, extents=0x7fffffffab70, boxes=0x7fffffffa8f0)
    at cairo-spans-compositor.c:887
#9  0x00007ffff413bd86 in _cairo_spans_compositor_paint (
    _compositor=0x7ffff41ea6c0 <spans.11895>, extents=0x7fffffffab70)
    at cairo-spans-compositor.c:969
#10 0x00007ffff40fbc29 in _cairo_compositor_paint (
    compositor=0x7ffff41ea6c0 <spans.11895>, surface=0xe84db0, op=<optimized out>, 
    source=<optimized out>, clip=<optimized out>) at cairo-compositor.c:65
#11 0x00007ffff413eb29 in _cairo_surface_paint (surface=0xe84db0, 
    op=CAIRO_OPERATOR_SOURCE, source=0x7fffffffaf20, clip=0x0) at cairo-surface.c:2006
#12 0x00007ffff4169aa7 in surface_source (src_y=0x7fffffffb040, src_x=0x7fffffffb03c, 
    sample=<optimized out>, extents=0x7fffffffb8bc, is_mask=0, pattern=0x7fffffffb900, 
    dst=0xa37160) at cairo-xlib-source.c:967
#13 _cairo_xlib_source_create_for_pattern (_dst=0xa37160, pattern=0x7fffffffb900, 
    is_mask=0, extents=0x7fffffffb8bc, sample=<optimized out>, src_x=0x7fffffffb03c, 
    src_y=0x7fffffffb040) at cairo-xlib-source.c:1089
#14 0x00007ffff415080e in composite_aligned_boxes (boxes=0x7fffffffb460, 
    extents=0x7fffffffb880, compositor=0x7ffff41eb9c0 <compositor.16112>)
    at cairo-traps-compositor.c:1272
#15 clip_and_composite_boxes (
    compositor=compositor@entry=0x7ffff41eb9c0 <compositor.16112>, 
    extents=extents@entry=0x7fffffffb880, boxes=boxes@entry=0x7fffffffb460)
    at cairo-traps-compositor.c:1766
#16 0x00007ffff4151537 in _cairo_traps_compositor_fill (
    _compositor=0x7ffff41eb9c0 <compositor.16112>, extents=0x7fffffffb880, path=0xcab7a8, 
    fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=0.10000000000000001, 
    antialias=CAIRO_ANTIALIAS_DEFAULT) at cairo-traps-compositor.c:2198
#17 0x00007ffff40fbe47 in _cairo_compositor_fill (
    compositor=0x7ffff41eb9c0 <compositor.16112>, surface=surface@entry=0xa37160, 
    op=op@entry=CAIRO_OPERATOR_SOURCE, source=source@entry=0x7fffffffbc80, 
---Type <return> to continue, or q <return> to quit---
    path=path@entry=0xcab7a8, fill_rule=fill_rule@entry=CAIRO_FILL_RULE_WINDING, 
    tolerance=0.10000000000000001, antialias=antialias@entry=CAIRO_ANTIALIAS_DEFAULT, 
    clip=clip@entry=0xae6310) at cairo-compositor.c:203
#18 0x00007ffff416b078 in _cairo_xlib_surface_fill (_surface=<optimized out>, 
    op=CAIRO_OPERATOR_SOURCE, source=0x7fffffffbc80, path=0xcab7a8, 
    fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=<optimized out>, 
    antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0xae6310) at cairo-xlib-surface.c:1594
#19 0x00007ffff413efb4 in _cairo_surface_fill (surface=0xa37160, op=CAIRO_OPERATOR_SOURCE, 
    source=0x7fffffffbc80, path=0xcab7a8, fill_rule=CAIRO_FILL_RULE_WINDING, 
    tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0xae6310)
    at cairo-surface.c:2222
#20 0x00007ffff410400c in _cairo_gstate_fill (gstate=0xe84c10, path=path@entry=0xcab7a8)
    at cairo-gstate.c:1308
#21 0x00007ffff40fd5b9 in _cairo_default_context_fill (abstract_cr=0xcab440)
    at cairo-default-context.c:1048
#22 0x00007ffff40f6d45 in cairo_fill (cr=0xcab440) at cairo.c:2201
#23 0x00007ffff5fdec86 in WebCore::PlatformContextCairo::drawSurfaceToContext(_cairo_surface*, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::GraphicsContext*) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#24 0x00007ffff5fd9140 in WebCore::BitmapImage::draw(WebCore::GraphicsContext*, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::ColorSpace, WebCore::CompositeOperator, WebCore::BlendMode, WebCore::ImageOrientationDescription) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#25 0x00007ffff601ceb3 in WebCore::GraphicsContext::drawImage(WebCore::Image*, WebCore::ColorSpace, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::CompositeOperator, WebCore::ImageOrientationDescription, bool) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#26 0x00007ffff6eba442 in WebCore::MediaPlayerPrivateGStreamerBase::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#27 0x00007ffff683b23f in WebCore::RenderVideo::paintReplaced(WebCore::PaintInfo&, WebCore::LayoutPoint const&) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#28 0x00007ffff67f3bfc in WebCore::RenderReplaced::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#29 0x00007ffff678dc31 in WebCore::RenderImage::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#30 0x00007ffff679dbcc in WebCore::RenderLayer::paintForegroundForFragmentsWithPhase(WebCore::PaintPhase, WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow> const&, WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int, WebCore::RenderObject*) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#31 0x00007ffff67a3b17 in WebCore::RenderLayer::paintForegroundForFragments(WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow> const&, WebCore::GraphicsContext*, WebCore::GraphicsContext*, WebCore::LayoutRect const&, bool, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int, WebCore::RenderObject*, bool, bool) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#32 0x00007ffff67ae6b2 in WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#33 0x00007ffff67af4e8 in WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#34 0x00007ffff67b0db9 in WebCore::RenderLayer::paintList(WTF::Vector<WebCore::RenderLayer*, 0ul, WTF::CrashOnOverflow>*, WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
---Type <return> to continue, or q <return> to quit---
#35 0x00007ffff67ae7aa in WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#36 0x00007ffff67af4e8 in WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#37 0x00007ffff67b0db9 in WebCore::RenderLayer::paintList(WTF::Vector<WebCore::RenderLayer*, 0ul, WTF::CrashOnOverflow>*, WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#38 0x00007ffff67ae7c2 in WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#39 0x00007ffff67af4e8 in WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext*, WebCore::RenderLayer::LayerPaintingInfo const&, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#40 0x00007ffff67af74c in WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::LayoutRect const&, unsigned int, WebCore::RenderObject*, WebCore::RenderRegion*, unsigned int) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#41 0x00007ffff6684ca8 in WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#42 0x00007ffff6d1e420 in WebCore::ScrollView::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#43 0x00007ffff5f8c447 in WebKit::ChromeClient::paint(WebCore::Timer<WebKit::ChromeClient>*) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#44 0x00007ffff607c879 in WebCore::ThreadTimers::sharedTimerFiredInternal() ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#45 0x00007ffff6093112 in WebCore::sharedTimerTimeoutCallback(void*) ()
   from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0
#46 0x00007ffff2a4fc63 in g_timeout_dispatch (source=source@entry=0xe7ad00, 
    callback=<optimized out>, user_data=<optimized out>) at gmain.c:4450
#47 0x00007ffff2a4f106 in g_main_dispatch (context=0x67ff20) at gmain.c:3065
#48 g_main_context_dispatch (context=context@entry=0x67ff20) at gmain.c:3641
#49 0x00007ffff2a4f458 in g_main_context_iterate (context=0x67ff20, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3712
#50 0x00007ffff2a4f85a in g_main_loop_run (loop=0xa234e0) at gmain.c:3906
#51 0x00007ffff4819c95 in gtk_main () at gtkmain.c:1162
#52 0x0000000000403a8c in main ()
Comment 6 Xabier Rodríguez Calvar 2013-12-02 11:19:52 PST
#0  _mm_loadu_si128 (__P=0x7f0de406b000) at /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:684
#1  load_128_unaligned (src=0x7f0de406b000) at pixman-sse2.c:344
#2  pixman_blt_sse2 (src_bits=src_bits@entry=0x7f0de4009330, dst_bits=dst_bits@entry=0x7f0dd309b000, src_stride=<optimized out>, src_stride@entry=1680, dst_stride=<optimized out>, 
    dst_stride@entry=1680, src_bpp=src_bpp@entry=32, src_x=src_x@entry=0, src_y=src_y@entry=0, dest_x=dest_x@entry=0, dest_y=dest_y@entry=0, width=width@entry=1680, 
    height=<optimized out>, height@entry=944, dst_bpp=32) at pixman-sse2.c:4525
#3  0x00007f0e8b35cd5f in pixman_blt_sse2 (height=944, width=1680, dest_y=0, dest_x=0, src_y=0, src_x=0, dst_bpp=32, src_bpp=32, dst_stride=<optimized out>, 
    src_stride=<optimized out>, dst_bits=<optimized out>, src_bits=<optimized out>) at pixman-sse2.c:5801
#4  sse2_blt (imp=0xccc790, src_bits=0x7f0de4009330, dst_bits=0x7f0dd309b000, src_stride=1680, dst_stride=1680, src_bpp=32, dst_bpp=32, src_x=0, src_y=0, dest_x=0, dest_y=0, 
    width=1680, height=944) at pixman-sse2.c:5796
#5  0x00007f0e8b2f7152 in pixman_blt (src_bits=<optimized out>, dst_bits=<optimized out>, src_stride=<optimized out>, dst_stride=<optimized out>, src_bpp=<optimized out>, 
    dst_bpp=<optimized out>, src_x=0, src_y=0, dest_x=0, dest_y=0, width=1680, height=944) at pixman.c:754
#6  0x00007f0e94313688 in draw_image_boxes () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#7  0x00007f0e9436208c in upload_boxes () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#8  0x00007f0e943623a9 in composite_aligned_boxes () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#9  0x00007f0e94362ce5 in clip_and_composite_boxes () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#10 0x00007f0e94363026 in _cairo_spans_compositor_paint () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#11 0x00007f0e94301f91 in _cairo_compositor_paint () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#12 0x00007f0e9431cea1 in _cairo_image_surface_paint () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#13 0x00007f0e94368aaa in _cairo_surface_paint () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#14 0x00007f0e943ac8b4 in surface_source () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#15 0x00007f0e943acd70 in _cairo_xlib_source_create_for_pattern () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#16 0x00007f0e94382aae in composite_aligned_boxes () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#17 0x00007f0e94383d25 in clip_and_composite_boxes () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#18 0x00007f0e94384a88 in _cairo_traps_compositor_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#19 0x00007f0e943023d7 in _cairo_compositor_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#20 0x00007f0e943b0508 in _cairo_xlib_surface_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#21 0x00007f0e943691bb in _cairo_surface_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#22 0x00007f0e9430f2ea in _cairo_gstate_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#23 0x00007f0e94306cea in _cairo_default_context_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#24 0x00007f0e942f9849 in cairo_fill () from /home/calvaris/gnome/WebKit/WebKitBuild/Dependencies/Root/lib64/libcairo.so.2
#25 0x00007f0e9874df1d in WebCore::drawPatternToCairoContext (cr=0x2006c80, pattern=0xd5b4a0, destRect=..., alpha=1)
    at ../../Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:154
#26 0x00007f0e9874e782 in WebCore::PlatformContextCairo::drawSurfaceToContext (this=0x27630b0, surface=0x27e4aa0, destRect=..., originalSrcRect=..., context=0x7fff6f6e4e20)
    at ../../Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:229
#27 0x00007f0e98740f9f in WebCore::BitmapImage::draw (this=0x2755b90, context=0x7fff6f6e4e20, dst=..., src=..., styleColorSpace=WebCore::ColorSpaceSRGB, op=WebCore::CompositeCopy, 
    blendMode=WebCore::BlendModeNormal, description=...) at ../../Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp:114
#28 0x00007f0e987c935e in WebCore::GraphicsContext::drawImage (this=0x7fff6f6e4e20, image=0x2755b90, styleColorSpace=WebCore::ColorSpaceSRGB, dest=..., src=..., 
    op=WebCore::CompositeCopy, blendMode=WebCore::BlendModeNormal, description=..., useLowQualityScale=false) at ../../Source/WebCore/platform/graphics/GraphicsContext.cpp:511
#29 0x00007f0e987c91ec in WebCore::GraphicsContext::drawImage (this=0x7fff6f6e4e20, image=0x2755b90, styleColorSpace=WebCore::ColorSpaceSRGB, dest=..., src=..., 
    op=WebCore::CompositeCopy, description=..., useLowQualityScale=false) at ../../Source/WebCore/platform/graphics/GraphicsContext.cpp:489
#30 0x00007f0e99b5f4b4 in WebCore::MediaPlayerPrivateGStreamerBase::paint (this=0x236be90, context=0x7fff6f6e4e20, rect=...)
    at ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:415
#31 0x00007f0e998a3992 in WebCore::MediaPlayer::paint (this=0x23ba9a0, p=0x7fff6f6e4e20, r=...) at ../../Source/WebCore/platform/graphics/MediaPlayer.cpp:741
#32 0x00007f0e993ab085 in WebCore::RenderVideo::paintReplaced (this=0x181fd10, paintInfo=..., paintOffset=...) at ../../Source/WebCore/rendering/RenderVideo.cpp:202
#33 0x00007f0e9935c49d in WebCore::RenderReplaced::paint (this=0x181fd10, paintInfo=..., paintOffset=...) at ../../Source/WebCore/rendering/RenderReplaced.cpp:166
#34 0x00007f0e992d0c1f in WebCore::RenderImage::paint (this=0x181fd10, paintInfo=..., paintOffset=...) at ../../Source/WebCore/rendering/RenderImage.cpp:458
#35 0x00007f0e992ef053 in WebCore::RenderLayer::paintForegroundForFragmentsWithPhase (this=0x1340190, phase=WebCore::PaintPhaseForeground, layerFragments=..., context=0x7fff6f6e4e20, 
    localPaintingInfo=..., paintBehavior=0, subtreePaintRootForRenderer=0x0) at ../../Source/WebCore/rendering/RenderLayer.cpp:4321
#36 0x00007f0e992eecc7 in WebCore::RenderLayer::paintForegroundForFragments (this=0x1340190, layerFragments=..., context=0x7fff6f6e4e20, transparencyLayerContext=0x7fff6f6e4e20, 
    transparencyPaintDirtyRect=..., haveTransparency=false, localPaintingInfo=..., paintBehavior=0, subtreePaintRootForRenderer=0x0, selectionOnly=false, forceBlackText=false)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:4285
#37 0x00007f0e992ed74c in WebCore::RenderLayer::paintLayerContents (this=0x1340190, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
---Type <return> to continue, or q <return> to quit---
    at ../../Source/WebCore/rendering/RenderLayer.cpp:4006
#38 0x00007f0e992ecd2a in WebCore::RenderLayer::paintLayerContentsAndReflection (this=0x1340190, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3730
#39 0x00007f0e992ecc1f in WebCore::RenderLayer::paintLayer (this=0x1340190, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3711
#40 0x00007f0e992edd53 in WebCore::RenderLayer::paintList (this=0x101c590, list=0x22091a0, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:4099
#41 0x00007f0e992ed7c8 in WebCore::RenderLayer::paintLayerContents (this=0x101c590, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:4014
#42 0x00007f0e992ecd2a in WebCore::RenderLayer::paintLayerContentsAndReflection (this=0x101c590, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3730
#43 0x00007f0e992ecc1f in WebCore::RenderLayer::paintLayer (this=0x101c590, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3711
#44 0x00007f0e992edd53 in WebCore::RenderLayer::paintList (this=0xffc630, list=0x1930f60, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:4099
#45 0x00007f0e992ed7fd in WebCore::RenderLayer::paintLayerContents (this=0xffc630, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=224)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:4017
#46 0x00007f0e992ecd2a in WebCore::RenderLayer::paintLayerContentsAndReflection (this=0xffc630, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=0)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3730
#47 0x00007f0e992ecc1f in WebCore::RenderLayer::paintLayer (this=0xffc630, context=0x7fff6f6e4e20, paintingInfo=..., paintFlags=0)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3711
#48 0x00007f0e992ebea5 in WebCore::RenderLayer::paint (this=0xffc630, context=0x7fff6f6e4e20, damageRect=..., paintBehavior=0, subtreePaintRoot=0x0, region=0x0, paintFlags=0)
    at ../../Source/WebCore/rendering/RenderLayer.cpp:3495
#49 0x00007f0e99125224 in WebCore::FrameView::paintContents (this=0x101e600, p=0x7fff6f6e4e20, rect=...) at ../../Source/WebCore/page/FrameView.cpp:3516
#50 0x00007f0e9990b9a7 in WebCore::ScrollView::paint (this=0x101e600, context=0x7fff6f6e4e20, rect=...) at ../../Source/WebCore/platform/ScrollView.cpp:1144
#51 0x00007f0e986ba85a in WebKit::paintWebView (webView=0x10e82a0, frame=0xfe5600, dirtyRegion=...) at ../../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:564
#52 0x00007f0e986babd3 in WebKit::ChromeClient::paint (this=0x106ee30) at ../../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:607
#53 0x00007f0e986c342b in WebCore::Timer<WebKit::ChromeClient>::fired (this=0x106eea0) at ../../Source/WebCore/platform/Timer.h:115
#54 0x00007f0e9885b503 in WebCore::ThreadTimers::sharedTimerFiredInternal (this=0x1020820) at ../../Source/WebCore/platform/ThreadTimers.cpp:127
#55 0x00007f0e9885b3f3 in WebCore::ThreadTimers::sharedTimerFired () at ../../Source/WebCore/platform/ThreadTimers.cpp:103
#56 0x00007f0e988809fd in WebCore::sharedTimerTimeoutCallback () at ../../Source/WebCore/platform/gtk/SharedTimerGtk.cpp:49
#57 0x00007f0e9205e853 in g_timeout_dispatch (source=source@entry=0x2619d50, callback=<optimized out>, user_data=<optimized out>) at gmain.c:4450
#58 0x00007f0e9205dcf6 in g_main_dispatch (context=0xd02900) at gmain.c:3065
#59 g_main_context_dispatch (context=context@entry=0xd02900) at gmain.c:3641
#60 0x00007f0e9205e048 in g_main_context_iterate (context=0xd02900, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3712
#61 0x00007f0e9205e44a in g_main_loop_run (loop=0x11844a0) at gmain.c:3906
#62 0x00007f0e954fa605 in gtk_main () at gtkmain.c:1162
#63 0x0000000000405b06 in main (argc=1, argv=0x7fff6f6e5588) at ../../Tools/GtkLauncher/main.c:554
Comment 7 Brendan Long 2013-12-11 08:09:06 PST
On a hunch, I turned off adaptive bitrate (the ABR switch on that page) and the crash went away. I think this may be related to a bug a saw a long time ago where switching video tracks with different output sizes caused a crash (I should have created a bug report for that a while ago but forgot until now).
Comment 8 Brendan Long 2013-12-11 08:16:46 PST
This seems like a relevant piece of the backtrace:

#17 0x00007ffff3815e66 in WebCore::BitmapImage::draw (this=0x1270850, 
    context=0x7fffffffb8e0, dst=..., src=..., styleColorSpace=WebCore::ColorSpaceSRGB, 
    op=WebCore::CompositeCopy, blendMode=WebCore::BlendModeNormal, description=...)
    at ../../Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp:114
114	    context->platformContext()->drawSurfaceToContext(surface.get(), dstRect, adjustedSrcRect, context);
(gdb) print adjustedSrcRect 
$5 = {m_location = {m_x = 0, m_y = 0}, m_size = {m_width = 1280, m_height = 720}}
(gdb) print dstRect
$6 = {m_location = {m_x = 364, m_y = 160}, m_size = {m_width = 700, m_height = 394}}
Comment 9 Brendan Long 2013-12-11 08:20:25 PST
Also this:

#20 0x00007ffff4c5f975 in WebCore::MediaPlayerPrivateGStreamerBase::paint (
    this=0x13691c0, context=0x7fffffffb8e0, rect=...)
    at ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:415
415	        rect, gstImage->rect(), CompositeCopy, ImageOrientationDescription(), false);
(gdb) print gst_caps_to_string(*caps.m_ptr)
$13 = (gchar *) 0x1e65b50 "EMPTY"
Comment 10 Brendan Long 2013-12-11 10:42:32 PST
When video caps change, we follow this process:

MediaPlayerPrivateGStreamer::videoCapsChanged()
(async)
MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCapsChanged()
HTMLMediaElement::mediaPlayerEngineUpdated()
RenderVideo::updateFromElement()
RenderVideo::updatePlayer()
RenderVideo::updateIntrinsicSize()

I think the problem is that (async) step, which allows rendering to continue before we update the intrinsic size, which leads to trying to write a 1280x720 image into a 700x394 buffer.

It would be nice if we could call mediaPlayerEngineUpdated() at the moment the caps change, but I don't think it would safe, since that's supposed to be called on a different thread. Another option is blocking rendering until the intrinsic size is updated, but that seems dangerous (and probably slow).

I'm trying to figure out how to get one of these options working:

   * Resize the image if it doesn't fit in the provided destination buffer.
   * Skip rendering until the destination buffer is the size we expect.
Comment 11 Brendan Long 2013-12-18 10:38:17 PST
Here's something interesting. I was curious about how none of the fixes I tried seemed to help, so I tried commenting this out to see if it would cause a crash:

    static void mediaPlayerPrivateVideoSinkCapsChangedCallback(GObject*, GParamSpec*, MediaPlayerPrivateGStreamer* player)
    {
        // player->videoCapsChanged();
    }

And with that change, it usually doesn't crash, but the video acts weird for a couple seconds at the point where the bitrate changes.

Since it still crashes occasionally, I'm guessing this is some sort of timing issue.
Comment 12 Brendan Long 2014-06-17 11:50:31 PDT
I wanted to take a look at this again, but MediaSource doesn't seem to be working at all for me now. It looks like it's runtime disabled by default, but if you run with:

Tools/Scripts/run-launcher --gtk --enable-mediasource=true http:/ashif.org/reference/players/javascript/0.2.5/index.html

It seems to work, but the video stays grayed out.
Comment 13 Luis de Bethencourt 2014-08-11 11:58:36 PDT
I can't get the video to play at all. Neither with git master GStreamer or stable release.

Anyone else can?
Comment 14 Philippe Normand 2014-08-11 23:33:27 PDT
(In reply to comment #12)
> I wanted to take a look at this again, but MediaSource doesn't seem to be working at all for me now. It looks like it's runtime disabled by default, but if you run with:
> 
> Tools/Scripts/run-launcher --gtk --enable-mediasource=true http:/ashif.org/reference/players/javascript/0.2.5/index.html
> 
> It seems to work, but the video stays grayed out.

Same behavior here. From the logs the pipeline gets stuck while going to PAUSED in async and then playbackPosition is invoked in a infinite loop, returning 99:99:99.999999999.

The MediaSource src element clearly needs work. :(
Comment 15 Philippe Normand 2014-08-11 23:35:45 PDT
0:00:13.536379000 61595      0x25ae160 DEBUG      webkitmediaplayer ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:359:playbackPosition: Position 99:99:99.999999999
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG Working time is video time: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG BufferController.validate() video | state: LOADING
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG video Playback rate: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG video Working time: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG video Video time: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG Current video buffer length: 0
0:00:13.543519057 61595      0x25ae160 DEBUG      webkitmediaplayer ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:359:playbackPosition: Position 99:99:99.999999999
0:00:13.543609285 61595      0x25ae160 DEBUG      webkitmediaplayer ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:359:playbackPosition: Position 99:99:99.999999999
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG Working time is video time: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG BufferController.validate() audio | state: LOADING
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG audio Playback rate: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG audio Working time: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG audio Video time: 0
http://dashif.org/reference/players/javascript/0.2.5/app/js/streaming/Debug.js:89:24: CONSOLE LOG Current audio buffer length: 0
0:00:13.750162808 61595      0x25ae160 DEBUG      webkitmediaplayer ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:359:playbackPosition: Position 99:99:99.999999999
Comment 16 Luis de Bethencourt 2014-08-12 11:42:13 PDT
Philippe proposed I comment out the registration of http src element [1] to make it fallback to souphttpsrc and see if the problem is in that code. I did this but the video still doesn't work.

Will continue investigating.


[1] MediaPlayerPrivateGStreamer.cpp: initializeGStreamerAndRegisterWebKitElements()
Comment 17 Philippe Normand 2014-08-12 13:17:57 PDT
I suggested that for the Vimeo bug :) The httpsrc element is not used for MSE playback :)
Comment 18 Luis de Bethencourt 2014-08-12 13:19:47 PDT
Tried it with that one as well. Sorry for the confusion :)

Will investigate that one further tomorrow and once resolved I will get on with this one. Thanks for the help.
Comment 19 Philippe Normand 2014-11-18 09:49:03 PST
Any news about this bug Luis?
Comment 20 Luis de Bethencourt 2014-11-18 10:07:27 PST
Have been very busy with two conferences, trainings, new job and moving to a new city.

Bumping it up in my ToDo list. Will keep you updated :)
Comment 21 Brendan Long 2014-11-18 12:52:21 PST
Assigning this back to nobody since I don't have time to work on it right now.
Comment 22 Sebastian Dröge (slomo) 2014-12-09 03:57:11 PST
Works for me with my changes in bug #139441
Comment 23 Philippe Normand 2018-09-12 06:32:54 PDT
Let's assume this is fixed then? The linked URL is gone anyway.