Closed Bug 1091903 Opened 10 years ago Closed 10 years ago

crash in mozilla::gfx::SourceSurfaceD2D1::SourceSurfaceD2D1 | IUnknown::QueryInterface

Categories

(Core :: Graphics, defect)

x86
Windows NT
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Tracking Status
firefox34 --- unaffected
firefox35 + disabled
firefox36 --- fixed

People

(Reporter: kairo, Assigned: bas.schouten)

References

Details

(Keywords: crash)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-202b3c93-ee94-4937-a232-75e7d2141023.
=============================================================

Top frames:
0 	xul.dll 	IUnknown::QueryInterface<ID2D1Bitmap1>(ID2D1Bitmap1**) 	c:/program files (x86)/windows kits/8.0/include/um/Unknwnbase.h:131
1 	xul.dll 	mozilla::gfx::SourceSurfaceD2D1::SourceSurfaceD2D1(ID2D1Image*, ID2D1DeviceContext*, mozilla::gfx::SurfaceFormat, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::DrawTargetD2D1*) 	gfx/2d/SourceSurfaceD2D1.cpp
2 	xul.dll 	mozilla::gfx::DrawTargetD2D1::Snapshot() 	gfx/2d/DrawTargetD2D1.cpp
[...]
Below this, the stacks diverge somewhat, many on Aurora even being truncated.

This crash is almost exclusiveley happening on the 35 train, nowadays in Aurora, it started on Nightly 20141002030202, with regression range of https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=14665b1de5ee&tochange=2399d1ae89e9 which is where D2D 1.1 was activated. It last appeared on Nightly on the 20141014030201 build which, is just the second 36.0a1 build, so the range of this signature disappearing on trunk is https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=78a4540b0a9c&tochange=54217864bae9 - I haven't checked yet if it might have moved to a different signature, but maybe we just need to uplift one of the patches in this range to Aurora.

Find more stats and report about this on at https://crash-stats.mozilla.com/report/list?signature=IUnknown%3A%3AQueryInterface%3CID2D1Bitmap1%3E%28ID2D1Bitmap1%2A%2A%29
FWIW, if I see things correctly, the only fix I see in the "fix range" that is even gfx-related is bug 966284. CCing :nical as well here, maybe he knows if that could have been an actual fix to this crash.
Tracking this while we determine the missing patch(es).
Flags: needinfo?(nical.bugzilla)
FYI, my laptop crashes a few times a day (sometimes more like 12 times a day) due to this bug. If I force-disable D2D 1.1 in about:config, though, it switches to Firefox becoming permanently unable to draw after a short while - probably when it would have crashed? There doesn't seem to be a way to recover it either. Is this a supported configuration, so I should file a bug? Or should I just assume the problem won't matter once D2D 1.1 crashes are fixed?

Things used to work fine on this machine, and I haven't touched the video drivers. I have two Firefox windows open right now that are solid white and don't repaint even if I resize them or restart dwm.exe.
Bas is the goto person for D2D 1.1 issues at the moment. D2D1.1 has been desiabled on beta (I think) 

(In reply to K. Gadd (:kael) from comment #3)
> FYI, my laptop crashes a few times a day (sometimes more like 12 times a
> day) due to this bug. If I force-disable D2D 1.1 in about:config, though, it
> switches to Firefox becoming permanently unable to draw after a short while

Did you do it by removing D2D1.1 from the list of backends in the pref "gfx.content.azure.backends" ? This should get you back to D2D (1.0) which is pretty stable (modulo bad drivers but that doesn't seem to be your case).
I set use1_1 to false; I'll try changing the backends list instead. Thanks. If the blank window thing persists I'll file a bug.
See Also: → 1094349
According to about:crashes, these pre-crash stacks might be useful here:

I was playing TF2's Halloween 2014 event, and as usual the video driver(?) crashed. After killing TF2 i noticed Firefox was also not repainting and using 100% of one CPU core. When i for these stacks via Process Explorer, Firefox's CPU use had dropped to 0.38%:

ntdll.dll!NtRequestWaitReplyPort+0xa
wow64.dll!whNtRequestWaitReplyPort+0x2b5
wow64.dll!Wow64SystemServiceEx+0xd7
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x2d
wow64.dll!RunCpuSimulation+0xa
wow64.dll!Wow64LdrpInitialize+0x42a
ntdll.dll!LdrpInitializeProcess+0x17e3
ntdll.dll!??_C@_0BN@KLOBBEB@Enabling?5heap?5debug?5options?6?$AA@FNODOBFM@+0x28ff0
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!_ZwRequestWaitReplyPort@12+0x12
xul.dll!mozilla::PreciseRefreshDriverTimerWindowsDwmVsync::GetVBlankInfo+0x34
xul.dll!mozilla::PreciseRefreshDriverTimerWindowsDwmVsync::ScheduleNextTick+0x70
xul.dll!mozilla::RefreshDriverTimer::Tick+0x63
xul.dll!nsTimerImpl::Fire+0x156
xul.dll!nsTimerEvent::Run+0x37
xul.dll!nsThread::ProcessNextEvent+0x5b1
xul.dll!NS_ProcessNextEvent+0x2d
xul.dll!mozilla::ipc::MessagePump::Run+0x9b
xul.dll!MessageLoop::RunHandler+0x50
xul.dll!MessageLoop::Run+0x19
xul.dll!nsBaseAppShell::Run+0x2c
xul.dll!nsAppShell::Run+0x19
xul.dll!XREMain::XRE_mainRun+0x538
xul.dll!XREMain::XRE_main+0xf1
xul.dll!XRE_main+0x35
firefox.exe!do_main+0x27f
firefox.exe!NS_internal_main+0x11d
firefox.exe!wmain+0xf9
firefox.exe!__tmainCRTStartup+0x10b
kernel32.dll!@BaseThreadInitThunk@12+0xe
ntdll.dll!___RtlUserThreadStart@8+0x70
ntdll.dll!__RtlUserThreadStart@8+0x1b


wow64cpu.dll!CpupSyscallStub+0x9
wow64cpu.dll!RemoveIoCompletionFault+0x3d
wow64.dll!RunCpuSimulation+0xa
wow64.dll!Wow64LdrpInitialize+0x42a
ntdll.dll!??_C@_0BN@KLOBBEB@Enabling?5heap?5debug?5options?6?$AA@FNODOBFM@+0x29134
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!_NtRemoveIoCompletion@20+0x15
xul.dll!base::MessagePumpForIO::GetIOItem+0x32
xul.dll!base::MessagePumpForIO::WaitForIOCompletion+0x2d
xul.dll!base::MessagePumpForIO::WaitForWork+0x19
xul.dll!base::MessagePumpForIO::DoRunLoop+0x50
xul.dll!base::MessagePumpWin::RunWithDispatcher+0x3c
xul.dll!base::MessagePumpWin::Run+0xb
xul.dll!MessageLoop::RunHandler+0x50
xul.dll!MessageLoop::Run+0x19
xul.dll!base::Thread::ThreadMain+0xa4
xul.dll!`anonymous namespace'::ThreadFunc+0x9
kernel32.dll!@BaseThreadInitThunk@12+0xe
ntdll.dll!___RtlUserThreadStart@8+0x70
ntdll.dll!__RtlUserThreadStart@8+0x1b


wow64cpu.dll!CpupSyscallStub+0x9
wow64cpu.dll!WaitForMultipleObjects32+0x3b
wow64.dll!RunCpuSimulation+0xa
wow64.dll!Wow64LdrpInitialize+0x42a
ntdll.dll!LdrpInitializeProcess+0x17e3
ntdll.dll!??_C@_0BN@KLOBBEB@Enabling?5heap?5debug?5options?6?$AA@FNODOBFM@+0x28ff0
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!_ZwWaitForMultipleObjects@20+0x15
kernel32.dll!_WaitForMultipleObjectsExImplementation@20+0xe0
xul.dll!mozilla::widget::WinUtils::WaitForMessage+0x36
xul.dll!nsAppShell::ProcessNextNativeEvent+0x253
xul.dll!nsBaseAppShell::OnProcessNextEvent+0x1cf
xul.dll!nsThread::ProcessNextEvent+0x1ba
xul.dll!NS_ProcessNextEvent+0x2d
xul.dll!mozilla::ipc::MessagePump::Run+0x9b
xul.dll!MessageLoop::RunHandler+0x50
xul.dll!MessageLoop::Run+0x19
xul.dll!nsBaseAppShell::Run+0x2c
xul.dll!nsAppShell::Run+0x19
xul.dll!XREMain::XRE_mainRun+0x538
xul.dll!XREMain::XRE_main+0xf1
xul.dll!XRE_main+0x35
firefox.exe!do_main+0x27f
firefox.exe!NS_internal_main+0x11d
firefox.exe!wmain+0xf9
firefox.exe!__tmainCRTStartup+0x10b
kernel32.dll!@BaseThreadInitThunk@12+0xe
ntdll.dll!___RtlUserThreadStart@8+0x70
ntdll.dll!__RtlUserThreadStart@8+0x1b


Then suddenly a full CPU core hang, possibly triggered by my closing of the Nvidia Config panel:

gkmedias.dll!sse2_composite_add_8_8+0x98
gkmedias.dll!_moz_pixman_image_composite32+0x31d
gkmedias.dll!_composite_glyphs_via_mask+0x307
gkmedias.dll!_clip_and_composite+0x160
gkmedias.dll!_cairo_image_surface_glyphs+0x14f
gkmedias.dll!_cairo_surface_show_text_glyphs+0x1b6
gkmedias.dll!_cairo_gstate_show_text_glyphs+0x227
gkmedias.dll!_moz_cairo_show_glyphs+0x31
xul.dll!mozilla::gfx::DrawTargetCairo::FillGlyphs+0x12d
xul.dll!GlyphBufferAzure::Flush+0x101
xul.dll!gfxFont::DrawGlyphs+0x137
xul.dll!gfxFont::Draw+0x24d
xul.dll!gfxTextRun::Draw+0x253
xul.dll!nsFontMetrics::DrawString+0xc7
xul.dll!nsTextBoxFrame::DrawText+0x259
xul.dll!nsDisplayXULTextBox::Paint+0xc7
xul.dll!mozilla::FrameLayerBuilder::PaintItems+0x5d2
xul.dll!mozilla::FrameLayerBuilder::DrawPaintedLayer+0x4f3
xul.dll!mozilla::layers::ClientPaintedLayer::PaintThebes+0x1f9
xul.dll!mozilla::layers::ClientPaintedLayer::RenderLayerWithReadback+0x68
xul.dll!mozilla::layers::ClientContainerLayer::RenderLayer+0xab
xul.dll!mozilla::layers::ClientLayerManager::EndTransactionInternal+0x11f
xul.dll!mozilla::layers::ClientLayerManager::EndTransaction+0x2a
xul.dll!nsDisplayList::PaintForFrame+0x52d
xul.dll!nsLayoutUtils::PaintFrame+0x74e
xul.dll!nsWindow::GetTransparencyMode+0x1a
xul.dll!nsWindow::GetBounds+0x5e
xul.dll!nsIWidget::NeedsPaint+0x2e

Crash: https://crash-stats.mozilla.com/report/index/63e80d2b-446b-49a8-90a6-6c31c2141110
Blocks: 902952
Assignee: nobody → bas
As said before, something fixed this on Nightly 36 on 10/14, and due to D2D 1.1 now being disabled on Aurora 35, it's gone there as well. So let's close down this bug.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.