Crash clicking offline icon in browser window

VERIFIED FIXED in M18

Status

()

Core
Networking
P1
critical
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: Ben Goodger (use ben at mozilla dot org for email), Assigned: gordon)

Tracking

({crash})

Trunk
PowerPC
All
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [rtm++])

Attachments

(2 attachments)

[Windows 2000]

I've added some UI that denote online/offline status, e.g. a menu item and a 
status bar indicator. Click the indicator to go offline if in online mode, then 
click again to go back online. you get an assert: "nsDNSService not shut down: 
'mMonitor == nsnull'"

Stack trace:

NTDLL! 77f9f9df()
nsDebug::Assertion(const char * 0x01ef10f8, const char * 0x01ef10e4, const char 
* 0x01ef10b0, int 869) line 242 + 13 bytes
nsDNSService::Init(nsDNSService * const 0x015bd940) line 869 + 35 bytes
nsIOService::SetOffline(nsIOService * const 0x015befd0, int 0) line 236 + 26 
bytes
XPTC_InvokeByIndex(nsISupports * 0x015befd0, unsigned int 8, unsigned int 1, 
nsXPTCVariant * 0x0012e00c) line 139
nsXPCWrappedNativeClass::CallWrappedMethod(JSContext * 0x015eae90, 
nsXPCWrappedNative * 0x036ffda0, const XPCNativeMemberDescriptor * 0x036ffe64, 
nsXPCWrappedNativeClass::CallMode CALL_SETTER, unsigned int 1, long * 
0x0012e88c, long * 0x00000000) line 914 + 43 bytes
nsXPCWrappedNativeClass::SetAttributeFromJSVal(JSContext * 0x015eae90, 
nsXPCWrappedNative * 0x036ffda0, const XPCNativeMemberDescriptor * 0x036ffe64, 
long * 0x0012e88c) line 901
WrappedNative_SetProperty(JSContext * 0x015eae90, JSObject * 0x03299fd0, long 
51883680, long * 0x0012e88c) line 287 + 24 bytes
js_Interpret(JSContext * 0x015eae90, long * 0x0012ea14) line 2354 + 1424 bytes
js_Invoke(JSContext * 0x015eae90, unsigned int 1, unsigned int 2) line 702 + 13 
bytes
js_InternalInvoke(JSContext * 0x015eae90, JSObject * 0x00f53788, long 53059496, 
unsigned int 0, unsigned int 1, long * 0x0012ebac, long * 0x0012eb4c) line 775 + 
19 bytes
JS_CallFunctionValue(JSContext * 0x015eae90, JSObject * 0x00f53788, long 
53059496, unsigned int 1, long * 0x0012ebac, long * 0x0012eb4c) line 2801 + 31 
bytes
nsJSContext::CallEventHandler(nsJSContext * const 0x015a0f80, void * 0x00f53788, 
void * 0x03299fa8, unsigned int 1, void * 0x0012ebac, int * 0x0012eba8, int 0) 
line 788 + 33 bytes
nsJSEventListener::HandleEvent(nsIDOMEvent * 0x03e8fb04) line 154 + 64 bytes
nsEventListenerManager::HandleEventSubType(nsListenerStruct * 0x0342bc50, 
nsIDOMEvent * 0x03e8fb04, nsIDOMEventTarget * 0x0342bdb0, unsigned int 4, 
unsigned int 2) line 754 + 19 bytes
nsEventListenerManager::HandleEvent(nsIPresContext * 0x02a86050, nsEvent * 
0x0012f468, nsIDOMEvent * * 0x0012f3e0, nsIDOMEventTarget * 0x0342bdb0, unsigned 
int 2, nsEventStatus * 0x0012f728) line 897 + 39 bytes
nsXULElement::HandleDOMEvent(nsXULElement * const 0x0342bda0, nsIPresContext * 
0x02a86050, nsEvent * 0x0012f468, nsIDOMEvent * * 0x0012f3e0, unsigned int 2, 
nsEventStatus * 0x0012f728) line 3418
nsXULElement::HandleDOMEvent(nsXULElement * const 0x036be230, nsIPresContext * 
0x02a86050, nsEvent * 0x0012f468, nsIDOMEvent * * 0x0012f3e0, unsigned int 1, 
nsEventStatus * 0x0012f728) line 3441 + 39 bytes
PresShell::HandleEventInternal(nsEvent * 0x0012f468, nsIView * 0x00000000, 
nsEventStatus * 0x0012f728) line 3601 + 45 bytes
PresShell::HandleEventWithTarget(PresShell * const 0x02a858e0, nsEvent * 
0x0012f468, nsIFrame * 0x00f09018, nsIContent * 0x036be230, nsEventStatus * 
0x0012f728) line 3582 + 18 bytes
nsEventStateManager::CheckForAndDispatchClick(nsEventStateManager * const 
0x036298c0, nsIPresContext * 0x02a86050, nsMouseEvent * 0x0012f838, 
nsEventStatus * 0x0012f728) line 1751 + 50 bytes
nsEventStateManager::PostHandleEvent(nsEventStateManager * const 0x036298c8, 
nsIPresContext * 0x02a86050, nsEvent * 0x0012f838, nsIFrame * 0x00f09018, 
nsEventStatus * 0x0012f728, nsIView * 0x02a81b70) line 860 + 28 bytes
PresShell::HandleEventInternal(nsEvent * 0x0012f838, nsIView * 0x02a81b70, 
nsEventStatus * 0x0012f728) line 3621 + 43 bytes
PresShell::HandleEvent(PresShell * const 0x02a858e4, nsIView * 0x02a81b70, 
nsGUIEvent * 0x0012f838, nsEventStatus * 0x0012f728, int & 1) line 3536 + 23 
bytes
nsView::HandleEvent(nsView * const 0x02a81b70, nsGUIEvent * 0x0012f838, unsigned 
int 28, nsEventStatus * 0x0012f728, int & 1) line 782
nsViewManager2::DispatchEvent(nsViewManager2 * const 0x02a82650, nsGUIEvent * 
0x0012f838, nsEventStatus * 0x0012f728) line 1369
HandleEvent(nsGUIEvent * 0x0012f838) line 69
nsWindow::DispatchEvent(nsWindow * const 0x02a82ef4, nsGUIEvent * 0x0012f838, 
nsEventStatus & nsEventStatus_eIgnore) line 560 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012f838) line 581
nsWindow::DispatchMouseEvent(unsigned int 301, nsPoint * 0x00000000) line 3673 + 
21 bytes
ChildWindow::DispatchMouseEvent(unsigned int 301, nsPoint * 0x00000000) line 
3880
nsWindow::ProcessMessage(unsigned int 514, unsigned int 0, long 73924902, long * 
0x0012fb9c) line 2785 + 24 bytes
nsWindow::WindowProc(HWND__ * 0x002b02f0, unsigned int 514, unsigned int 0, long 
73924902) line 829 + 27 bytes
USER32! 77e13eb0()
USER32! 77e1401a()
USER32! 77e192da()
nsAppShellService::Run(nsAppShellService * const 0x015b0ef0) line 387
main1(int 1, char * * 0x00b24d20, nsISupports * 0x00000000) line 906 + 32 bytes
main(int 1, char * * 0x00b24d20) line 1092 + 37 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e87903()

Comment 1

18 years ago
->gordon
Assignee: gagan → gordon
(Assignee)

Comment 2

18 years ago
*** Bug 41580 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 3

18 years ago
Simon Fraser reports in bug 41580:

If I click on the offline icon (mozilla, to the left of the progress bar), the 
first time I hit an assertion that the DNS service was not shut down. The second 
time (offline -> online) I crash in necko.

Updated

18 years ago
Summary: setting nsIIOService::offline to true causes asserts → setting nsIIOService::offline to true causes asserts, and to false causes crashes
(Assignee)

Comment 4

18 years ago
nominating for nsbeta2.
Whiteboard: [nsbeta]

Comment 5

18 years ago
Adding crash to keyword field.
Keywords: crash

Comment 6

18 years ago
Putting nsbeta2 nomination in correct field.
Keywords: nsbeta2
Whiteboard: [nsbeta]

Comment 7

18 years ago
Putting on [nsbeta2+] radar for beta2 fix. 
Whiteboard: [nsbeta2+]

Updated

18 years ago
Target Milestone: --- → M17

Comment 8

18 years ago
*** Bug 44289 has been marked as a duplicate of this bug. ***

Comment 9

18 years ago
Assigning to gagan per PDT review today.
Assignee: gordon → gagan

Comment 10

18 years ago
fix checked in.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Updated

18 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 11

18 years ago
Hey gagan, unfortunately your checkin causes linux to crash on exit trying to
destroy this monitor. It turned the linux builds orange on tinderbox. We weren't
able to get a hold of you so we had to back this change out.

I'll re-open the bug so you know to look at it in the morning. Sorry 'bout that.

Comment 12

18 years ago
heh. I didn't see the crash on exit, becuz I crashed much earliar then exit 
(diff. bug though) Geez people! :)
Status: REOPENED → ASSIGNED

Comment 13

18 years ago
fixed in on friday. 
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED

Comment 14

18 years ago
verified:
WinNT 2000072108
Linux 2000072020
Mac os8.6 2000072108
Status: RESOLVED → VERIFIED

Comment 15

18 years ago
I'm seeing this again, Mozilla M18 2000101011, Mac OS 9.0.4 -

1) Click icon to go offline
2) Click icon to go back online
3) Visit some website

Crashes the browser. Every time. You should be able to go offline and then back
online without any problem. Stack trace to follow. Needs
whiteboard/keyword/target update.
Severity: normal → critical
Status: VERIFIED → REOPENED
OS: Windows NT → Mac System 9.0
Priority: P3 → P1
Hardware: PC → Macintosh
Resolution: FIXED → ---

Comment 16

18 years ago
Created attachment 16741 [details]
Stack trace of Mac crash

Comment 17

18 years ago
Note that the stack trace is almost identical to Asa's from bug 44289. Regression?

Comment 18

18 years ago
Bug for gordon.
Assignee: gagan → gordon
Status: REOPENED → NEW
Keywords: rtm
Whiteboard: [nsbeta2+]

Comment 19

18 years ago
*** Bug 56047 has been marked as a duplicate of this bug. ***

Comment 20

18 years ago
Change summary to make it obvious that this is a crash the user can easily run 
into (2 clicks in the browser window). Move to M18.
Summary: setting nsIIOService::offline to true causes asserts, and to false causes crashes → Crash clicking offline icon in browser window
Target Milestone: M17 → M18

Comment 21

18 years ago
this seems like a bad regression. Gordon can you investigate?
Whiteboard: [rtm need info]

Comment 22

18 years ago
Got the same stack trace from MacsBug under Mac OS 9.0.4, Moz build 2000100720-M18.

FYI, I think there's a new version of DNS lookup out for Mac, running over to
http://www.macfixit.com/ to check.

 Stack trace follows here.

(CurStackBase does not seem to apply...dumping 4K.)
  Calling chain using A6/R1 links
  Back chain  ISA  Caller
  09ACB600    PPC  097F12D8  PRP_TryLock+00994
  09ACB590    PPC  09702CF0  nsThread::Main(void*)+00028
  09ACB540    PPC  093AB988  nsSocketTransportService::Run()+0019C
  09ACB4D0    PPC  093AB188  nsSocketTransportService::ProcessWorkQ()+00074
  09ACB480    PPC  093A68EC  nsSocketTransport::Process(short)+004D8
  09ACB410    PPC  093A6BEC  nsSocketTransport::doResolveHost()+00150
  09ACB390    PPC  093B9CE0  nsDNSService::Lookup(const char*, nsIDNSListener*,
nsISupports*,
 nsIRequest**)+0017C
  09ACB310    PPC  093B8870  nsDNSLookup::HandleRequest(nsDNSRequest*)+00034
  09ACB2D0    PPC  093B9098  nsDNSLookup::Resume(nsDNSRequest*)+00160
  09ACB250    PPC  093B8B30  nsDNSLookup::InitiateLookup()+00264
 Return addresses on the stack
  Stack Addr  Frame Addr   ISA   Caller
   09ACB598                PPC   097F12D8 PRP_TryLock+00994
   09ACB548    09ACB540    PPC   09702CF0 nsThread::Main(void*)+00028
   09ACB518    09ACB510    PPC   097F0D08 PRP_TryLock+003C4
   09ACB508                68K   09703806 nsThread::RegisterThreadSelf()+00052
   09ACB4D8    09ACB4D0    PPC   093AB988 nsSocketTransportService::Run()+0019C
   09ACB498                68K   097DC14E PR_IntervalNow+00026
   09ACB488    09ACB480    PPC   093AB188
nsSocketTransportService::ProcessWorkQ()+00074
   09ACB428    09ACB420    PPC   097F69BC PR_LocalTimeParameters+0019C
   09ACB418    09ACB410    PPC   093A68EC nsSocketTransport::Process(short)+004D8
   09ACB3D8    09ACB3D0    PPC   097EE934 PR_EnterMonitor+00048
   09ACB398    09ACB390    PPC   093A6BEC nsSocketTransport::doResolveHost()+00150
   09ACB35C                68K   0985AB9A
   09ACB358    09ACB350    PPC   097EEA30 PR_ExitMonitor+00054
   09ACB328    09ACB320    PPC   093AA8D8 nsSocketTransport::fireStatus(unsigned
int)+00124
   09ACB318    09ACB310    PPC   093B9CE0 nsDNSService::Lookup(const char*,
nsIDNSListener*,
nsISupports*, nsIRequest**)+0017C
   09ACB2D8    09ACB2D0    PPC   093B8870
nsDNSLookup::HandleRequest(nsDNSRequest*)+00034
   09ACB298    09ACB290    PPC   0A888864 operator new(unsigned long, const
std::nothrow_t&)+
0000C
   09ACB288    09ACB280    PPC   096EAC78 nsString::AppendWithConversion(const
char*, int)+00
078
   09ACB258    09ACB250    PPC   093B9098 nsDNSLookup::Resume(nsDNSRequest*)+00160
   09ACB228    09ACB220    PPC   097EEA30 PR_ExitMonitor+00054
   09ACB218    09ACB210    PPC   096B9CB4
nsSupportsArray::AppendElement(nsISupports*)+00018
   09ACB208    09ACB200    PPC   097EAAEC PR_CExitMonitor+00078
   09ACB1E8    09ACB1E0    PPC   093B8B30 nsDNSLookup::InitiateLookup()+00264
   09ACB1D8    09ACB1D0    PPC   097EE934 PR_EnterMonitor+00048
   09ACB1C8    09ACB1C0    PPC   097EEA30 PR_ExitMonitor+00054

Comment 23

18 years ago
*whoops*

Macfixit says it's "URL access" v2.1, and initial reports say to stick with v2.0.

Oh, well.
(Assignee)

Comment 24

18 years ago
Created attachment 16933 [details] [diff] [review]
Proposed patch to fix crash.  I can now click the button repeatedly, and still browse after coming back online.
(Assignee)

Comment 25

18 years ago
Gaga, can you review this?  Simon, can you super-review this?  Thanks.
Whiteboard: [rtm need info] → [rtm]

Comment 26

18 years ago
r=gagan
Whiteboard: [rtm] → [rtm+]

Comment 27

18 years ago
Fix looks good, sr=sfraser

Comment 28

18 years ago
Marking rtm-double-plus.  Please land on branch asap.
OS: All
Whiteboard: [rtm+] → [rtm++]
(Assignee)

Comment 29

18 years ago
The fix has been landed on the Netscape_20000922_BRANCH and the trunk.
Status: NEW → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED

Comment 30

18 years ago
verified on the branch:
Mac os9 101608
WinNT 101608
Linux rh6 101609

needs verified on trunk
Keywords: vtrunk

Updated

18 years ago
Status: RESOLVED → VERIFIED
Keywords: vtrunk

Comment 31

18 years ago
Verified Fixed with trunk builds
linux 101708 on RedHat 6.2
win32 101704 on NT 4
mac 101704 on Mac OS9
Setting bug to Verified and removing the vtrunk keyword.
You need to log in before you can comment on or make changes to this bug.