Closed
Bug 181158
Opened 22 years ago
Closed 19 years ago
crash when trying to access context menu [@ -[BrowserWindowController getContextMenu]]
Categories
(Camino Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino0.9
People
(Reporter: kaldari, Assigned: sfraser_bugs)
References
()
Details
(Keywords: crash, fixed1.8)
Crash Data
Attachments
(5 files)
Haven't been able to reproduce this one yet, but I got a crash on the following page: http://www.jigzone.com/ms/z.php?q=im when control-clicking on the jigsaw puzzle to pull up the context menu using Chimera 2002111704 in 10.2.2. Will attach stack trace.
When control-clicking on the jigsaw puzzle, 1 of 4 things will happen: 1. Nothing at all. 2. I get an HTML page context menu. 3. I get a frame context menu. 4. Chimera crashes. The behavior seems rather random. Perhaps it is a race condition or a caching issue.
WorksForMe using Chimera/2002111204. I loaded the URL ten times and contextually clicked on the puzzle. I encountered conditions 1 and 2 once each, and condition 3 the remaining times. kaldari@onyxsys.net, what percentage of the time do you experience condition 4?
Actually, I've only gotten it to crash once, so may last post was a bit misleading.
Assignee | ||
Comment 5•22 years ago
|
||
I think this is fixed by plugin context menu fixes.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Crashed at -[BrowserWindowController getContextMenu] using 2004050308 (v0.8b) while testing attachment 103143 [details] in relation to bug 185714. Stack is not identical, though. Same issue?
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Assignee: saari → pinkerton
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: winnie
In fact, I was testing a *variant* of that attachment to check Camino’s context menu behavior on images embedded using IMG, EMBED and OBJECT. This is the precise HTML file I was using. I had reloaded and force-reloaded it several times, and had just closed the tab I was viewing it in, then loaded it in yet another tab and was testing again (right-clicking on the images, that is).
Updated•20 years ago
|
Target Milestone: --- → Camino0.8
Comment 9•20 years ago
|
||
so what are the steps to repro? i can't.
Comment 10•20 years ago
|
||
Not sure yet. Sure wish we had TalkBack... ;)
Comment 11•20 years ago
|
||
(See also bug 242906, follow-on to bug 185714.)
Comment 12•20 years ago
|
||
Tried reproducing this for about 10 minutes and couldn't. Until we can repro or get some evidence that this is a more widespread problem, marking it 0.9. I can't access talkback to see how common the crash is, but I don't hear about it much.
Target Milestone: Camino0.8 → Camino0.9
Comment 13•20 years ago
|
||
I get 14 hits searching for "BrowserWindowController getContextMenu" using TalkBack FastFind. Do you see that, Josh?
Comment 14•20 years ago
|
||
FWIW, each of them is attributed to nsCLiveconnect.cpp, line 300.
Comment 15•20 years ago
|
||
That feature of Talkback find wasn't available when I tried. Anyway, 14 reports given the thousands of testers... Is this a lot of reports? I'm not sure how many reports a "common" crash gets. We need a consistent repro.
Updated•20 years ago
|
Target Milestone: Camino0.9 → Camino1.0
Assignee | ||
Comment 16•19 years ago
|
||
The only way I can see that this might happen in -getContextMenu is if mContextMenuNode goes bad.
Assignee | ||
Comment 17•19 years ago
|
||
This crash is almost certainly caused by the dubious handling of mContextMenuNode in the BrowserWindowController. It has an ill-defined lifetime, and we don't hold a ref to it.
This accounts for most of my context menu-related crashes, some on Flash content (when I don't get bug 242906 or bug 192276 instead) and others on MediaWiki-produced pages when ctrl-clicking on headings to edit (oncontextmenu='document.location="url"'), and the line is always in the crashed thread somewhere on cm-crashes when the top of the stack is something else.... Camino usually has to have been running for "a while" before the oncontextmenu triggers this crash.
Assignee | ||
Updated•19 years ago
|
Assignee: pinkerton → sfraser_bugs
Priority: -- → P2
Target Milestone: Camino1.0 → Camino0.9
Comment 19•19 years ago
|
||
Filed Talkback incident TB7853151M for this bug. Was right-clicking on an overloaded context menu (related to bug 298458 ?)
Assignee | ||
Comment 20•19 years ago
|
||
The problem here is that BrowserWindowController has a raw pointer to mContextMenuNode, which is not cleared after the context menu has been handled. Combine that with the fact that onShowContextMenu: is not called for plugins, and you can easily be left with stale pointers.
Status: NEW → ASSIGNED
Assignee | ||
Comment 21•19 years ago
|
||
Steps to reproduce: 1. Open one tab with a page with an image, and a second tab with the HTML testcase from this bug. 2. Right-click on an image in the first tab, but don't choose anything from the menu. 3. Close the first tab. 4. In the second tab, right-click on one of the EMBEDs or OBJECTs. Choose one of the image-related items from the menu. 5. Note crash.
Assignee | ||
Comment 22•19 years ago
|
||
This is the actual fix for the bug (I'll post a bigger patch shortly). It's not very nice. I could find no way to get called after the context menu has been handled, either in the widget code, or the BWC code. I ended up using the autorelease of an object to know that we've got back to the main event loop, which is a good time to clear the context menu node etc.
Assignee | ||
Comment 23•19 years ago
|
||
Full patch. This does two other things: 1. Embellish the NSMenu extension code to fire out notificaions when menus close, as well as when they show. I don't actually need this now, but it seems useful to have. 2. Move raw XPCOM data member pointers in BrowserWindowController into a little C++ class (BWCDataOwner) that can use nsCOMPtr, and makes refcounting easier.
Attachment #194124 -
Flags: review?(pinkerton)
Comment 24•19 years ago
|
||
Comment on attachment 194124 [details] [diff] [review] Full patch skankadellic, but reasonable. r=pink
Attachment #194124 -
Flags: review?(pinkerton) → review+
Assignee | ||
Comment 25•19 years ago
|
||
Fixed on trunk and branch.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago → 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Updated•13 years ago
|
Crash Signature: [@ -[BrowserWindowController getContextMenu]]
You need to log in
before you can comment on or make changes to this bug.
Description
•