DOM Inspector freezes when opened and text is entered before it is finished loading.

RESOLVED WORKSFORME

Status

Other Applications
DOM Inspector
--
critical
RESOLVED WORKSFORME
15 years ago
10 years ago

People

(Reporter: Cecelia S, Unassigned)

Tracking

({hang})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030708
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030708

I use AIM and the shortcut for italicized text is COMMAND+SHIFT+I which is also
the shortcut for DOM Inspector. So, I'm typing and want italicized text. If I
accidentally press COMMAND+SHIFT+I instead of COMMAND+I, I will open the DOM
Inspector and by the time I realize this, I will have entered a few letters
(causing Mozilla to freeze).

Reproducible: Always

Steps to Reproduce:
1.Open DOM Inspector (COMMAND+SHIFT+I).
2.Type letters before it loads (before window is visible.
Actual Results:  
Mozilla locks up

Expected Results:  
Mozilla should have made warning tones, ignored the input, or delayed the input
until the DOM Inspector was ready.

I have lost a couple of emails when this happens. Not to mention sites and
histories I had loaded.
Confirmed.  I didn't see this the first time I tried it, but I sure saw it the
second.  Seemed Mozilla was busy trying to do something, but I don't know what.
 I let it sit for a good two minutes before killing it.

Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030711
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: hang
OS: MacOS X → All
Hardware: Macintosh → All
Mass re-assigning bugs to dom.inspector@extensions.bugs
Assignee: caillon → dom.inspector
(Reporter)

Comment 3

14 years ago
Update: This bug is still in action as of 1.6 Final (and presumably 1.7a).

Comment 4

14 years ago
Created attachment 140923 [details]
stacktrace

stacktrace with linux CVS/debug 20040208
Mozilla never makes it out of frame 11 (nsTypeAheadFind::FindItNow).

Debug build continuously prints:
###!!! ASSERTION: No first node!: 'mFirst', file nsContentIterator.cpp, line
961

Comment 5

14 years ago
Created attachment 140967 [details]
stacktrace for assertion

this is the stack for the assertion:
###!!! ASSERTION: No first node!: 'mFirst', file nsContentIterator.cpp, line
961

Comment 6

14 years ago
ok, here are some thoughts, sort of in order
A. nsFind::InitIterator ignores Init failure
163 nsresult
164 nsFind::InitIterator(nsIDOMRange* aSearchRange)
200   mIterator->Init(aSearchRange);
^^^^^^^^ should pass back failure
201   if (mFindBackward) {
202     mIterator->Last();
203   }
204   else {
205     mIterator->First();
206   }
207   return NS_OK;

B. nsContentIterator::Init ignores RebuildIndexStack failure
 354 jst      1.61 nsresult
 355               nsContentIterator::Init(nsIContent* aRoot)
 375 kin      1.53   RebuildIndexStack();
 376 jfrancis 1.3    return NS_OK;

C. I'm not sure that RebuildIndexStack should return ok in all the places it does.

ajs: can you find out if the functions i'm accusing really reach the places i
think they do? :)

Comment 7

14 years ago
200   mIterator->Init(aSearchRange);

Init() succeeds!

355               nsContentIterator::Init(nsIContent* aRoot)
wrong Init()
nsContentIterator::Init(nsIDOMRange* aRange)

call to RebuildIndexStack() on line 566 succeeds

RebuildIndexStack() returns NS_OK from the end of the function (601)

Comment 8

14 years ago
Ok, we need to call IsDone()

how about:
mozilla/embedding/components/find/src/nsFind.cpp
 164 nsFind::InitIterator(nsIDOMRange* aSearchRange)
 ...
 200   mIterator->Init(aSearchRange);
+      if (mIterator->IsDone()) return NS_ERROR_NOT_AVAILABLE;
 201   if (mFindBackward) {


 277 nsFind::NextNode(nsIDOMRange* aSearchRange,
 278                  nsIDOMRange* aStartPoint, nsIDOMRange* aEndPoint,
 279                  PRBool aContinueOk)
 ...
-379   while (1)
+379   while (!mIterator->IsDone())

Product: Core → Other Applications
Assignee: dom-inspector → nobody
QA Contact: timeless → dom-inspector
(Reporter)

Comment 9

10 years ago
I just tried to trigger this bug, but was unsuccessful. I'm going to resolve the bug if nobody else can reproduce it.
WORKSFORME per comment 9
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.