Closed Bug 639353 Opened 15 years ago Closed 15 years ago

hang during keyboard input

Categories

(Core Graveyard :: Widget: Android, defect)

ARM
Android
defect
Not set
normal

Tracking

(fennec2.0+)

RESOLVED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: justdave, Assigned: blassey)

Details

Attachments

(2 files)

Mozilla/5.0 (Android; Linux armv7l; rv:2.0b13pre) Gecko/20110306 Firefox/4.0b13pre Fennec/4.0b6pre HTC Evo 4G, Android 2.2 Went to https://rcam.target.com/ and started typing my username. My username is 10 letters, after typing the 9th letter, Fennec completely froze up, and the OS offered to force quit. Repeated this 3 times, then went on IRC and mentioned it, then tried again and it worked the 4th time without hanging. blassey said this was a conceivable regression from a recent commit involving syncing state between java and C and I ought to file it anyway.
Component: General → Widget: Android
Product: Fennec → Core
QA Contact: general → android
I also hit this while editing this bug
tracking-fennec: --- → 2.0+
Attached patch patchSplinter Review
this is my theory of what's going on: 480 private static final ReentrantLock mGeckoSyncLock = new ReentrantLock(); 481 private static final Condition mGeckoSyncCond = mGeckoSyncLock.newCondition(); 482 private static boolean mGeckoSyncAcked; 483 484 // Block the current thread until the Gecko event loop is caught up 485 public static void geckoEventSync() { 486 GeckoAppShell.sendEventToGecko( 487 new GeckoEvent(GeckoEvent.GECKO_EVENT_SYNC)); <----------------------------------- context switch, acknowledgeEventSync() runs, mGeckoSyncAcked is true 488 mGeckoSyncLock.lock(); 489 mGeckoSyncAcked = false; 490 while (!mGeckoSyncAcked) { 491 try { 492 mGeckoSyncCond.await(); <-------- we wait here, but since acknowledgeEventSync() already ran we won't get singnaled 493 } catch (InterruptedException e) { 494 break; 495 } 496 } 497 mGeckoSyncLock.unlock(); 498 } 499 500 // Signal the Java thread that it's time to wake up 501 public static void acknowledgeEventSync() { 502 mGeckoSyncLock.lock(); 503 mGeckoSyncAcked = true; 504 try { 505 mGeckoSyncCond.signal(); 506 } finally { 507 mGeckoSyncLock.unlock(); 508 } 509 }
Assignee: nobody → blassey.bugs
Attachment #517349 - Flags: review?(crowderbt)
Attachment #517349 - Flags: review?(crowderbt) → review+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
This is a really scary change - holding a lock while calling sendEventToGecko probably isn't the best thing. can we instead use a tristate value for mGeckoSyncAcked?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #517434 - Flags: review?(doug.turner)
Attachment #517434 - Flags: review?(doug.turner) → review+
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: