Bug 149736 - window that closes by document.onmousedown and right-clicking into that window causes crash
Summary: window that closes by document.onmousedown and right-clicking into that windo...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 132265 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-10 18:52 UTC by Florian Reinhard
Modified: 2008-02-15 17:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
html to reproduce the crash (376 bytes, text/html)
2007-09-10 18:54 UTC, Florian Reinhard
Details
html to reproduce the crash using a popup (1.12 KB, text/html)
2007-09-10 18:55 UTC, Florian Reinhard
Details
stacktrace from kde-crashmanager (5.05 KB, text/plain)
2007-09-10 19:01 UTC, Florian Reinhard
Details
stacktrace from kde-crashmanager (5.05 KB, text/plain)
2007-09-10 19:01 UTC, Florian Reinhard
Details
valgrind trace (for future reference) (3.18 KB, text/plain)
2007-10-04 12:35 UTC, David Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Reinhard 2007-09-10 18:52:57 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

<script type="text/javascript">
    function closeMe(){
        window.close();
    }
    document.onmousedown = closeMe;
</script>

These few lines of javascript make konqueror crash when trying to get a contextmenue in that window.
Comment 1 Florian Reinhard 2007-09-10 18:54:37 UTC
Created attachment 21595 [details]
html to reproduce the crash
Comment 2 Florian Reinhard 2007-09-10 18:55:45 UTC
Created attachment 21596 [details]
html to reproduce the crash using a popup
Comment 3 Florian Reinhard 2007-09-10 19:01:15 UTC
Created attachment 21597 [details]
stacktrace from kde-crashmanager
Comment 4 Florian Reinhard 2007-09-10 19:01:52 UTC
Created attachment 21598 [details]
stacktrace from kde-crashmanager
Comment 5 Tommi Tervo 2007-10-04 12:31:58 UTC
*** Bug 132265 has been marked as a duplicate of this bug. ***
Comment 6 David Faure 2007-10-04 12:35:10 UTC
I see, mainwindow gets deleted while popup is shown; khtml has crash-prevention for this but not konqueror.
Comment 7 David Faure 2007-10-04 12:35:42 UTC
Created attachment 21750 [details]
valgrind trace (for future reference)
Comment 8 David Faure 2007-10-04 13:07:14 UTC
SVN commit 721013 by dfaure:

Fix crash when the window is deleted from onmousedown, which takes effect inside the RMB popupmenu event loop.
BUG: 149736


 M  +15 -10    konq_mainwindow.cc  


WebSVN link: http://websvn.kde.org/?view=rev&revision=721013
Comment 9 David Faure 2008-02-15 17:00:21 UTC
Bug reappared in KDE-4.0.1 due to nested event loop in KDesktopFileActions. Fixed, and added unit test (KonqHtmlTest::rightClickClose) so that this bug doesn't re-appear again.