Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WakeLock under-locked GCM_LIB issue. #19

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments
Open

WakeLock under-locked GCM_LIB issue. #19

GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

My app uses gcm-android library r3 and
I've got a few error reports about this error.

java.lang.RuntimeException: WakeLock under-locked GCM_LIB
at android.os.PowerManager$WakeLock.release(PowerManager.java:325)
at android.os.PowerManager$WakeLock.release(PowerManager.java:300)
at 
com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.
java:252)

I used same way as sample and when I saw the gcm source this couldn't happen, 
but... it seems it does.

Am I using it wrong or is it gcm but?

Original issue reported on code.google.com by noranb...@gmail.com on 31 Mar 2013 at 8:54

@GoogleCodeExporter
Copy link
Author

Sorry for typo in the last line.
 -> Am I using it wrong or is it gcm bug?

Original comment by noranb...@gmail.com on 31 Mar 2013 at 8:55

@GoogleCodeExporter
Copy link
Author

I saw a related post.
https://groups.google.com/d/msg/cw-android/lxa8EBznL7Q/nTiCgku1Qy4J
The interesting scenario is,
-- You acquire the static lock in a BroadcastReceiver
-- You call startService() in the BroadcastReceiver
-- Android creates and starts the service *in a different process*
(e.g., Android terminated the process that held the BroadcastReceiver)
-- The service tries to unlock and gets this error, because we're using
a different WakeLock object, because we're in a different process.

Is this possible case? If it is, what is the solution?

Original comment by noranb...@gmail.com on 4 Apr 2013 at 6:30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant