Crash in [@ mozilla::gfx::DrawTargetD2D1::DrawSurface]
Categories
(Core :: Graphics, defect, P1)
Tracking
()
People
(Reporter: molly, Assigned: bobowen)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
This bug is for crash report bp-2ea9efad-2bba-45fd-9c8c-154430190911.
This crash consistently happens a few seconds after startup when gfx.canvas.remote is true. So far I've observed it when the focused tab is Phabricator or Gmail, but I'm not sure if that matters.
Top 10 frames of crashing thread:
0 xul.dll void mozilla::gfx::DrawTargetD2D1::DrawSurface gfx/2d/DrawTargetD2D1.cpp:199
1 xul.dll mozilla::gfx::RecordedDrawSurface::PlayEvent gfx/2d/RecordedEventImpl.h:2597
2 xul.dll static bool mozilla::gfx::RecordedEvent::DoWithEvent<mozilla::gfx::EventRingBuffer> gfx/2d/RecordedEventImpl.h
3 xul.dll mozilla::layers::CanvasTranslator::TranslateRecording gfx/layers/CanvasTranslator.cpp:83
4 xul.dll void mozilla::layers::CanvasParent::StartTranslation gfx/layers/ipc/CanvasParent.cpp:191
5 xul.dll nsresult mozilla::detail::RunnableMethodImpl< xpcom/threads/nsThreadUtils.h:1176
6 xul.dll nsresult nsThreadPool::Run xpcom/threads/nsThreadPool.cpp:246
7 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1225
8 xul.dll NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:486
9 xul.dll mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:333
Reporter | ||
Comment 1•6 years ago
|
||
I also submitted 726fbf0a-e1df-47e9-8e9f-b646d0190911 which looks much the same.
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
mhowell - thanks for testing and reporting.
Unfortunately, I can't reproduce this, but I've put together a build that logs all the events played for a surface if it's not in the lookup table.
You should be able to get logging out of this build with:
MOZ_LOG="TranslatorLog:5,sync" MOZ_LOG_FILE="blah"
It will eat a bit of memory because of storing all the events, but hopefully you can reproduce while the logging is turned on, to try and give me a clue.
Reporter | ||
Comment 3•6 years ago
|
||
Well, it doesn't actually end up doing much logging with that command. I set MOZ_LOG_FILE to "remote_canvas", and on startup there's three files created with the names remote_canvas.child-1.moz_log
, remote_canvas.child-10.moz_log
, and remote_canvas.moz_log
. Nothing is ever written to these files. When the crash occurs, a fourth file is created with the name remote_canvas.child-2.moz_log
with one line:
[GPU 17220: CanvasWorkers #1]: I/TranslatorLog Events for surface: faaf54c0 : 20 15
and nothing else is ever written there after that.
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Matt Howell (he/him) [:mhowell] from comment #3)
Well, it doesn't actually end up doing much logging with that command. I set MOZ_LOG_FILE to "remote_canvas", and on startup there's three files created with the names
remote_canvas.child-1.moz_log
,remote_canvas.child-10.moz_log
, andremote_canvas.moz_log
. Nothing is ever written to these files. When the crash occurs, a fourth file is created with the nameremote_canvas.child-2.moz_log
with one line:
[GPU 17220: CanvasWorkers #1]: I/TranslatorLog Events for surface: faaf54c0 : 20 15
and nothing else is ever written there after that.
Thanks, yeah it only logs when the issue occurs.
Annoying how when you see (what I hope is) the problem, how obvious it is. :-(
It looks like the DrawTargetD2D1::CreateSourceSurfaceFromData call is returning null.
If you wouldn't mind doing the honours again ...
I've put in an extra log when that happens to log the size of the surface:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=8877cedbeda004bf02a391b166f9d9544fb2eda4
I've also pushed a potential fix to try, assuming the issue is an invalid size:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=0b25116981efb31df526d892538e1036b1cc8f19
Reporter | ||
Comment 5•6 years ago
|
||
(In reply to Bob Owen (:bobowen) from comment #4)
I've put in an extra log when that happens to log the size of the surface:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=8877cedbeda004bf02a391b166f9d9544fb2eda4
I'm no expert but this size definitely looks suspicious:
[GPU 16248: CanvasWorkers #1]: I/TranslatorLog Surface creation failed 634feb20: width: 28 height: 33288
[GPU 16248: CanvasWorkers #1]: I/TranslatorLog Events for surface: 634feb20 : 20 15
I've also pushed a potential fix to try, assuming the issue is an invalid size:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=0b25116981efb31df526d892538e1036b1cc8f19
This doesn't seem to have fixed it, I get the same crash as before (which I submitted this time, if it helps). :(
Assignee | ||
Comment 6•6 years ago
|
||
(In reply to Matt Howell (he/him) [:mhowell] from comment #5)
(In reply to Bob Owen (:bobowen) from comment #4)
I've put in an extra log when that happens to log the size of the surface:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=8877cedbeda004bf02a391b166f9d9544fb2eda4I'm no expert but this size definitely looks suspicious:
[GPU 16248: CanvasWorkers #1]: I/TranslatorLog Surface creation failed 634feb20: width: 28 height: 33288 [GPU 16248: CanvasWorkers #1]: I/TranslatorLog Events for surface: 634feb20 : 20 15
Thanks, yes that 33288 is the problem I think.
I've also pushed a potential fix to try, assuming the issue is an invalid size:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=0b25116981efb31df526d892538e1036b1cc8f19This doesn't seem to have fixed it, I get the same crash as before (which I submitted this time, if it helps). :(
Hmm, I must need to add the check somewhere else as well.
Assignee | ||
Comment 7•6 years ago
|
||
OK, here's another attempt to catch the problem surface, thanks:
https://treeherder.mozilla.org/#/jobs?repo=try&duplicate_jobs=visible&revision=33ab286a97c33afcad17ed9cf47423186af3d480
Reporter | ||
Comment 8•6 years ago
|
||
Okay I've been running that build for several minutes and nothing has happened, and it normally only takes a few seconds, so I think it's worked this time.
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Matt Howell (he/him) [:mhowell] from comment #8)
Okay I've been running that build for several minutes and nothing has happened, and it normally only takes a few seconds, so I think it's worked this time.
Great, thanks for all the testing.
Assignee | ||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•