Closed Bug 301161 Opened 19 years ago Closed 19 years ago

Plugin event starvation when running PDF and Flash plugins together

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file)

At Novell we had a bug where running the Adobe Reader 7.0 plugin would sometimes
hang *if* you had at least one Flash animation running. Everything would work
OK, just the PDF document would never appear. If you close all Flash objects
(e.g. by navigating to another page) the PDF document would suddenly appear.
Weird eh?

I tracked it down to gtk2xtbin. It has an idle handler "if (XtAppPending())
XtProcessAppEvent();". It *appears* that the Flash plugin manages to (almost)
always have a pending event (a timer event, I guess) so this always dispatches
the Flash event and never gets around to dispatching events that the PDF plugin
needs in order to complete loading of its document.
Attached patch fixSplinter Review
This patch makes us be more fair by processing a number of Xt events at a time.
This is a hack but it works. I was even able to bring up more than 20 Flash
animations and still open PDFs. We still limit the number of Xt events
processed, so a runaway Xt-event-dispatching plugin still won't completely
freeze the browser.
Attachment #189655 - Flags: superreview?(blizzard)
Attachment #189655 - Flags: review?(blizzard)
Comment on attachment 189655 [details] [diff] [review]
fix

This _seems_ OK.  But you need to do a lot of testing to make sure that things
like full screen flash games still work OK.  I seem to remember having a
heuristic in place in the past and it was hard to find the trade off between
good interactive performance and not starving other event queues.  (The fact
that these are separate queues sucks.)
Attachment #189655 - Flags: superreview?(blizzard)
Attachment #189655 - Flags: superreview+
Attachment #189655 - Flags: review?(blizzard)
Attachment #189655 - Flags: review+
You're talking about bug 117398? I think from CVS blame this timer code was just
added once and then hasn't been touched. If there were heuristics they must have
only been in your tree...
Comment on attachment 189655 [details] [diff] [review]
fix

I'll add this to GTK1 also.

I tested multiple large Flash animations and they worked fine.

drivers: this patch fixes an issue where PDF full-page plugins won't open while
a Flash animation is running, at least with Adobe Reader 7.
Attachment #189655 - Flags: approval1.8b4?
Attachment #189655 - Flags: approval1.8b4? → approval1.8b4+
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: