Closed Bug 818401 Opened 12 years ago Closed 12 years ago

w/ passcode lock enabled, the lock-screen-spawned camera app turns on the GPS radio forever (maybe due to app staying open in background?)

Categories

(Firefox OS Graveyard :: Gaia::System, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +

People

(Reporter: dholbert, Assigned: alive)

Details

(Keywords: b2g-testdriver, unagi)

Attachments

(1 file)

STR:
 0. (I'm assuming you've got GPS already enabled, which IIRC is the default)
 1. Add a "passcode lock" to your phone (in Settings | Phone Lock)
 2. Turn screen off and on, to get to lock screen.
 3. Slide up the lockscreen animation "hammock", and tap the camera icon.
 4. Once the camera opens, turn screen off and on again, to return to lock screen.
     --> NOTE: the GPS indicator will be displayed in your status area, 
         since the camera uses it.
 5. Wait for the GPS indicator to go away. If you like, unlock the screen and go about your business.

ACTUAL RESULTS: GPS Indicator stays there indefinitely. I left my phone sitting at the lock screen in step 5 for 10+ minutes, and the GPS indicator was still there (and in the "lit up" state, not in the "darkened" state).

I think this is because the passcode lock makes the lockscreen-camera launch "in the background", and it may remain open in the background even after you navigate out of it by turning the screen off.

This wouldn't be a huge deal, except that the GPS is a big power-suck, so we shouldn't leave it powered on when we're not using it. (as we are in this case)
Note that there's no way (as far as I know) to make the passcode-lock-lockscreen-camera app "quit", because it's not visible in the app switcher. (because it's not launched as a normal app from the home screen)

I'm reporting this with the beta dogfood build released today w/ build ID: 20121203114956
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Summary: w/ passcode lock enabled, the lock-screen camera turns on the GPS radio forever (due to app staying open in background?) → w/ passcode lock enabled, the lock-screen-spawned camera app turns on the GPS radio forever (maybe due to app staying open in background?)
Assignee: nobody → dale
blocking-basecamp: ? → +
Priority: -- → P1
Stealing this coz this is not relevant to camera app itself.
Anyway, this is an interesting bug, good catch! :)
Assignee: dale → alive
Component: Gaia → Gaia::System
Mass Modify: All un-milestoned, unresolved blocking-basecamp+ bugs are being moved into the C3 milestone. Note that the target milestone does not mean that these bugs can't be resolved prior to 12/10, rather C2 bugs should be prioritized ahead of C3 bugs.
Target Milestone: --- → B2G C3 (12dec-1jan)
I think we can hit this from the normal (non-lockscreen) camera app, too, even after I force-quit the camera app from the app-switcher.

After force-quitting the camera app, I still see the GPS in the indicator area indefinitely, and my logcat output prints out a bunch of spam every 1 sec.  The spam seems to be logging for a periodic (every 1 second) GPS position-update-callback, and it looks like this:
{
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_PARSED_POSITION_REPORT
D/LocSvc_eng(  108): [ZTE-GPS]loc_eng_deferred_action_thread navigating= 1 
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2620, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2620)
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2621, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2621)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2622, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2622)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2623, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2623)
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_SATELLITE_REPORT
E/LocSvc_afw(  108): I/<=== sv_status_cb - line 878 3
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x49292680
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x49292680
E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*, rpc_loc_client_handle_type, rpc_loc_event_mask_type, const rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x49292680
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2624, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2624)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2625, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2625)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2626, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2626)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2627, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2627)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2628, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2628)
D/RPC     (  108): 3000008c:00050000 received CALL.
D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2629, xdr 0x44d0c000) for callback client 3100008c:00050001.
D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2629)
}
Daniel, great catch. 
Sounds like platform issue, could you file another bug for #4 in Component:General? Thanks!

(In reply to Daniel Holbert [:dholbert] from comment #4)
> I think we can hit this from the normal (non-lockscreen) camera app, too,
> even after I force-quit the camera app from the app-switcher.
> 
> After force-quitting the camera app, I still see the GPS in the indicator
> area indefinitely, and my logcat output prints out a bunch of spam every 1
> sec.  The spam seems to be logging for a periodic (every 1 second) GPS
> position-update-callback, and it looks like this:
> {
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_PARSED_POSITION_REPORT
> D/LocSvc_eng(  108): [ZTE-GPS]loc_eng_deferred_action_thread navigating= 1 
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2620, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2620)
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2621, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2621)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2622, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2622)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2623, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2623)
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_SATELLITE_REPORT
> E/LocSvc_afw(  108): I/<=== sv_status_cb - line 878 3
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x42a87790
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x49292680
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x49292680
> E/LocSvc_adapter(  108): I/<--- int32 loc_event_cb(void*,
> rpc_loc_client_handle_type, rpc_loc_event_mask_type, const
> rpc_loc_event_payload_u_type*) line 74 RPC_LOC_EVENT_NMEA_1HZ_REPORT
> E/LocSvc_eng(  108): I/<=== nmea_cb line 1453 0x49292680
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2624, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2624)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2625, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2625)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2626, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2626)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2627, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2627)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2628, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2628)
> D/RPC     (  108): 3000008c:00050000 received CALL.
> D/RPC     (  108): 3000008c:00050000 dispatching RPC call (XID 2629, xdr
> 0x44d0c000) for callback client 3100008c:00050001.
> D/RPC     (  108): 3100008c:327681 sending RPC reply (XID 2629)
> }
Patch proposal:
Remove camera iframe once screen goes off.
This also resolves that there exists 2 cameras at the same time when the user press power button in secure camera and launch again.
Attachment #689535 - Flags: review?(timdream+bugs)
Comment on attachment 689535 [details]
https://github.com/mozilla-b2g/gaia/pull/6872

r=me.

This is not the optimal fix I think; a better fix will be carrying the |instant| parameter all the way from |switchPanel| to |loadPanel| and |unloadPanel|, and have the camera panel unloading code react with it. Judging by the time we have, I can accept this fix instead...
Attachment #689535 - Flags: review?(timdream+bugs) → review+
https://github.com/mozilla-b2g/gaia/commit/a30bbe1f909a052dd2afd08272e438fc8021d14a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
(In reply to Alive Kuo [:alive] from comment #6)
> Patch proposal:
> Remove camera iframe once screen goes off.
> This also resolves that there exists 2 cameras at the same time when the
> user press power button in secure camera and launch again.

Does that mean this will fix bug 818955?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: