Closed Bug 562253 Opened 15 years ago Closed 15 years ago

Taskbar tab preview code crashes in mozilla::widget::TaskbarTabPreview::GlobalWndProc(HWND__*, unsigned int, unsigned int, long)

Categories

(Core :: Widget: Win32, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: robarnold, Assigned: robarnold)

References

Details

(Keywords: qawanted, Whiteboard: [sg:moderate] (critical if tab preview turned on by default?))

Attachments

(2 files)

Seems to have cropped up after the fix in bug 557557.
Blocks: 474056
The current theory is that after we destroy the taskbar preview, there are still messages waiting in the queue. If we clear the pointer on the window, we'll get NULL back from ::GetPropW so it should just fall to ::DefWindowProcW. Since no one has STR or a recorded VM session, we'll have to watch crash stats to verify this fix.
Assignee: nobody → tellrob
Status: NEW → ASSIGNED
Attachment #443047 - Flags: review?(jmathies)
Attachment #443047 - Flags: review?(jmathies) → review+
Do you think this is the same crash? mozcrt19.dll!_purecall() Line 54 C > xul.dll!mozilla::widget::TaskbarPreview::WndProc(unsigned int nMsg=28, unsigned int wParam=1, long lParam=0) Line 290 + 0x7 bytes C++ xul.dll!mozilla::widget::TaskbarTabPreview::GlobalWndProc(HWND__ * hWnd=0x003403ee, unsigned int nMsg=28, unsigned int wParam=1, long lParam=0) Line 227 + 0x11 bytes C++ user32.dll!_InternalCallWinProc@20() + 0x23 bytes
Group: core-security
Comment on attachment 443047 [details] [diff] [review] Clear the taskbar preview pointer on destruction This issue does not affect 1.9.2 so long as taskbar previews are disabled (which they are by default). Still, it would be good to have this on 1.9.2 should we eventually decide to enable it (plus it reduces the crashiness for those brave souls who do have it on).
Attachment #443047 - Flags: approval1.9.2.5?
Comment on attachment 443047 [details] [diff] [review] Clear the taskbar preview pointer on destruction Ok, this doesn't seem to have fixed the crash since there are reports from today's nightlies. New theory: we are not always destroying the window when the taskbar preview dies.
Attachment #443047 - Flags: approval1.9.2.5?
Whiteboard: [sg:moderate] (critical if tab preview turned on by default?)
Since I can't reproduce this bug, I'm still guessing at causes and hence fixes. Let's try this theory instead: when the nsWindow dies before the TaskbarTabPreview does, we set mWnd to null. Some time later, the code to disable the preview is run and SetVisible(PR_FALSE) is invoked. Seeing that mWnd is null and knowing that it's thus not safe to call TaskbarPreview::Disable or Enable, SetVisible returns without error since the calling code assuredly is not equipped to deal with the resulting exception. Some time later, the GC kicks in and decides to free the TaskbarTabPreview and does so. The proxy window is never destroyed however so a dangling reference is left hidden inside the native properties of the HWND. Some time later, a message is sent to the window, such as a request for a thumbnail or a close message. GlobalWndProc looks up the dangling ptr and attempts to invoke the virtual method assuming a valid vtable. How's that sound for a cause? Would be nice to have reliable STR so I could check this without waiting for crash reports.
Attachment #443804 - Flags: review?
Attachment #443804 - Attachment is patch: true
Attachment #443804 - Attachment mime type: application/octet-stream → text/plain
Attachment #443804 - Flags: review? → review?(jmathies)
Keywords: qawanted
Attachment #443804 - Flags: review?(jmathies) → review+
Pushed to mozilla-central: http://hg.mozilla.org/mozilla-central/rev/f666d281adf3 Going to wait to see how the crash reports look before closing. This is also responsible for some of the "empty signature" crash reports.
Group: core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: