Closed Bug 1027809 Opened 7 years ago Closed 7 years ago

Assertion failure YCbCrUtils.cpp:81

Categories

(Core :: Audio/Video, defect)

33 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: mcmanus, Assigned: sotaro)

References

Details

Attachments

(1 file, 1 obsolete file)

this is reproducible for me on desktop linux 64 bit

http://blog.embed.ly/post/89265229166/what-twitter-isnt-telling-you-about-gifs (I need to scroll down to make it reproducible)

Built from git commit b910a6fa078908b717424196df3560f056000557

this is a local build from a tree about 1 week old - it contains a couple minor unrelated patches to networking

The assertion is Assertion failure: (aData.mCbCrSize.width == aData.mYSize.width || aData.mCbCrSize.width == (aData.mYSize.width + 1) >> 1) && (aData.mCbCrSize.height == aData.mYSize.height || aData.mCbCrSize.height == (aData.mYSize.height + 1) >> 1), at ../../../tester/gfx/ycbcr/YCbCrUtils.cpp:81

unfortunately aData and mData (up the stack one level) are "optimized out" from gdb's pov

the stack is
#0  0x00007f1ef36b5d7d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f1ef36b5c14 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:137
#2  0x00007f1eef2df17b in ah_crap_handler (signum=11) at ../../../tester/toolkit/xre/nsSigHandlers.cpp:88
#3  0x00007f1eef2e756e in nsProfileLock::FatalSignalHandler (signo=11, info=<optimized out>, context=<optimized out>) at /home/mcmanus/src/mozilla2/wd/tester/profile/dirserviceprovider/src/nsProfileLock.cpp:185
#4  <signal handler called>
#5  mozilla::gfx::ConvertYCbCrToRGB (aData=..., aDestFormat=<optimized out>, aDestSize=..., aDestBuffer=<optimized out>, aStride=<optimized out>) at ../../../tester/gfx/ycbcr/YCbCrUtils.cpp:78
#6  0x00007f1eedcb2c3b in mozilla::layers::PlanarYCbCrImage::GetAsSourceSurface (this=<optimized out>) at ../../../tester/gfx/layers/ImageContainer.cpp:579
#7  0x00007f1eedd26529 in mozilla::layers::SharedPlanarYCbCrImage::GetAsSourceSurface (this=0x7f1e8f04b000) at ../../../tester/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp:76
#8  0x00007f1eedcb2429 in mozilla::layers::ImageContainer::LockCurrentAsSourceSurface (this=<optimized out>, aSize=<optimized out>, aCurrentImage=<optimized out>) at ../../../tester/gfx/layers/ImageContainer.cpp:326
#9  0x00007f1eedcb1141 in mozilla::layers::AutoLockImage::AutoLockImage (this=<optimized out>, aContainer=0x7f1ef39b59d0 <_IO_stdfile_2_lock>, aSurface=0x7fff35257620) at ../../../tester/gfx/layers/ImageContainer.h:666
#10 0x00007f1eedcb0cd5 in mozilla::layers::BasicImageLayer::Paint (this=0x7f1e938eb800, aDT=0x7f1e98da9200, aDeviceOffset=..., aMaskLayer=0x0) at ../../../tester/gfx/layers/basic/BasicImageLayer.cpp:80
#11 0x00007f1eedce1858 in mozilla::layers::BasicLayerManager::PaintSelfOrChildren (this=<optimized out>, aPaintContext=..., aGroupTarget=0x7f1e96d9b5c0) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:835
#12 0x00007f1eedce0b79 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x7f1ec342b1b0, aTarget=0x7f1e96d9b5c0, aLayer=<optimized out>, aCallback=<optimized out>, aCallbackData=<optimized out>) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:948
#13 0x00007f1eedce17c7 in mozilla::layers::BasicLayerManager::PaintSelfOrChildren (this=0x7f1ec342b1b0, aPaintContext=..., aGroupTarget=0x7f1e96d9b5c0) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:845
#14 0x00007f1eedce0b79 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x7f1ec342b1b0, aTarget=0x7f1e96d9b5c0, aLayer=<optimized out>, aCallback=<optimized out>, aCallbackData=<optimized out>) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:948
#15 0x00007f1eedce17c7 in mozilla::layers::BasicLayerManager::PaintSelfOrChildren (this=0x7f1ec342b1b0, aPaintContext=..., aGroupTarget=0x7f1e96d9b5c0) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:845
#16 0x00007f1eedce0b38 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x7f1ec342b1b0, aTarget=0x7f1e96d9b5c0, aLayer=<optimized out>, aCallback=<optimized out>, aCallbackData=<optimized out>) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:956
#17 0x00007f1eedcdfbb6 in mozilla::layers::BasicLayerManager::EndTransactionInternal (this=0x7f1ec342b1b0, aCallback=0x0, aCallbackData=0x0, aFlags=<optimized out>) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:626
#18 0x00007f1eedce1672 in mozilla::layers::BasicLayerManager::EndEmptyTransaction (this=0x7f1ef39b41c0 <_IO_2_1_stderr_>, aFlags=mozilla::layers::LayerManager::END_DEFAULT) at ../../../tester/gfx/layers/basic/BasicLayerManager.cpp:694
#19 0x00007f1eeedb91ac in PresShell::Paint (this=0x7f1ecaa05800, aViewToPaint=0x7f1ecb5b5e80, aDirtyRegion=..., aFlags=2) at ../../../tester/layout/base/nsPresShell.cpp:6141
#20 0x00007f1eee81ed8b in nsViewManager::Refresh (this=0x7f1ecb9e8340, aView=0x7f1ecb5b5e80, aRegion=...) at ../../../tester/view/src/nsViewManager.cpp:336
#21 0x00007f1eee81fda3 in nsViewManager::PaintWindow (this=0x7f1ecb9e8340, aWidget=<optimized out>, aRegion=...) at ../../../tester/view/src/nsViewManager.cpp:706
#22 0x00007f1eee81e19f in nsView::PaintWindow (this=<optimized out>, aWidget=0x7f1ecb967ba0, aRegion=...) at ../../../tester/view/src/nsView.cpp:1049
#23 0x00007f1eee3788c3 in nsWindow::OnExposeEvent (this=0x7f1ecb967ba0, aEvent=<optimized out>) at ../../../tester/widget/gtk/nsWindow.cpp:2206
#24 0x00007f1eee37c5ed in expose_event_cb (widget=<optimized out>, event=0x7f1e9be5a820) at ../../../tester/widget/gtk/nsWindow.cpp:5093
#25 0x00007f1eeb6c9815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#26 0x00007f1eebef03b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007f1eebf01d3d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007f1eebf096f9 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007f1eebf09ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007f1eeb7d9724 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#31 0x00007f1eeb6525b8 in gtk_container_propagate_expose () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x00007f1eeb651144 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#33 0x00007f1eeb6c9815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#34 0x00007f1eebef03b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#35 0x00007f1eebf01afb in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007f1eebf096f9 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007f1eebf09ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#38 0x00007f1eeb7d9724 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#39 0x00007f1eeb6c8485 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#40 0x00007f1eea6a1edf in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#41 0x00007f1eea69eb5a in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#42 0x00007f1eea69f438 in gdk_window_process_all_updates () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#43 0x00007f1eea69f499 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#44 0x00007f1eea67ece7 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#45 0x00007f1eebc20ce5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007f1eebc21048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f1eebc210ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f1eee36f601 in nsAppShell::ProcessNextNativeEvent (this=<optimized out>, mayWait=<optimized out>) at ../../../tester/widget/gtk/nsAppShell.cpp:141
This bug seems similar to Bug 1025781.
Assignee: nobody → sotaro.ikeda.g
I could reproduce the problem on my linux pc. The related data was the following.
- aData.mYSize.width 500 
- aData.mCbCrSize.width 252 
- aData.mYSize.height 232 
- aData.mCbCrSize.height 116
Current check in ConvertYCbCrToRGB() seems too strict.

http://dxr.mozilla.org/mozilla-central/source/gfx/ycbcr/YCbCrUtils.cpp#78
(In reply to Sotaro Ikeda [:sotaro] from comment #2)
> I could reproduce the problem on my linux pc. The related data was the
> following.
> - aData.mYSize.width 500 
> - aData.mCbCrSize.width 252 
> - aData.mYSize.height 232 
> - aData.mCbCrSize.height 116

gstreamer out put such data. The size might be rounded up to multiple of 4.
Attached patch patch - Relax a size check (obsolete) — Splinter Review
Blocks: 1025781
Attachment #8443658 - Flags: review?(jmuizelaar)
Duplicate of this bug: 1020114
Comment on attachment 8443658 [details] [diff] [review]
patch - Relax a size check

Review of attachment 8443658 [details] [diff] [review]:
-----------------------------------------------------------------

I think we should change:
http://dxr.mozilla.org/mozilla-central/source/content/media/gstreamer/GStreamerReader-0.10.cpp#136
to use gst_video_format_get_component_width(mFormat, 1, mPicture.width) instead.

It looks like we're currently putting the stride in the size instead of the width.
Attachment #8443658 - Flags: review?(jmuizelaar) → review-
From Comment 8, this is a media bug.
Component: Graphics: Layers → Video/Audio
Update the pach based on the comment. I confirmed the patch fixed the problem.
Attachment #8443658 - Attachment is obsolete: true
Attachment #8451136 - Flags: review?(edwin)
https://hg.mozilla.org/mozilla-central/rev/63654e6fa9f9
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.