Closed Bug 103036 Opened 23 years ago Closed 23 years ago

classic: crash when trying to open Preferences dialog

Categories

(SeaMonkey :: Preferences, defect)

PowerPC
Mac System 9.x
defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: hewitt)

References

Details

(4 keywords, Whiteboard: trunk-only)

Attachments

(3 files, 1 obsolete file)

found this while testing bug 102858, using 2001.10.03.08-trunk comm bits on Mac OS 9.x. this only occurs on Mac [don't have a trunk 10.x build from today, tho'], and only with the classic theme. also occurred with both a new and existing profile. 1. launch profile that's using classic theme. 2. select Edit > Preferences. result: crash. i'll dig up the talkback data soon. not sure if this would be considered a dup of 102858, but lemme know if it is. tracy et al., have you encountered this? btw, disable_xul_cache is the default value: false.
the talkback data are useless --all "unknown program exit" and empty traces. let me try macsbug...
dup of bug 102858?
hrm, i'm having problems getting trace info from macsbug --whatever logfiles i try to create aren't being saved at the moment. could anyone with a debug build get more info on this, please? but here's a really wacky observation: if i open the mail or addressbook window *first* then try to open Preferences, i don't encounter a crash and the dialog does appear. [i tried this method with a composer window, but still got the crash.]
as i mentioned earlier, i'm not sure if this is the same as bug 102858 [different platform, theme issue]. however, if folx here are sure that it is, go ahead and dup it. :)
This one is crashing with a CHK Exception at _PBReadImmed, and hoses the machine.
marking this a smoketest blocker: if the machine is running 9.x [ie, *not* classic emulation mode on os 10.x], i'm forced to reboot the box. ouch.
Keywords: smoketest
i believe this is trunk-only --this isn't a problem with 2001.10.03.03-branch comm bits. curious to see if this is also problem with mac os x bits...but will need to wait till tomorrow for a more recent verif trunk build.
not a problem using 2001.10.03.04-branch comm bits on mac os 10.0.4. will check os x trunk bits tomorrow.
Whiteboard: trunk-only
I see this on Mac OS X as well. It just seg faults, no console output, and no Crash Report.
in Macsbug, I'm landing in CodeWarrior. :-/
Just tested on my mac, and I am crashing using the Modern theme too. These problems are probably derived from my <dialog/> changes. I migrated the prefs dialog from using the old dialogOverlay.css to the new dialog tag. Everything works fine on Win and Linux, and I am at a loss for why it crashes on Mac. I also converted the Find dialog and File Bookmark dialog, which don't crash, but seem to be not working right on Mac. Again, all is well on Win and Linux. Could this have something to do with the fact that the root element of these dialogs is no longer <window/>, but <dialog/> ? Hyatt and I scoured the tree for dependencies on the window tag as the root element, and found only one (which I fixed). Maybe there is something we missed that is Mac specific?
Joe, try applying aaronl's patch to delay the advanceFocus call until onload.
joe: are you crashing w/modern using a debug or verification build? i haven't [yet] seen a crash on modern when just opening the Prefs dialog, but i'm just using verif bits... however, kathy recently aim'd me saying that she's crashing w/modern --perhaps that scenario is limited to debug bits [so far]? aaronl's patch is in/for bug 58853, iirc.
ducarroz and I are testing our aarol's patch (http://bugzilla.mozilla.org/showattachment.cgi?attach_id=51940) on the mac now.
aarol's patch fixes this crasher (debug, mac 0S 9.2, classic)
So can anyone say exactly where it crashed, and why?
Based on the crash report from Sairuh, I confirmed by stepping in the debbugger that we were recursively calling "FocusAvailable" so we were blowing out the stack.
assuming this fix has been tested on other OS, r=brade
I think we need to add some recursion protection there then; it should not be the case that bad XBL or XUL can cause a crash like this, and aaron's fix is XBL only, right?
Patch, anyone?
I don't understand how the last line of nsDocShell::FocusAvailable() is ever supposed not to recurse indefinately. cc Adam Lock, who I hope can clarify.
*** Bug 102858 has been marked as a duplicate of this bug. ***
Spam other focus/docShell folks.
The only way I can see it going crazy like this is if the docshell has no parent and no children to switch focus to so that the code keeps dropping through to that last line recursively. Is it possible that preference panes might somehow trigger this kind of state in a docshell? CC'ing bryner for ideas
Adam: how can that FocusAvailable() call at the end of nsDocShell::FocusAvailable() ever do anything different than when it was called the first time? How is it not the kiss of recursion death if that line is ever hit?
Well, my upcoming patches will be removing FocusAvailable() entirely, so I'm at least confident that we won't see this exact stack in a crash report :) Seriously though, I'm not seeing this in my tree where I have all of my tabbing changes, but that's on Linux. I'll try to get someone to test on Mac.
The answer is I have no idea :) I think this is Travis code if that offers some kind of explanation.
Perhaps a simple fix is to replace that line with NS_OK and see what happens. I can't reproduce the problem so can someone try that and report back?
Joe, a quick question about your dialog changes. Does your dialog class implement ensure the docshell has a docshelltree owner and that it also implements the nsIBaseWindow interface. If not then it's possible this is what is causing the docshell to think it has no parent.
Returning NS_OK works fine; it's only ever hit in this pathalogical case of prefs dialog with classic skin and XBL badness.
Bug 70750 contains Joe's dialog changes. I notice a small problem in the checkin, in that the "window" style is listed twice in the Mac's global.css file when it should be "window" & "wizard" as it is in the Win32 global.css. That couldn't be the cause of the problem could it? http://lxr.mozilla.org/seamonkey/source/themes/classic/global/mac/global.css#103 http://lxr.mozilla.org/seamonkey/source/themes/classic/global/win/global.css#113
FocusAvailable() is recursing because: i) FocusNextChild(aCurrentFocus) refuses to take focus because the tree item type is chrome, not content. ii) nextCallWin->FocusAvailable() calls nsXULWindow, which doesn't take focus. iii) FocusNextChild(child) refuses to take focus because the tree item type is chrome, not content. so it just recurses.
I should add that child->SetFocus() fails because the child has no pres shell yet.
Behaviour is probably being triggered in the first place by some focus setting code in the dialog constructor in dialog.xml http://lxr.mozilla.org/seamonkey/source/xpfe/global/resources/content/bindings/dialog.xml#70
Attached patch Stopgap patch (obsolete) — Splinter Review
Comment on attachment 52130 [details] [diff] [review] Stopgap patch Better patch coming
Attachment #52130 - Attachment is obsolete: true
2nd patch looks good, r=adamlock I think there is a wider issue with setting focus from the dialog constructor to be resolved and the window,window bug in the Mac's global.css.
Aaronl's dialog.xml patch should also land with this. I give sr on both patches.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
this has been working fine, most recently on mac 2001-25-25-04-trunk
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: