Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
83 views
in Technique[技术] by (71.8m points)

android - Google play services 5.0.77

From the 25th of june two unrelated apps that are using ads started to have this NPE

java.lang.NullPointerException
   at zo.a(SourceFile:172)
   at aeh.a(SourceFile:120)
   at afw.run(SourceFile:14)
   at afy.run(SourceFile:30)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
   at java.lang.Thread.run(Thread.java:856)

I think this is related to google play services update. Is anyone able to help me out on this issue?

Just to confirmed that the issue is related to play service I have managed to get this from crashlytics from a thread called AdWorker:

thread
   at java.lang.Object.wait(Object.java)
   at java.lang.Thread.parkFor(Thread.java:1231)
   at sun.misc.Unsafe.park(Unsafe.java:323)
   at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:813)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:973)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1282)
   at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
   at zo.a(SourceFile:147)
   at zo.a(SourceFile:170)
   at aeh.a(SourceFile:120)
   at afw.run(SourceFile:14)
   at afy.run(SourceFile:30)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
   at java.lang.Thread.run(Thread.java:856)

it is not the right place... but there is no place at all where to report them

Number of exceptions it has double from 1 july, it is now almost 3 times what it was the 27th of june.

Issue on android google code project

The discussion is now in this thread on admob google Heading group

Last reply from google "We're aware of these crashes and are working on fixes. We hope to push out these fixes in the next week or two." (July 7th)

question from:https://stackoverflow.com/questions/24457689/google-play-services-5-0-77

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Found this solution by Mateusz Matela at https://groups.google.com/forum/#!topic/google-admob-ads-sdk/DkjtCx_Zvn8.

I have tried on a Motorola DEFY+ that crashed from this bug two out of three times. It seems to work even when the warnings assositated with this bug appears in the log. It even says "AdWorker thread thrown an exception". My ads even reappeard when continuing to use the app.

final UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        @Override
        public void uncaughtException(Thread thread, Throwable ex) {
            if (thread.getName().startsWith("AdWorker")) {
                Log.w("ADMOB", "AdWorker thread thrown an exception.", ex);
            } else if (defaultHandler != null) {
                defaultHandler.uncaughtException(thread, ex);
            } else {
                throw new RuntimeException("No default uncaught exception handler.", ex);
            }
        }
});

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...