Bug 4674 - LEAK: WheelEventImpl leaked when mousewheel used
Summary: LEAK: WheelEventImpl leaked when mousewheel used
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-26 16:52 PDT by Kurt Kohler
Modified: 2006-02-15 16:16 PST (History)
0 users

See Also:


Attachments
Patch to add ref/deref (805 bytes, patch)
2005-08-26 16:54 PDT, Kurt Kohler
ggaren: review-
Details | Formatted Diff | Diff
refptr patch (1.31 KB, patch)
2006-02-15 15:33 PST, Geoffrey Garen
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Kohler 2005-08-26 16:52:22 PDT
A WheelEventImpl is leaked in NodeImpl::dispatchWheelEvent when a mouse wheel
event is being handled. The problem appears to be missing ref/deref's around the
call to dispatchEvent. I have a patch.
Comment 1 Kurt Kohler 2005-08-26 16:54:28 PDT
Created attachment 3590 [details]
Patch to add ref/deref

This patch makes the code consistent with other event dispatchers, it *may* be
correct.
Comment 2 Kurt Kohler 2005-08-26 17:10:42 PDT
I forgot to include the call stack that started the whole thing.

Leak: 0x0bde14d0  size=112
        0x019a4fa8 0x00000000 0x00000000 0x00000001     ..O.............
        0x00000001 0x00000000 0x00000000 0x00000000     ................
        0x00000000 0x0000003a 0x00000000 0x000000ae     .......:........
        0x00000000 0x41a17f6c 0xddc367a1 0x0a443030     ....A..l..g..D00
        0x00000000 0x000003ed 0x00000259 0x00000176     ...........Y...v
        0x00000230 0x00000371 0x00000230 0x00000371     ...0...q...0...q
        0x00000001 0x000000c0 0x000014cc 0x00000007     ................
        Call stack: [thread 26df]: |
        0x0 |
        0x57190 |
        0x26e0 |
        NSApplicationMain |
        -[NSApplication run] |
        0x1a684 |
        -[NSApplication sendEvent:] |
        0x1d69c |
        -[NSWindow sendEvent:] |
        -[WebHTMLView scrollWheel:] |
        -[WebCoreBridge sendScrollWheelEvent:] |
        KWQKHTMLPart::wheelEvent(NSEvent*) |
        KHTMLView::viewportWheelEvent(QWheelEvent*) |
        DOM::NodeImpl::dispatchWheelEvent(QWheelEvent*) |
        DOM::EventImpl::operator new(unsigned long) |
        khtml::main_thread_malloc(unsigned long) |
        malloc 
Comment 3 Oliver Hunt 2005-09-07 04:08:35 PDT
Do you have a testcase/site that triggers the leak?
Comment 4 Michael J. Cohen 2006-01-10 08:47:01 PST
simpy scrolling up and down seems to reproduce this for me.
Comment 5 Joost de Valk (AlthA) 2006-02-13 15:55:47 PST
Reassigning to webkit-unassigned, to make sure more people see this.
Comment 6 Joost de Valk (AlthA) 2006-02-15 14:41:57 PST
Comment on attachment 3590 [details]
Patch to add ref/deref

Though this is an old patch this might yet be valid.
Comment 7 Joost de Valk (AlthA) 2006-02-15 14:42:23 PST
Confirming.
Comment 8 Geoffrey Garen 2006-02-15 15:32:08 PST
Comment on attachment 3590 [details]
Patch to add ref/deref

Should use a refptr. I'll submit a patch shortly.
Comment 9 Geoffrey Garen 2006-02-15 15:33:58 PST
Created attachment 6514 [details]
refptr patch
Comment 10 Eric Seidel (no email) 2006-02-15 15:38:16 PST
Comment on attachment 6514 [details]
refptr patch

r=me.
Comment 11 Geoffrey Garen 2006-02-15 16:16:49 PST
Landed.