Assertion failure: sLayersAccelerationPrefsInitialized gfx/thebes/gfxPlatform.cpp:2254

RESOLVED FIXED in Firefox 39, Firefox OS v2.1

Status

()

Core
Graphics
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: jya, Assigned: nical)

Tracking

(Blocks: 1 bug)

Trunk
mozilla40
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox39+ fixed, firefox40 fixed, firefox-esr38 fixed, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-master fixed)

Details

(Whiteboard: gfx-noted)

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
351301632[124d1e110]: Creating AppleVDADecoder for 640x364 (640x364) h.264 video
Assertion failure: sLayersAccelerationPrefsInitialized, at /Users/jyavenard/Work/Mozilla/mozilla-central/gfx/thebes/gfxPlatform.cpp:2254
#01: gfxPlatform::CanUseHardwareVideoDecoding()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x16d1861]
2069123840[112a1c070]: Decoder=11a58a820 NotifyDownloadEnded, status=0
2069123840[112a1c070]: 11a829000 Queuing event progress
2069123840[112a1c070]: 11a829000 Queuing event suspend
#02: mozilla::AppleVDADecoder::Init()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x316b2f9]
#03: mozilla::AppleVDADecoder::CreateVDADecoder(mp4_demuxer::VideoDecoderConfig const&, mozilla::FlushableMediaTaskQueue*, mozilla::MediaDataDecoderCallback*, mozilla::layers::ImageContainer*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x316ad62]
#04: mozilla::AppleDecoderModule::CreateVideoDecoder(mp4_demuxer::VideoDecoderConfig const&, mozilla::layers::LayersBackend, mozilla::layers::ImageContainer*, mozilla::FlushableMediaTaskQueue*, mozilla::MediaDataDecoderCallback*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x316ac21]
#05: mozilla::H264Converter::CreateDecoder()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x316ef0e]
#06: mozilla::H264Converter::H264Converter(mozilla::PlatformDecoderModule*, mp4_demuxer::VideoDecoderConfig const&, mozilla::layers::LayersBackend, mozilla::layers::ImageContainer*, mozilla::FlushableMediaTaskQueue*, mozilla::MediaDataDecoderCallback*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x316edcc]
#07: mozilla::H264Converter::H264Converter(mozilla::PlatformDecoderModule*, mp4_demuxer::VideoDecoderConfig const&, mozilla::layers::LayersBackend, mozilla::layers::ImageContainer*, mozilla::FlushableMediaTaskQueue*, mozilla::MediaDataDecoderCallback*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x316699b]
#08: mozilla::PlatformDecoderModule::CreateDecoder(mp4_demuxer::TrackConfig const&, mozilla::FlushableMediaTaskQueue*, mozilla::MediaDataDecoderCallback*, mozilla::layers::LayersBackend, mozilla::layers::ImageContainer*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3166808]
[Child 9659] WARNING: NS_ENSURE_TRUE(node) failed: file /Users/jyavenard/Work/Mozilla/mozilla-central/layout/base/nsDocumentViewer.cpp, line 3530
[Child 9659] WARNING: NS_ENSURE_TRUE(node) failed: file /Users/jyavenard/Work/Mozilla/mozilla-central/layout/base/nsDocumentViewer.cpp, line 3530
[Child 9659] WARNING: NS_ENSURE_TRUE(node) failed: file /Users/jyavenard/Work/Mozilla/mozilla-central/layout/base/nsDocumentViewer.cpp, line 3530
#09: mozilla::MP4Reader::EnsureDecodersSetup()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x315dc26]
#10: mozilla::MP4Reader::ReadMetadata(mozilla::MediaInfo*, nsDataHashtable<nsCStringHashKey, nsCSt2069123840[112a1c070]: 11a829000 Dispatching event progress
ring>**)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x315d14f]
2069123840[112a1c070]: 11a829000 Dispatching event suspend
#11: mozilla::MediaDecoderReader::CallReadMetadata()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2f27114]
#12: mozilla::detail::MethodCallWithNoArgs<mozilla::MediaPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true>, mozilla::MediaDecoderReader>::Invoke()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2f89681]
#13: mozilla::detail::ProxyRunnable<mozilla::MediaPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true> >::Run()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2f8812f]
#14: mozilla::MediaTaskQueue::Runner::Run()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2f59909]
#15: nsThreadPool::Run()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x18da47]
#16: non-virtual thunk to nsThreadPool::Run()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x18db3c]
[Parent 9653] WARNING: NS_ENSURE_TRUE(aURI) failed: file /Users/jyavenard/Work/Mozilla/mozilla-central/netwerk/dns/nsEffectiveTLDService.cpp, line 158
[Parent 9653] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80070057: file /Users/jyavenard/Work/Mozilla/mozilla-central/dom/base/ThirdPartyUtil.cpp, line 355
#17: nsThread::ProcessNextEvent(bool, bool*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x18a458]
#18: NS_ProcessNextEvent(nsIThread*, bool)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1e71c7]
#19: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x832d13]
#20: MessageLoop::RunInternal()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7a5e75]
#21: MessageLoop::RunHandler()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7a5d85]
#22: MessageLoop::Run()[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7a5d2d]
#23: nsThread::ThreadFunc(void*)[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x188946]
#24: _pt_root[/Users/jyavenard/Work/Mozilla/mozilla-central/obj-ff-dbg/dist/NightlyDebug.app/Contents/MacOS/libnss3.dylib +0x3743ef]
#25: _pthread_body[/usr/lib/system/libsystem_pthread.dylib +0x3268]
#26: _pthread_body[/usr/lib/system/libsystem_pthread.dylib +0x31e5]
[Parent 9653] WARNING: NS_ENSURE_SUCCESS(rv, BadImage(newImage)) failed with result 0x80004005: file /Users/jyavenard/Work/Mozilla/mozilla-central/image/src/ImageFactory.cpp, line 205
(lldb) 

It's plugin-container that crashes:

backtrace:
* thread #40: tid = 0x1332a7, 0x0000000101cb586b XUL`gfxPlatform::CanUseHardwareVideoDecoding() + 75 at gfxPlatform.cpp:2254, name = 'Media P~back #2', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000101cb586b XUL`gfxPlatform::CanUseHardwareVideoDecoding() + 75 at gfxPlatform.cpp:2254
    frame #1: 0x000000010374f2f9 XUL`mozilla::AppleVDADecoder::Init(this=0x000000011a5da710) + 25 at AppleVDADecoder.cpp:83
    frame #2: 0x000000010374ed62 XUL`mozilla::AppleVDADecoder::CreateVDADecoder(aConfig=0x000000011a7e4018, aVideoTaskQueue=0x0000000124d64160, aCallback=0x000000012c310520, aImageContainer=0x000000011d4fe480) + 114 at AppleVDADecoder.cpp:512
    frame #3: 0x000000010374ec21 XUL`mozilla::AppleDecoderModule::CreateVideoDecoder(this=0x0000000125383ca0, aConfig=0x000000011a7e4018, aLayersBackend=LAYERS_OPENGL, aImageContainer=0x000000011d4fe480, aVideoTaskQueue=0x0000000124d64160, aCallback=0x000000012c310520) + 145 at AppleDecoderModule.cpp:167
    frame #4: 0x0000000103752f0e XUL`mozilla::H264Converter::CreateDecoder(this=0x000000011a7e4000) + 302 at H264Converter.cpp:177
    frame #5: 0x0000000103752dcc XUL`mozilla::H264Converter::H264Converter(this=0x000000011a7e4000, aPDM=0x0000000125383ca0, aConfig=0x00000001156fe4f0, aLayersBackend=LAYERS_OPENGL, aImageContainer=0x000000011d4fe480, aVideoTaskQueue=0x0000000124d64160, aCallback=0x000000012c310520) + 300 at H264Converter.cpp:38
    frame #6: 0x000000010374a99b XUL`mozilla::H264Converter::H264Converter(this=0x000000011a7e4000, aPDM=0x0000000125383ca0, aConfig=0x00000001156fe4f0, aLayersBackend=LAYERS_OPENGL, aImageContainer=0x000000011d4fe480, aVideoTaskQueue=0x0000000124d64160, aCallback=0x000000012c310520) + 91 at H264Converter.cpp:39
    frame #7: 0x000000010374a808 XUL`mozilla::PlatformDecoderModule::CreateDecoder(this=0x0000000125383ca0, aConfig=0x00000001156fe4f0, aTaskQueue=0x0000000124d64160, aCallback=0x000000012c310520, aLayersBackend=LAYERS_OPENGL, aImageContainer=0x000000011d4fe480) + 424 at PlatformDecoderModule.cpp:201
    frame #8: 0x0000000103741c26 XUL`mozilla::MP4Reader::EnsureDecodersSetup(this=0x000000011a84f000) + 2534 at MP4Reader.cpp:541
    frame #9: 0x000000010374114f XUL`mozilla::MP4Reader::ReadMetadata(this=0x000000011a84f000, aInfo=0x000000011a874b80, aTags=0x000000011a874c38) + 2271 at MP4Reader.cpp:465
    frame #10: 0x000000010350b114 XUL`mozilla::MediaDecoderReader::CallReadMetadata(this=0x000000011a84f000) + 484 at MediaDecoderReader.cpp:211
    frame #11: 0x000000010356d681 XUL`mozilla::detail::MethodCallWithNoArgs<mozilla::MediaPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true>, mozilla::MediaDecoderReader>::Invoke(this=0x000000011a8eaf60) + 145 at MediaPromise.h:594
    frame #12: 0x000000010356c12f XUL`mozilla::detail::ProxyRunnable<mozilla::MediaPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true> >::Run(this=0x0000000124d1a430) + 63 at MediaPromise.h:638
    frame #13: 0x000000010353d909 XUL`mozilla::MediaTaskQueue::Runner::Run(this=0x000000011a8ecc60) + 633 at MediaTaskQueue.cpp:226
    frame #14: 0x0000000100771a47 XUL`nsThreadPool::Run(this=0x000000011a8ac530) + 967 at nsThreadPool.cpp:225
    frame #15: 0x0000000100771b3c XUL`non-virtual thunk to nsThreadPool::Run(this=0x000000011a8ac538) + 28 at nsThreadPool.cpp:239
    frame #16: 0x000000010076e458 XUL`nsThread::ProcessNextEvent(this=0x0000000124c41f10, aMayWait=false, aResult=0x0000000114f06c4e) + 2088 at nsThread.cpp:841
    frame #17: 0x00000001007cb1c7 XUL`NS_ProcessNextEvent(aThread=0x0000000124c41f10, aMayWait=false) + 151 at nsThreadUtils.cpp:265
    frame #18: 0x0000000100e16d13 XUL`mozilla::ipc::MessagePumpForNonMainThreads::Run(this=0x000000011a809a40, aDelegate=0x00000001156fd350) + 691 at MessagePump.cpp:339
    frame #19: 0x0000000100d89e75 XUL`MessageLoop::RunInternal(this=0x00000001156fd350) + 117 at message_loop.cc:233
    frame #20: 0x0000000100d89d85 XUL`MessageLoop::RunHandler(this=0x00000001156fd350) + 21 at message_loop.cc:226
    frame #21: 0x0000000100d89d2d XUL`MessageLoop::Run(this=0x00000001156fd350) + 45 at message_loop.cc:200
    frame #22: 0x000000010076c946 XUL`nsThread::ThreadFunc(aArg=0x0000000124c41f10) + 358 at nsThread.cpp:348
    frame #23: 0x00000001003d33ef libnss3.dylib`_pt_root(arg=0x0000000124d1e110) + 463 at ptthread.c:212
    frame #24: 0x00007fff8fa5f268 libsystem_pthread.dylib`_pthread_body + 131
    frame #25: 0x00007fff8fa5f1e5 libsystem_pthread.dylib`_pthread_start + 176
    frame #26: 0x00007fff8fa5d41d libsystem_pthread.dylib`thread_start + 13
(Reporter)

Comment 1

3 years ago
this happens with e10s active.

Looks like the UsesOffMainThreadCompositing() should be called for each new process.
Flags: needinfo?(matt.woodrow)
Do we have the steps to reproduce for this?
Flags: needinfo?(matt.woodrow)
Whiteboard: gfx-noted
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dc4f5622920f
Created attachment 8593436 [details] [diff] [review]
Initialize prefs earlier (:nical's patch) carry r=jrmuizelaar
Attachment #8593436 - Flags: review+
Keywords: checkin-needed
Assignee: nobody → nical.bugzilla
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ca20bbd81e9
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9ca20bbd81e9
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
(Assignee)

Comment 7

2 years ago
Comment on attachment 8593436 [details] [diff] [review]
Initialize prefs earlier (:nical's patch) carry r=jrmuizelaar

Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]: a crash in some rare cases.
[Describe test coverage new/current, TreeHerder]:
[Risks and why]: none. This is very simple and has landed a while ago with no issues.
[String/UUID change made/needed]:
Attachment #8593436 - Flags: approval-mozilla-beta?

Comment 8

2 years ago
Comment on attachment 8593436 [details] [diff] [review]
Initialize prefs earlier (:nical's patch) carry r=jrmuizelaar

Approving for uplift to Beta. This has been in mozilla-central for a while now so it hasn't had a negative impact that we know of.
Attachment #8593436 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment 9

2 years ago
Adding a tracking flag for 39. Milan, do we have a testcase for this fix? How can we confirm that the bug is fixed?
tracking-firefox39: --- → +
Flags: needinfo?(milan)
(Assignee)

Comment 10

2 years ago
Comment on attachment 8593436 [details] [diff] [review]
Initialize prefs earlier (:nical's patch) carry r=jrmuizelaar

[Approval Request Comment]
User impact if declined: potential crash.
Fix Landed on Version: 39 & 40.
Risk to taking this patch (and alternatives if risky): none, it's landed for a while with no problems, trivial patch.
String or UUID changes made by this patch: none.
Attachment #8593436 - Flags: approval-mozilla-esr38?
Attachment #8593436 - Flags: approval-mozilla-b2g37?

Comment 11

2 years ago
Comment on attachment 8593436 [details] [diff] [review]
Initialize prefs earlier (:nical's patch) carry r=jrmuizelaar

Approving as this already exist in master for a while. Please NI if this causing any side effect.
Attachment #8593436 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
(In reply to Ritu Kothari (:ritu) from comment #9)
> Adding a tracking flag for 39. Milan, do we have a testcase for this fix?
> How can we confirm that the bug is fixed?

I'm sure if there is, Jean-Yves may be able to tell us.  I don't know that we can do an automated test, because the order of initialization is different in those tests vs. standard running of the browser.
Flags: needinfo?(milan) → needinfo?(jyavenard)
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/50dc37421708
status-b2g-v2.2: --- → fixed
status-b2g-master: --- → fixed
https://hg.mozilla.org/releases/mozilla-beta/rev/0e89ce35d118
status-firefox39: --- → fixed
(Reporter)

Comment 15

2 years ago
(In reply to Milan Sreckovic [:milan] from comment #12)
> (In reply to Ritu Kothari (:ritu) from comment #9)
> > Adding a tracking flag for 39. Milan, do we have a testcase for this fix?
> > How can we confirm that the bug is fixed?
> 
> I'm sure if there is, Jean-Yves may be able to tell us.  I don't know that
> we can do an automated test, because the order of initialization is
> different in those tests vs. standard running of the browser.

I'm not aware of a proper way to test. It was an intermittent crash, maybe one in 10 runs.
Flags: needinfo?(jyavenard)
Attachment #8593436 - Flags: approval-mozilla-b2g34?

Updated

2 years ago
Attachment #8593436 - Flags: approval-mozilla-b2g34? → approval-mozilla-b2g34+
https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/e52807dee101
status-b2g-v2.1: --- → fixed
https://hg.mozilla.org/releases/mozilla-b2g34_v2_1s/rev/e52807dee101
status-b2g-v2.1S: --- → fixed
Comment on attachment 8593436 [details] [diff] [review]
Initialize prefs earlier (:nical's patch) carry r=jrmuizelaar

stability and low risk, taking it.
Attachment #8593436 - Flags: approval-mozilla-esr38? → approval-mozilla-esr38+
https://hg.mozilla.org/releases/mozilla-esr38/rev/e8504a5ff7cc
status-firefox-esr38: --- → fixed
You need to log in before you can comment on or make changes to this bug.