Closed Bug 1393272 Opened 3 years ago Closed 3 years ago

Assertion failure: false (Empty picture rect) in [@ mozilla::ValidateBufferAndPicture]

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- wontfix
firefox55 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: tsmith, Assigned: kikuo)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached video test_case.webm
Assertion failure: false (Empty picture rect), at /src/dom/media/MediaData.cpp:127

#0 0x7fd8abe448d0 in mozilla::ValidateBufferAndPicture(mozilla::VideoData::YCbCrBuffer const&, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) /src/dom/media/MediaData.cpp:127:5
#1 0x7fd8abe43f12 in mozilla::VideoData::CreateAndCopyData(mozilla::VideoInfo const&, mozilla::layers::ImageContainer*, long, mozilla::media::TimeUnit const&, mozilla::media::TimeUnit const&, mozilla::VideoData::YCbCrBuffer const&, bool, mozilla::media::TimeUnit const&, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::layers::KnowsCompositor*) /src/dom/media/MediaData.cpp:309:8
#2 0x7fd8ac32455a in mozilla::FFmpegVideoDecoder<46465650>::DoDecode(mozilla::MediaRawData*, unsigned char*, int, bool*, nsTArray<RefPtr<mozilla::MediaData> >&) /src/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:347:5
#3 0x7fd8ac3233e6 in mozilla::FFmpegVideoDecoder<46465650>::DoDecode(mozilla::MediaRawData*, bool*, nsTArray<RefPtr<mozilla::MediaData> >&) /src/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:215:26
#4 0x7fd8ac322f96 in mozilla::FFmpegVideoDecoder<46465650>::ProcessDecode(mozilla::MediaRawData*) /src/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:181:20
#5 0x7fd8ac327522 in decltype (((*{parm#1}).*{parm#2})((((Get<0ul>)({parm#3})).PassAsParameter)())) mozilla::detail::RunnableMethodArguments<mozilla::MediaRawData*>::applyImpl<mozilla::FFmpegDataDecoder<46465650>, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)(mozilla::MediaRawData*), StoreRefPtrPassByPtr<mozilla::MediaRawData>, 0ul>(mozilla::FFmpegDataDecoder<46465650>*, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)(mozilla::MediaRawData*), mozilla::Tuple<StoreRefPtrPassByPtr<mozilla::MediaRawData> >&, mozilla::IndexSequence<0ul>) /src/obj-firefox/dist/include/nsThreadUtils.h:1142:12
#6 0x7fd8ac32748c in decltype (applyImpl({parm#1}, {parm#2}, (*this).mArguments, (mozilla::IndexSequence<0ul>)())) mozilla::detail::RunnableMethodArguments<mozilla::MediaRawData*>::apply<mozilla::FFmpegDataDecoder<46465650>, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)(mozilla::MediaRawData*)>(mozilla::FFmpegDataDecoder<46465650>*, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)(mozilla::MediaRawData*)) /src/obj-firefox/dist/include/nsThreadUtils.h:1148:12
#7 0x7fd8ac327416 in mozilla::detail::MethodCall<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true>, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)(mozilla::MediaRawData*), mozilla::FFmpegDataDecoder<46465650>, mozilla::MediaRawData*>::Invoke() /src/obj-firefox/dist/include/mozilla/MozPromise.h:1370:18
#8 0x7fd8ac327156 in mozilla::detail::ProxyRunnable<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true>, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)(mozilla::MediaRawData*), mozilla::FFmpegDataDecoder<46465650>, mozilla::MediaRawData*>::Run() /src/obj-firefox/dist/include/mozilla/MozPromise.h:1395:42
#9 0x7fd8a7bbf7e9 in mozilla::TaskQueue::Runner::Run() /src/xpcom/threads/TaskQueue.cpp:246:12
#10 0x7fd8a7bf5cce in nsThreadPool::Run() /src/xpcom/threads/nsThreadPool.cpp:226:14
#11 0x7fd8a7bf609c in non-virtual thunk to nsThreadPool::Run() /src/xpcom/threads/nsThreadPool.cpp:154:15
#12 0x7fd8a7bedf4a in nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1040:14
#13 0x7fd8a7bf3010 in NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:521:10
#14 0x7fd8a8754624 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:339:20
#15 0x7fd8a86a4897 in MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#16 0x7fd8a86a4729 in MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#17 0x7fd8a7be94f3 in nsThread::ThreadFunc(void*) /src/xpcom/threads/nsThread.cpp:426:11
#18 0x7fd8c417464d in _pt_root /src/nsprpub/pr/src/pthreads/ptthread.c:216:5
#19 0x7fd8c7ab96b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)
#20 0x7fd8c6b423dc in clone /build/glibc-bfm8X4/glibc-2.23/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109

essSanitizer can not provide additional info.
ARY: AddressSanitizer: SEGV /src/dom/media/MediaData.cpp:127:5 in lla::ValidateBufferAndPicture(mozilla::VideoData::YCbCrBuffer const&, lla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)
ad T60 (MediaPD~oder #1) created by T59 (MediaPl~back #1) here:
#0 0x4a4dd6 in __interceptor_pthread_create /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:245:3
#1 0x7fd8c4170e12 in _PR_CreateThread /src/nsprpub/pr/src/pthreads/ptthread.c:457:14
#2 0x7fd8c41709ce in PR_CreateThread /src/nsprpub/pr/src/pthreads/ptthread.c:548:12
#3 0x7fd8a7beb07e in nsThread::Init(nsACString const&) /src/xpcom/threads/nsThread.cpp:599:8
#4 0x7fd8a7bf2379 in nsThreadManager::NewNamedThread(nsACString const&, unsigned int, nsIThread**) /src/xpcom/threads/nsThreadManager.cpp:298:22
#5 0x7fd8a7bf5189 in NS_NewNamedThread(nsACString const&, nsIThread**, nsIRunnable*, unsigned int) /src/xpcom/threads/nsThreadUtils.cpp:145:45
#6 0x7fd8a7bf4df3 in nsThreadPool::PutEvent(already_AddRefed<nsIRunnable>, unsigned int) /src/xpcom/threads/nsThreadPool.cpp:107:17
#7 0x7fd8a7bf6391 in nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /src/xpcom/threads/nsThreadPool.cpp:275:5
#8 0x7fd8a7bc4172 in mozilla::SharedThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /src/obj-firefox/dist/include/mozilla/SharedThreadPool.h:71:68
#9 0x7fd8a7bbe6d4 in mozilla::TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>&, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) /src/xpcom/threads/TaskQueue.cpp:128:26
#10 0x7fd8a7bc4c09 in mozilla::TaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) /src/obj-firefox/dist/include/mozilla/TaskQueue.h:71:21
#11 0x7fd8abf5d236 in mozilla::AutoTaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) /src/obj-firefox/dist/include/AutoTaskQueue.h:43:17
#12 0x7fd8a7ba8eba in mozilla::AbstractThread::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /src/xpcom/threads/AbstractThread.cpp:226:3
#13 0x7fd8abf80a00 in decltype ({parm#4}()) mozilla::detail::InvokeAsync<mozilla::MediaFormatReader::DemuxerProxy::Init()::$_10>(nsISerialEventTarget*, char const*, mozilla::detail::AllowInvokeAsyncFunctionLVRef, mozilla::MediaFormatReader::DemuxerProxy::Init()::$_10&&) /src/obj-firefox/dist/include/mozilla/MozPromise.h:1557:12
#14 0x7fd8abf1e542 in decltype ({parm#3}()) mozilla::InvokeAsync<mozilla::MediaFormatReader::DemuxerProxy::Init()::$_10>(nsISerialEventTarget*, char const*, mozilla::MediaFormatReader::DemuxerProxy::Init()::$_10&&) /src/obj-firefox/dist/include/mozilla/MozPromise.h:1574:10
#15 0x7fd8abf1e379 in mozilla::MediaFormatReader::DemuxerProxy::Init() /src/dom/media/MediaFormatReader.cpp:1021:10
#16 0x7fd8abf2296d in mozilla::MediaFormatReader::AsyncReadMetadata() /src/dom/media/MediaFormatReader.cpp:1268:13
#17 0x7fd8ac0458c0 in decltype (((*{parm#1}).*{parm#2})()) mozilla::detail::RunnableMethodArguments<>::applyImpl<mozilla::MediaFormatReader, RefPtr<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true> > (mozilla::MediaFormatReader::*)()>(mozilla::MediaFormatReader*, RefPtr<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true> > (mozilla::MediaFormatReader::*)(), mozilla::Tuple<>&, mozilla::IndexSequence<>) /src/obj-firefox/dist/include/nsThreadUtils.h:1142:12
#18 0x7fd8ac04586c in decltype (applyImpl({parm#1}, {parm#2}, (*this).mArguments, (mozilla::IndexSequence<>)())) mozilla::detail::RunnableMethodArguments<>::apply<mozilla::MediaFormatReader, RefPtr<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true> > (mozilla::MediaFormatReader::*)()>(mozilla::MediaFormatReader*, RefPtr<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true> > (mozilla::MediaFormatReader::*)()) /src/obj-firefox/dist/include/nsThreadUtils.h:1148:12
#19 0x7fd8ac045566 in mozilla::detail::MethodCall<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true>, RefPtr<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true> > (mozilla::MediaFormatReader::*)(), mozilla::MediaFormatReader>::Invoke() /src/obj-firefox/dist/include/mozilla/MozPromise.h:1370:18
#20 0x7fd8ac0452a6 in mozilla::detail::ProxyRunnable<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true>, RefPtr<mozilla::MozPromise<mozilla::MetadataHolder, mozilla::MediaResult, true> > (mozilla::MediaFormatReader::*)(), mozilla::MediaFormatReader>::Run() /src/obj-firefox/dist/include/mozilla/MozPromise.h:1395:42
#21 0x7fd8a7bc7f57 in mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() /src/obj-firefox/dist/include/mozilla/TaskDispatcher.h:209:37
#22 0x7fd8a7bbf7e9 in mozilla::TaskQueue::Runner::Run() /src/xpcom/threads/TaskQueue.cpp:246:12
#23 0x7fd8a7bf5cce in nsThreadPool::Run() /src/xpcom/threads/nsThreadPool.cpp:226:14
#24 0x7fd8a7bf609c in non-virtual thunk to nsThreadPool::Run() /src/xpcom/threads/nsThreadPool.cpp:154:15
#25 0x7fd8a7bedf4a in nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1040:14
#26 0x7fd8a7bf3010 in NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:521:10
#27 0x7fd8a87547fc in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:369:5
#28 0x7fd8a86a4897 in MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#29 0x7fd8a86a4729 in MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#30 0x7fd8a7be94f3 in nsThread::ThreadFunc(void*) /src/xpcom/threads/nsThread.cpp:426:11
#31 0x7fd8c417464d in _pt_root /src/nsprpub/pr/src/pthreads/ptthread.c:216:5
#32 0x7fd8c7ab96b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)

ad T59 (MediaPl~back #1) created by T0 here:
#0 0x4a4dd6 in __interceptor_pthread_create /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:245:3
#1 0x7fd8c4170e12 in _PR_CreateThread /src/nsprpub/pr/src/pthreads/ptthread.c:457:14
#2 0x7fd8c41709ce in PR_CreateThread /src/nsprpub/pr/src/pthreads/ptthread.c:548:12
#3 0x7fd8a7beb07e in nsThread::Init(nsACString const&) /src/xpcom/threads/nsThread.cpp:599:8
#4 0x7fd8a7bf2379 in nsThreadManager::NewNamedThread(nsACString const&, unsigned int, nsIThread**) /src/xpcom/threads/nsThreadManager.cpp:298:22
#5 0x7fd8a7bf5189 in NS_NewNamedThread(nsACString const&, nsIThread**, nsIRunnable*, unsigned int) /src/xpcom/threads/nsThreadUtils.cpp:145:45
#6 0x7fd8a7bf4df3 in nsThreadPool::PutEvent(already_AddRefed<nsIRunnable>, unsigned int) /src/xpcom/threads/nsThreadPool.cpp:107:17
#7 0x7fd8a7bf6391 in nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /src/xpcom/threads/nsThreadPool.cpp:275:5
#8 0x7fd8a7bc4172 in mozilla::SharedThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /src/obj-firefox/dist/include/mozilla/SharedThreadPool.h:71:68
#9 0x7fd8a7bbe6d4 in mozilla::TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>&, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) /src/xpcom/threads/TaskQueue.cpp:128:26
#10 0x7fd8a7bc4c09 in mozilla::TaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) /src/obj-firefox/dist/include/mozilla/TaskQueue.h:71:21
#11 0x7fd8abeaffdf in mozilla::Mirror<mozilla::Maybe<mozilla::media::TimeUnit> >::Impl::Connect(mozilla::AbstractCanonical<mozilla::Maybe<mozilla::media::TimeUnit> >*) /src/obj-firefox/dist/include/mozilla/StateMirroring.h:341:34
#12 0x7fd8abe5526f in mozilla::MediaDecoder::ConnectMirrors(mozilla::MediaDecoderStateMachine*) /src/dom/media/MediaDecoder.cpp:1281:25
#13 0x7fd8abe4cc27 in mozilla::MediaDecoder::SetStateMachine(mozilla::MediaDecoderStateMachine*) /src/dom/media/MediaDecoder.cpp:1308:5
#14 0x7fd8abdd718f in mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /src/dom/media/ChannelMediaDecoder.cpp:260:3
#15 0x7fd8abc8b740 in nsresult mozilla::dom::HTMLMediaElement::SetupDecoder<mozilla::ChannelMediaDecoder, nsIChannel*&, bool&, nsIStreamListener**&>(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /src/dom/html/HTMLMediaElement.cpp:4754:27
#16 0x7fd8abc6bbab in mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /src/dom/html/HTMLMediaElement.cpp:4838:10
#17 0x7fd8abc7c234 in mozilla::dom::HTMLMediaElement::LoadWithChannel(nsIChannel*, nsIStreamListener**) /src/dom/html/HTMLMediaElement.cpp:2577:8
#18 0x7fd8abd100cd in mozilla::dom::VideoDocument::CreateSyntheticVideoDocument(nsIChannel*, nsIStreamListener**) /src/dom/html/VideoDocument.cpp:112:12
#19 0x7fd8abd0fcd3 in mozilla::dom::VideoDocument::StartDocumentLoad(char const*, nsIChannel*, nsILoadGroup*, nsISupports*, nsIStreamListener**, bool, nsIContentSink*) /src/dom/html/VideoDocument.cpp:59:8
#20 0x7fd8adc01c98 in nsContentDLF::CreateDocument(char const*, nsIChannel*, nsILoadGroup*, nsIDocShell*, nsID const&, nsIStreamListener**, nsIContentViewer**) /src/layout/build/nsContentDLF.cpp:364:13
#21 0x7fd8adc01734 in nsContentDLF::CreateInstance(char const*, nsIChannel*, nsILoadGroup*, nsACString const&, nsIDocShell*, nsISupports*, nsIStreamListener**, nsIContentViewer**) /src/layout/build/nsContentDLF.cpp:194:12
#22 0x7fd8afad70d6 in nsDocShell::NewContentViewerObj(nsACString const&, nsIRequest*, nsILoadGroup*, nsIStreamListener**, nsIContentViewer**) /src/docshell/base/nsDocShell.cpp:9378:35
#23 0x7fd8afa86962 in nsDocShell::CreateContentViewer(nsACString const&, nsIRequest*, nsIStreamListener**) /src/docshell/base/nsDocShell.cpp:9169:17
#24 0x7fd8afa85f17 in nsDSURIContentListener::DoContent(nsACString const&, bool, nsIRequest*, nsIStreamListener**, bool*) /src/docshell/base/nsDSURIContentListener.cpp:114:21
#25 0x7fd8a914b3bb in nsDocumentOpenInfo::TryContentListener(nsIURIContentListener*, nsIChannel*) /src/uriloader/base/nsURILoader.cpp:743:28
#26 0x7fd8a9149549 in nsDocumentOpenInfo::DispatchContent(nsIRequest*, nsISupports*) /src/uriloader/base/nsURILoader.cpp:421:30
#27 0x7fd8a914898d in nsDocumentOpenInfo::OnStartRequest(nsIRequest*, nsISupports*) /src/uriloader/base/nsURILoader.cpp:296:8
#28 0x7fd8a7d37e2b in nsBaseChannel::OnStartRequest(nsIRequest*, nsISupports*) /src/netwerk/base/nsBaseChannel.cpp:837:25
#29 0x7fd8a7d7d242 in nsInputStreamPump::OnStateStart() /src/netwerk/base/nsInputStreamPump.cpp:537:25
#30 0x7fd8a7d7c876 in nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) /src/netwerk/base/nsInputStreamPump.cpp:440:25
#31 0x7fd8a7b7feb0 in nsInputStreamReadyEvent::Run() /src/xpcom/io/nsStreamUtils.cpp:97:20
#32 0x7fd8a7bedf4a in nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1040:14
#33 0x7fd8a7bf3010 in NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:521:10
#34 0x7fd8a87534e5 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:97:21
#35 0x7fd8a86a4897 in MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#36 0x7fd8a86a4729 in MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#37 0x7fd8acf7711a in nsBaseAppShell::Run() /src/widget/nsBaseAppShell.cpp:158:27
#38 0x7fd8b0164ea1 in nsAppStartup::Run() /src/toolkit/components/startup/nsAppStartup.cpp:288:30
#39 0x7fd8b02c9a82 in XREMain::XRE_mainRun() /src/toolkit/xre/nsAppRunner.cpp:4646:22
#40 0x7fd8b02cb6ca in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4810:8
#41 0x7fd8b02cc5b8 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4905:21
#42 0x4ecb38 in do_main(int, char**, char**) /src/browser/app/nsBrowserApp.cpp:236:22
#43 0x4ec450 in main /src/browser/app/nsBrowserApp.cpp:309:16
#44 0x7fd8c6a5b82f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
Flags: in-testsuite?
Mass change P1->P2 to align with new Mozilla triage process
Priority: P1 → P2
This reproduces further back than mozregression can bisect debug builds (1 year).
The assertion is hit when doing 

```
mInfo.ScaledImageRect(mFrame->width, mFrame->height) 
```

at [1].

mInfo.mImage.{width,height}         is (64,64)
mInfo.mImageRect.{X,Y,Width,Height} is (29,4,29,29)
mFrame.{width,height}               is (1, 64)

[1] http://searchfox.org/mozilla-central/rev/20e41d4a61a8f5e34c9cf357304b78b3e9bced8a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp#356

An error handle should be introduced here to avoid rectangle with 0 width or 0 height.
Assignee: nobody → kikuo
Attachment #8913967 - Flags: review?(jyavenard)
Comment on attachment 8913967 [details]
Bug 1393272 - Use original width and height if either the scaled width or height is 0.

https://reviewboard.mozilla.org/r/185334/#review192414

::: commit-message-d4921:1
(Diff revision 1)
> +Bug 1393272 - Avoid creating a scaled image rectangle with zero width or zero height.

your change do the opposite of whst it states.
and it can return an emoty ImageRect
Attachment #8913967 - Flags: review?(jyavenard) → review-
Comment on attachment 8913967 [details]
Bug 1393272 - Use original width and height if either the scaled width or height is 0.

https://reviewboard.mozilla.org/r/185334/#review192556

::: commit-message-d4921:1
(Diff revision 1)
> +Bug 1393272 - Avoid creating a scaled image rectangle with zero width or zero height.

The change is basically an error handling to avoid setting 0 width(scaled) or 0 height(scaled) into imageRect.

See [1], we've tried to get an sanitized imageRect if {mImageRect.Width(),mImageRect.Height()} is default(-1).
So in theory, we won't get an empty imageRect @292, an empty imageRect is returned @290 !

[1] http://searchfox.org/mozilla-central/rev/aa721cc82a56fc307e899263d325c81b73e38a28/dom/media/MediaInfo.h#270

So I'd like to handle the scaled width/height here to at least display the video frame instead of a tab crash.

Or do you think I should rephrase the commit message to e.g. "Avoid returning a 0 width or 0 height scaled image." ?
Comment on attachment 8913967 [details]
Bug 1393272 - Use original width and height if either the scaled width or height is 0.

https://reviewboard.mozilla.org/r/185334/#review192556

> The change is basically an error handling to avoid setting 0 width(scaled) or 0 height(scaled) into imageRect.
> 
> See [1], we've tried to get an sanitized imageRect if {mImageRect.Width(),mImageRect.Height()} is default(-1).
> So in theory, we won't get an empty imageRect @292, an empty imageRect is returned @290 !
> 
> [1] http://searchfox.org/mozilla-central/rev/aa721cc82a56fc307e899263d325c81b73e38a28/dom/media/MediaInfo.h#270
> 
> So I'd like to handle the scaled width/height here to at least display the video frame instead of a tab crash.
> 
> Or do you think I should rephrase the commit message to e.g. "Avoid returning a 0 width or 0 height scaled image." ?

sure, but you are setting a width of zero (or height) and returning that object under some circumstances still.

so either you make the code go by what you put in the description, or you modify the description to match the code.

right now, they don't match.

i dont see how your new description is valid, seeing thst you can return ImageRect() (which has all value at zero)
Has Regression Range: --- → no
Comment on attachment 8913967 [details]
Bug 1393272 - Use original width and height if either the scaled width or height is 0.

https://reviewboard.mozilla.org/r/185334/#review193596

::: commit-message-d4921:1
(Diff revision 2)
> +Bug 1393272 - Consider using width or height reported by container if either the scaled width or height is 0.

use original width and height if either the scaled width or height are 0.
Attachment #8913967 - Flags: review?(jyavenard) → review+
Comment on attachment 8913967 [details]
Bug 1393272 - Use original width and height if either the scaled width or height is 0.

https://reviewboard.mozilla.org/r/185334/#review192556

> sure, but you are setting a width of zero (or height) and returning that object under some circumstances still.
> 
> so either you make the code go by what you put in the description, or you modify the description to match the code.
> 
> right now, they don't match.
> 
> i dont see how your new description is valid, seeing thst you can return ImageRect() (which has all value at zero)

Thanks for clarifying the point !
I'll rephrase it to match what the code does as I'd like to keep the check MediaData::ValidateBufferAndPicture to catch other corner case.
Comment on attachment 8913967 [details]
Bug 1393272 - Use original width and height if either the scaled width or height is 0.

https://reviewboard.mozilla.org/r/185334/#review193596

> use original width and height if either the scaled width or height are 0.

Thanks for the review!
Pushed by kikuo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3e504c84f3d3
Use original width and height if either the scaled width or height is 0. r=jya
https://hg.mozilla.org/mozilla-central/rev/3e504c84f3d3
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Flags: needinfo?(ryanvm)
Flags: needinfo?(ryanvm)
Flags: in-testsuite?
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.