Closed Bug 621484 Opened 12 years ago Closed 12 years ago

Hang at org.mozilla.gecko.GeckoInputConnection.getExtractedText(


(Core Graveyard :: Widget: Android, defect)

Not set



Tracking Status
fennec 2.0b4+ ---


(Reporter: blassey, Assigned: blassey)




(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
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]

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.
Assignee: nobody → blassey.bugs
Attachment #499801 - Attachment is obsolete: true
Attachment #499990 - Flags: review?(mwu)
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+
Attachment #499990 - Attachment is obsolete: true
Attachment #499990 - Flags: review?(mwu)
2.0b4+ because this is blocking a blocker and it prevents a hang
tracking-fennec: --- → 2.0b4+
Closed: 12 years ago
Resolution: --- → FIXED
Duplicate of this bug: 621062
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.