Closed
Bug 212415
Opened 22 years ago
Closed 22 years ago
crash when closing a window opened by java script [@ GlobalWindowImpl::RunTimeout ]
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: chri.koch, Assigned: keeda)
Details
(Keywords: crash, testcase)
Crash Data
Attachments
(2 files, 1 obsolete file)
|
542 bytes,
text/html
|
Details | |
|
6.15 KB,
patch
|
peterv
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030624
When typing more than 10 characters in the textfield two windows pop up. When
you close them mozilla crashes.
The testcase I created is from a german site (sms.de) for sending short messages
(GSM). I extracted the important java script functions from their site and
changed some values, but the behaviour is the same!
Reproducible: Always
Steps to Reproduce:
1. type > 10 characters in the textfield
2. two windows will open
3. close them
Actual Results:
mozilla crashes, it's not freezing, the whole program simply terminates. (ps -A
doesn't show any mozilla prozesses)
Expected Results:
not crash ;-)
| Reporter | ||
Comment 1•22 years ago
|
||
| Reporter | ||
Comment 3•22 years ago
|
||
I just tried this with the last nightly (Mozilla/5.0 (X11; U; Linux i686; de-AT;
rv:1.5a) Gecko/20030711). I still have the same problem, and as bug 173308 is
fixed, this might be another problem.
Comment 4•22 years ago
|
||
confirming crash using a debug build 20030701 on Linux:
JavaScript error:
line 0: uncaught exception: [Exception... "Component returned failure code:
0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMTreeWalker.nextNode]" nsresult:
"0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome:
//global/content/bindings/button.xml :: fireAccessKeyButton :: line 94" data:
no]
WARNING: nsTimeoutImpl::Release() proceeding without context., file
nsGlobalWindow.cpp, line 5202
WEBSHELL- = 7
WARNING: nsTimeoutImpl::Release() proceeding without context., file
nsGlobalWindow.cpp, line 5202
WEBSHELL- = 6
###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().:
'mRawPtr != 0', file ../../../dist/include/xpcom/nsCOMPtr.h, line 668
Break: at file ../../../dist/include/xpcom/nsCOMPtr.h, line 668
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2332)]
0x421b595a in GlobalWindowImpl::RunTimeout(nsTimeoutImpl*) (this=0x8e36e20,
aTimeout=0x8eff070) at nsGlobalWindow.cpp:5100
5100 rv = timeout->mTimer->InitWithFuncCallback(TimerCallback, timeout,
(gdb) bt
#0 0x421b595a in GlobalWindowImpl::RunTimeout(nsTimeoutImpl*) (
this=0x8e36e20, aTimeout=0x8eff070) at nsGlobalWindow.cpp:5100
#1 0x421b6407 in GlobalWindowImpl::TimerCallback(nsITimer*, void*) (
aTimer=0x8fe0410, aClosure=0x8eff070) at nsGlobalWindow.cpp:5391
#2 0x407fd27c in nsTimerImpl::Fire() (this=0x8fe0410) at nsTimerImpl.cpp:382
#3 0x407fd462 in handleTimerEvent(TimerEventType*) (event=0x42e081f8)
at nsTimerImpl.cpp:447
#4 0x407f39b0 in PL_HandleEvent (self=0x42e081f8) at plevent.c:671
#5 0x407f3851 in PL_ProcessPendingEvents (self=0x811e460) at plevent.c:606
#6 0x407f5d86 in nsEventQueueImpl::ProcessPendingEvents() (this=0x811e4d8)
at nsEventQueue.cpp:387
#7 0x41cc6410 in event_processor_callback (data=0x811e4d8, source=6,
condition=GDK_INPUT_READ) at nsAppShell.cpp:188
#8 0x41cc5d9d in our_gdk_io_invoke (source=0x818ec88, condition=G_IO_IN,
data=0x815e4d8) at nsAppShell.cpp:72
#9 0x4030c7d6 in g_io_channel_unix_get_fd () from /usr/lib/libglib-1.2.so.0
#10 0x4030f3ee in g_idle_remove_by_data () from /usr/lib/libglib-1.2.so.0
#11 0x4030f199 in g_idle_remove_by_data () from /usr/lib/libglib-1.2.so.0
#12 0x4030e174 in g_main_run () from /usr/lib/libglib-1.2.so.0
Keywords: testcase
Summary: crash when closing a window opened by java script → crash when closing a window opened by java script [@ GlobalWindowImpl::RunTimeout ]
Comment 5•22 years ago
|
||
Reassigning to DOM Events for further triage; doesn't look
like a JS Engine issue -
Assignee: rogerl → saari
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Events
Ever confirmed: true
QA Contact: pschwartau → desale
Comment 6•22 years ago
|
||
crash on Win98, Talkback TB21819253H, so changing OS to ALL
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030711
OS: Linux → All
Comment 7•22 years ago
|
||
type anything in the textarea.
get 2 alert dialogs: "foo" and "bar".
after closing both, Mozilla crashes.
Attachment #127533 -
Attachment is obsolete: true
| Assignee | ||
Comment 8•22 years ago
|
||
This is somewhat similar to what was happening in bug 178810. As far as I can
see, we can end up doing extra releases on timeout objects when some timeout is
cleared from a inside a "nested" timeout.
Component: DOM Events → DOM Level 0
| Assignee | ||
Comment 9•22 years ago
|
||
I'm not even sure this fixes everything, I get a headache trying to work out
all the possibilites with "nested" timers :-)
... and I dont know how long we can just keep adding flags.
| Assignee | ||
Comment 10•22 years ago
|
||
Comment on attachment 127876 [details] [diff] [review]
This makes us not crash on the two testcases above
jst, what do you think about this fix ?
Attachment #127876 -
Flags: review?(jst)
| Assignee | ||
Comment 11•22 years ago
|
||
Ummmm ... I thought I did this already. Sorry for the spam.
Assignee: saari → keeda
Comment 12•22 years ago
|
||
Comment on attachment 127876 [details] [diff] [review]
This makes us not crash on the two testcases above
I get a headache every thime I look at this code too, but this makes a lot of
sense to me, I think this is the right thing to do. I can't see how the old
code would've done the right thing in the nested timer cases if timeouts were
cleared.
sr=jst
Attachment #127876 -
Flags: superreview+
Attachment #127876 -
Flags: review?(peterv_dom)
Attachment #127876 -
Flags: review?(jst)
Updated•22 years ago
|
Attachment #127876 -
Flags: review?(peterv_dom) → review?(peter)
Updated•22 years ago
|
Attachment #127876 -
Flags: review?(peter) → review+
| Assignee | ||
Comment 13•22 years ago
|
||
Checked in.
Crashes should be fixed. We still sometimes throw "extra" popups on these
testcases, but that is just the old bug about modal-dialogs not blocking all js.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Crash Signature: [@ GlobalWindowImpl::RunTimeout ]
You need to log in
before you can comment on or make changes to this bug.
Description
•