Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:24:10+00:00 2026-06-10T22:24:10+00:00

I have uploaded my application on google play but users have reported the following

  • 0

I have uploaded my application on google play but users have reported the following exception

java.lang.RuntimeException: WakeLock under-locked C2DM_LIB. This exception occurs when I try to release the WakeLock. Can anyone tell what could be the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:24:11+00:00Added an answer on June 10, 2026 at 10:24 pm

    I have traced same exception in new GCM Library too. Actually old C2DM Android library have same error, same crash, and Google hasn’t fixed it yet. As I can see by our statistics, about 0.1% of users experiencing this crash.

    My investigations shows that problem is in incorrect releasing of network WakeLock in GCM library, when library tries to release WakeLock that holds nothing (internal lock counter becomes negative).

    I was satisfied with simple solution – just catch this exception and do nothing, because we don’t need to do any extra job then our wakelock hold nothing.

    In order to do this you need to import GCM library sources in your project, rather than already compiled .jar file. You can find GCM library sources under “$Android_SDK_Home$/extras/google/gcm/gcm-client/src” folder (you need to download it first using Android SDK Manager).

    Next open GCMBaseIntentService class, find line

    sWakeLock.release();
    

    and surround it with try-catch.

    It should look like this:

        synchronized (LOCK) {
            // sanity check for null as this is a public method
            if (sWakeLock != null) {
                Log.v(TAG, "Releasing wakelock");
                try {
                    sWakeLock.release();
                } catch (Throwable th) {
                    // ignoring this exception, probably wakeLock was already released
                }
            } else {
                // should never happen during normal workflow
                Log.e(TAG, "Wakelock reference is null");
            }
        }
    

    UPDATE:
    Alternativally, as suggested @fasti in his answer, you can use mWakeLock.isHeld() method to check if wakelock actually holding this lock.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have uploaded a php web application to google app engine , but all
i have uploaded an app to google play but after two days stil cant
I have just uploaded my published application files to my web server but I
I have just tried to uploaded an app through the Application Loader, but it
I have developed and Simple android application in Java and also uploaded it on
I have uploaded a sample application to google app engine. Now I would like
I have uploaded on apk file on the google play account, apk i have
I'm trying to develop a Facebook application, and I have uploaded my index.php file,
I have an application running on a Windows Server 2008, that is processing uploaded
i have uploaded an app yesterday by 6pm but till now i can't find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.