Closed Bug 621484 Opened 11 years ago Closed 11 years ago
Hang at org
.mozilla .gecko .Gecko Input Connection .get Extracted Text(Gecko Input Connection .java:252)
I've been seeing this hang lately. It seems to be particularly exacerbated on startup by the patch on bug 619626, so it seems like some sort of race condition. One obvious fix to avoid this situation is to use poll() with a timeout rather than take(), this patch does that.
Attachment #499801 - Flags: review?(mwu)
Comment on attachment 499801 [details] [diff] [review] patch Lets not work around locking issues without understanding them. This issue suggests that either the gecko thread is hanging or there is code not honoring the requirement to respond to all queries. I'd tend towards the gecko thread hanging since I haven't seen any changes to the code that would cause the other issue.
Attachment #499801 - Flags: review?(mwu) → review-
I've confirmed this is a race condition. The problem is that the gecko event loop isn't running yet, so sendeventtogecko fails silently. There are two solutions, the first is to return something from sendEventToGecko indicating the event wasn't sent and bail. The other is to queue up the events and send them through when the event loop is ready (like attachment 485307 [details] [diff] [review] on bug 601282 does). This patch implements the former solution. Its not clear how far we should take this, but it might make sense to do it anywhere where we're blocking on a response from the gecko event loop (I think there's ~10 of those places in the code) I also wonder if bug 621062 has a similar cause.
Attachment #499990 - Attachment description: patch → patch for check sendEventToGecko ret val solution
Comment on attachment 499991 [details] [diff] [review] patch for queue events solution If we go with this approach we probably want to filter out touch and key events. Everything else should be valid.
Comment on attachment 499991 [details] [diff] [review] patch for queue events solution looks good to me.
Attachment #499991 - Flags: review?(mwu) → review+
2.0b4+ because this is blocking a blocker and it prevents a hang
tracking-fennec: --- → 2.0b4+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Duplicate of this bug: 621062
You need to log in before you can comment on or make changes to this bug.