Bug 25213 - ASSERT during Inspector destruction
Summary: ASSERT during Inspector destruction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dimitri Glazkov (Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-15 11:20 PDT by Eric Seidel (no email)
Modified: 2009-05-11 10:01 PDT (History)
4 users (show)

See Also:


Attachments
full stack trace (31.98 KB, text/plain)
2009-04-15 11:21 PDT, Eric Seidel (no email)
no flags Details
Fix assert during Inspector destruction, v1. (1.36 KB, patch)
2009-05-11 09:47 PDT, Dimitri Glazkov (Google)
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-04-15 11:20:52 PDT
ASSERTION FAILED: !m_page || (m_page && !m_page->parentInspectorController())

I had opened:
http://www.carto.net/papers/svg/samples/canvas.shtml
brought up the inspector by clicking on the image of austria.
Then i right-clicked on the image of austria again, and selected "open in new window"
The window opened with just the image (not the SVG as I had expected!)
So I closed the window, and then right-clicked on the SVG again, and Safari crashed:

(/Users/eseidel/Projects/WebKit/WebCore/inspector/InspectorController.cpp:201 virtual 
0   com.apple.WebCore             	0x039266db WebCore::InspectorController::~InspectorController() + 343
1   com.apple.WebCore             	0x03a0a65d WTF::RefCounted<WebCore::InspectorController>::deref() + 53 (RefCounted.h:94)
2   com.apple.WebCore             	0x03a0a6a6 WTF::RefPtr<WebCore::InspectorController>::~RefPtr() + 34
3   com.apple.WebCore             	0x03a0a301 WebCore::JSInspectorController::~JSInspectorController() + 107
4   com.apple.JavaScriptCore      	0x00660c2b unsigned long JSC::Heap::sweep<(JSC::HeapType)0>() + 181 (Collector.cpp:901)
5   com.apple.JavaScriptCore      	0x005ce1e0 JSC::Heap::collect() + 676 (Collector.cpp:999)
6   com.apple.WebCore             	0x0384502f WebCore::GCController::gcTimerFired(WebCore::Timer<WebCore::GCController>*) + 43 (GCController.cpp:74)WebCore::InspectorController::~InspectorController())
Comment 1 Eric Seidel (no email) 2009-04-15 11:21:22 PDT
Created attachment 29505 [details]
full stack trace
Comment 2 Adam Roben (:aroben) 2009-04-28 09:17:10 PDT
Here's how I can reproduce this in Safari for Windows:

1. Open a tab and load a page
2. Inspect something
3. Close the tab while the Inspector is still open
Comment 3 Dimitri Glazkov (Google) 2009-04-28 15:31:17 PDT
Looking.
Comment 4 Dimitri Glazkov (Google) 2009-05-05 18:41:23 PDT
I can't repro on Mac :( Will try Win tomorrow.
Comment 5 Dimitri Glazkov (Google) 2009-05-05 18:41:43 PDT
BTW, if anyone has good repro steps for Mac, pls let me know.
Comment 6 Alexey Proskuryakov 2009-05-06 01:22:46 PDT
I've just reproduced this on Mac:
1. Open a new window, type about:blank in address bar, hit Enter.
2. Open Web Inspector.
3. Close the about:blank window.

Results in console:

file:///Users/ap/Safari/OpenSource/WebKitBuild/Debug/WebCore.framework/Resources/inspector/ScriptsPanel.js:388: JS ERROR: 
file:///Users/ap/Safari/OpenSource/WebKitBuild/Debug/WebCore.framework/Resources/inspector/ScriptsPanel.js:388: JS ERROR: 
file:///Users/ap/Safari/OpenSource/WebKitBuild/Debug/WebCore.framework/Resources/inspector/ElementsPanel.js:59: JS ERROR: 
file:///Users/ap/Safari/OpenSource/WebKitBuild/Debug/WebCore.framework/Resources/inspector/inspector.js:394: JS ERROR: ReferenceError: Can't find variable: InspectorController
ASSERTION FAILED: !m_page || (m_page && !m_page->parentInspectorController())
(/Users/ap/Safari/OpenSource/WebCore/inspector/InspectorController.cpp:202 virtual WebCore::InspectorController::~InspectorController())
Comment 7 Dimitri Glazkov (Google) 2009-05-11 09:47:40 PDT
Created attachment 30192 [details]
Fix assert during Inspector destruction, v1.

 WebCore/ChangeLog                         |   12 ++++++++++++
 WebCore/inspector/InspectorController.cpp |    8 +++++---
 2 files changed, 17 insertions(+), 3 deletions(-)
Comment 8 Dimitri Glazkov (Google) 2009-05-11 10:01:05 PDT
Landed as http://trac.webkit.org/changeset/43500.