Closed Bug 561477 Opened 14 years ago Closed 14 years ago

Right-clicking on flash applets hangs/crashes plugin-container/Firefox


(Core Graveyard :: Plug-ins, defect)

Not set


(blocking2.0 final+)

Tracking Status
blocking2.0 --- final+


(Reporter: joe, Assigned: BenWa)



(Keywords: testcase)


(2 files, 1 obsolete file)

Attached file complete test case
This might be for all flash applets, but it definitely applies to the testcase I've just attached. If you right-click on either of the flash applets in this testcase, Firefox hangs for ~30-ish seconds, then kills the plugin process, making me think that the plugin process has hung. Benoit tells me that without OOPP, right-clicking can crash or hang your browser.

OS X 10.6, Flash plugin 10.1 rc.
Blocks: OOPP
Sounds like something we need to deal with before we release Mac OOPP to the masses. Josh, should you own this? If not, please reassign appropriately.
Assignee: nobody → joshmoz
blocking2.0: ? → final+
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a5pre) Gecko/20100518 Minefield/3.7a5pre

I retested with a recent nightly. The right-click menu works fine without OOPP. I no longer get a hang or a crash with OOPP but the right-click menu does not work. I wonder if the right-click menu doesn't show up because it's being created from a separate process. We have a similar problem with flash fullscreen not being able to hide the dock.
Disregard my previous comment, my test setup was likely incorrect.

I retested and I am seeing a crash for IP and no context menu for OOP. This is because 'NPAPI_ShowCocoaContextMenu' has a bug for IP and is not implemented OOP.

I am posting a patch because this code should have catch objective-c exception. The crash is caused by the following exception:
2010-05-31 12:02:41.162 firefox-bin[47638:903] Mozilla has caught an Obj-C exception [NSInternalInconsistencyException: Invalid parameter not satisfying: NSEventMaskFromType(type) & (MouseMask|NSMouseMovedMask)]
2010-05-31 12:02:41.311 firefox-bin[47638:903] *** Assertion failure in +[NSEvent mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:], /SourceCache/AppKit/AppKit-1038.29/AppKit.subproj/NSEvent.m:477
Blocks: 568513
Attached patch Catch Objective-C Exception (obsolete) — Splinter Review
This doesn't fix right-click menu but it stops the crash for now.
Attachment #448382 - Flags: review?(joshmoz)
Attachment #448382 - Attachment is patch: true
Attachment #448382 - Attachment mime type: application/octet-stream → text/plain
Assignee: joshmoz → b56girard
"'NPAPI_ShowCocoaContextMenu' has a bug for IP"

What is the bug? Do you know what we're doing to trigger this exception?
Comment on attachment 448382 [details] [diff] [review]
Catch Objective-C Exception


The return type for the function is NPError.
Attachment #448382 - Flags: review?(joshmoz) → review-
Changed the return to NPERR_GENERIC_ERROR.
Attachment #448382 - Attachment is obsolete: true
Attachment #449464 - Flags: review?(joshmoz)
Comment on attachment 449464 [details] [diff] [review]
Catch Objective-C Exception v2


Put a newline before this.
Attachment #449464 - Flags: review?(joshmoz) → review+
Pushed to mozilla-central:

We need to try the STR to see if the right-click context menu works correctly now. I've seen this issue on and off so if someone else could verify the right click menu work for them in-process that would be great.
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 583356
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.