Last Comment Bug 661978 - Input type file will cause a hang in fennec
: Input type file will cause a hang in fennec
: hang, mobile
Product: Fennec Graveyard
Classification: Graveyard
Component: General (show other bugs)
: Trunk
: ARM Android
: -- normal (vote)
: Firefox 9
Assigned To: Doug Turner (:dougt)
: 677562 (view as bug list)
Depends on:
Blocks: 680311
  Show dependency treegraph
Reported: 2011-06-03 16:56 PDT by Naoki Hirata :nhirata (please use needinfo instead of cc)
Modified: 2011-08-19 10:18 PDT (History)
9 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

screenshot (40.72 KB, image/png)
2011-06-03 16:56 PDT, Naoki Hirata :nhirata (please use needinfo instead of cc)
no flags Details
screenshot of blassey (148.44 KB, image/png)
2011-08-18 13:22 PDT, Doug Turner (:dougt)
no flags Details
patch v.1 (5.90 KB, patch)
2011-08-18 13:24 PDT, Doug Turner (:dougt)
blassey.bugs: review+
Details | Diff | Splinter Review

Description Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-06-03 16:56:38 PDT
Created attachment 537274 [details]

Mozilla/5.0 (Android; Linux armv71; rv7.0a1) Gecko/20110603 Firefox/7.0a1 Fennec/7.0a1
Device: Thunderbolt
OS: Android 2.2

1. go to
2. go to the section called "No form (should have next)"
3. click in the text field called "Last name:" and type something and hit the return key
4. click in the next field that is next to the browse button

Expected: A popup menu to choose a file appears and you can select an app
Actual: A popup menu appears but the app hangs
Comment 1 Kevin Brosnan [:kbrosnan] 2011-06-06 09:40:41 PDT
I was able to hang the browser by pressing back after following the steps in comment 0 when I pressed the system back key.
Comment 2 Mike Hommey [:glandium] 2011-07-21 10:04:52 PDT
I see something similar on an ASUS transformer (honeycomb 3.1) when touching an input type="file" on, e.g. the bugzilla page to file a new bug with an attachment, though the "browse" button next to it does work properly.
Comment 3 Mike Hommey [:glandium] 2011-07-21 10:05:47 PDT
Note the stock browser doesn't show an input field for input type="file"
Comment 4 Mike Hommey [:glandium] 2011-07-21 10:06:14 PDT
That is, it only shows a "browse" button
Comment 5 Doug Turner (:dougt) 2011-08-01 12:24:05 PDT
When this happens, I see GeckoApp::showFilePicker() be called, but it does not return.
Comment 6 Doug Turner (:dougt) 2011-08-01 14:25:31 PDT
mike -- when this happens to you, do you see a large black area at the bottom of the screen where, perhaps, the software keyboard could be?n
Comment 7 Mike Hommey [:glandium] 2011-08-01 15:03:20 PDT
(In reply to comment #6)
> mike -- when this happens to you, do you see a large black area at the
> bottom of the screen where, perhaps, the software keyboard could be?n

No. neither with or without the hardware keyboard attached.
Comment 8 Doug Turner (:dougt) 2011-08-08 15:38:57 PDT
startActivityForResult, for some reason, doesn't always call onActivityResult.  If onActivityResult isn't called, our implementation will wait on a monitor and never will wake up.

Where we call startActivityForResult:

Where we wait:

Where we notify:

Looking at my logging, it clearly suggests that onActivityResult isn't called.
Comment 9 Brad Lassey [:blassey] (use needinfo?) 2011-08-09 09:04:23 PDT
*** Bug 677562 has been marked as a duplicate of this bug. ***
Comment 10 Doug Turner (:dougt) 2011-08-18 13:22:25 PDT
Created attachment 554187 [details]
screenshot of blassey

this is another screenshot.  it shows blassey as I was explaining the hang to him over video.
Comment 11 Doug Turner (:dougt) 2011-08-18 13:24:30 PDT
Created attachment 554189 [details] [diff] [review]
patch v.1

this patch spins an event look to avoid deadlocking on the gecko thread.
Comment 12 Brad Lassey [:blassey] (use needinfo?) 2011-08-18 19:22:13 PDT
Comment on attachment 554189 [details] [diff] [review]
patch v.1

Review of attachment 554189 [details] [diff] [review]:


We should probably do this for all of our sync queues that are called on the gecko thread. Please file a follow up bug for that.
Comment 13 Doug Turner (:dougt) 2011-08-18 19:32:21 PDT
THAT IS A GREAT IDEA!  Lets do that work in bug 680311.
Comment 15 Marco Bonardo [::mak] 2011-08-19 03:24:05 PDT
Comment 16 Aaron Train [:aaronmt] 2011-08-19 10:18:40 PDT
Mozilla/5.0 (Android; Linux armv7l; rv:9.0a1) Gecko/20110819 Firefox/9.0a1 Fennec/9.0a1

Note You need to log in before you can comment on or make changes to this bug.