Closed Bug 777514 Opened 13 years ago Closed 13 years ago

B2G Updates: EventHub input loop stops the b2g process from exiting

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: marshall, Assigned: marshall)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently, process exit will block when ~nsAppShell calls mReaderThread->requestExitAndWait(). This requires the user to do some form of input (touch or button press of some kind) to tick the EventHub loop, and finalize the b2g process teardown.
Attached patch event hub wake fix - v1 (obsolete) — Splinter Review
Attachment #645897 - Flags: review?(mwu)
Hm, can we request an exit, wake, and then wait for exit? I'm a bit afraid that we might wake up, and then go straight back to waiting before we call the exit and wait function.
(In reply to Michael Wu [:mwu] from comment #2) > Hm, can we request an exit, wake, and then wait for exit? I'm a bit afraid > that we might wake up, and then go straight back to waiting before we call > the exit and wait function. Good catch! It looks like we can actually separate out the calls to requestExit() and join() (for waiting), so I'll add the call to mEventHub->wake() between the two, to avoid the second request.
Call requestExit() before waking the EventHub, and then join() (wait)
Attachment #645897 - Attachment is obsolete: true
Attachment #645897 - Flags: review?(mwu)
Attachment #646148 - Flags: review?(mwu)
Attachment #646148 - Flags: review?(mwu) → review+
Sorry, I backed this out on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/7ac08cd7d0a3 because of B2G build failures: https://tbpl.mozilla.org/php/getParsedLog.php?id=13879519&tree=Mozilla-Inbound ../../../widget/gonk/nsAppShell.cpp:501: error: 'class android::InputReaderThread' has no member named 'join'
Ugh, this looks like another Tinderbox GB toolchain issue. See Bug 776045
Depends on: 776045
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
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: