AdMob ExoPlayerImplInternal: Renderer error - java

I am using AdMob in my Android app. Ads are usually working fine.
However, sometimes I get following errors when trying to load a RewardedAd. It often appears when loading multiple (different) ads. Once this error appears, no other AdMob ads including Interstitials can show anymore until the app cold starts again. The problem is that my app permanently needs to run a background service which makes the app never restart.
Is there any way I can fix this error in runtime without restarting the app?
D/CCodecConfig: read media type: audio/mp4a-latm
I/CCodecConfig: query failed after returning 19 values (BAD_INDEX)
I/CCodecConfig: query failed after returning 19 values (BAD_INDEX)
E/ExoPlayerImplInternal: Renderer error.
com.google.android.gms.ads.exoplayer3.c
at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:20)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:4)
at com.google.android.gms.ads.exoplayer3.video.h.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:1)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.z(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:3)
at com.google.android.gms.ads.exoplayer3.n.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:42)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.gms.ads.exoplayer3.mediacodec.b: Decoder init failed: OMX.Exynos.vp9.dec, Format(1, null, video/x-vnd.on2.vp9, -1, null, [640, 360, -1.0], [-1, -1])
at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:19)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:4) 
at com.google.android.gms.ads.exoplayer3.video.h.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:1) 
at com.google.android.gms.ads.exoplayer3.mediacodec.c.z(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:3) 
at com.google.android.gms.ads.exoplayer3.n.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:42) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loopOnce(Looper.java:226) 
at android.os.Looper.loop(Looper.java:313) 
at android.os.HandlerThread.run(HandlerThread.java:67) 
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.Exynos.vp9.dec, error 0xfffffff4
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1961)
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1938)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:9)
and immediately afterwards
W/Ads: Precache error
com.google.android.gms.ads.exoplayer3.c
at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:20)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:4)
at com.google.android.gms.ads.exoplayer3.video.h.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:1)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.z(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:3)
at com.google.android.gms.ads.exoplayer3.n.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:42)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.gms.ads.exoplayer3.mediacodec.b: Decoder init failed: OMX.Exynos.vp9.dec, Format(1, null, video/x-vnd.on2.vp9, -1, null, [640, 360, -1.0], [-1, -1])
at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:19)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:4) 
at com.google.android.gms.ads.exoplayer3.video.h.G(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:1) 
at com.google.android.gms.ads.exoplayer3.mediacodec.c.z(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:3) 
at com.google.android.gms.ads.exoplayer3.n.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:42) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loopOnce(Looper.java:226) 
at android.os.Looper.loop(Looper.java:313) 
at android.os.HandlerThread.run(HandlerThread.java:67) 
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.Exynos.vp9.dec, error 0xfffffff4
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1961)
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1938)
at com.google.android.gms.ads.exoplayer3.mediacodec.c.N(:com.google.android.gms.policy_ads_fdr_dynamite#214106404#214106404057.409717972.409717972:9)
I/Ads: Ad failed to load : 0
W/Ads: Failed to preload url VIDEO_... Exception: ExoPlayer was released during preloading.
W/Ads: #004 The webview is destroyed. Ignoring action.

Related

DeadObjectException when pressure test

Our application receives the client's request through AIDL, then executes a processing flow, and finally returns the processing result to the client. When I performed a stress test on the application, I found that the following exception would be thrown every time the complete process was executed about 400 times.
The crash log is:
11-05-06-20-59.583 E CrashHandler.java[101](handleExceptions)[1]Exception: java.lang.RuntimeException: Adding window failed
at android.view.ViewRootImpl.setView(ViewRootImpl.java:652)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3518)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2733)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:623)
at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:828)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:640)
... 12 more
Through the analysis of the memory, it was found that the Handler object was repeatedly created when the AIDL command was initiated, and the Handler object was not cleaned up in time, resulting in a memory leak.

Nativescript angular app breaking with "java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid"

I've creating a nativescript application which uses the nativescript-barcodescanner plugin to scan and decode qr codes. This application is intended to be used to scan a lot of qr codes, but not in consecutive order. However, after a 1000 scans, the application is breaking with the following exception.
java.lang.RuntimeException: Unable to resume activity {org.nativescript.test/com.google.zxing.client.android.CaptureActivity}: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 15623, callerPackage: org.nativescript.test
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4021)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4053)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7078)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 15623, callerPackage: org.nativescript.test
at android.os.Parcel.createException(Parcel.java:1974)
at android.os.Parcel.readException(Parcel.java:19
// Allocate time for this cycle to end before issueing a validate request. Attempting to fix Fragment issue on some
// mobile devices34)
at android.os.Parcel.readException(Parcel.java:1884)
at android.app.IActivityManager$Stub$Proxy.registerReceiver(IActivityManager.java:3684)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1567)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1528)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1516)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:636)
at com.google.zxing.client.android.InactivityTimer.onResume(InactivityTimer.java:69)
at com.google.zxing.client.android.CaptureActivity.onResume(CaptureActivity.java:222)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1416)
at android.app.Activity.performResume(Activity.java:7609)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4013)
... 11 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:25447)
at android.app.IActivityManager$Stub.onTransact$registerReceiver$(IActivityManager.java:10896)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:126)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:4162)
at android.os.Binder.execTransact(Binder.java:739)
After attempting to debug the issue, from what i've found, it seems that when calling the BarcodeScanner.scan function offered by the nativescript-barcodescanner plugin, an Activity is started for result as per this code, which in turn, a receiver is registered by the google zxing library (used by this plugin). What seems to be the issue is that upon a successful scan, when the Activity returns the result, the google zxing library is not doing the necessary clean ups, resulting with dangling receivers registered. Note that when the scanner is closed by pressing the back button, the clean ups are carried out as expected.
Any help about going around this issue would be appreciated.
Edit: Added link to github repo for reproduction
https://github.com/jeanpaulattard/nativescript-barcodescanner-demo

Android Studio - Application has stopped, but 0 code errors

My android application was running smoothly before i install some Android Studio updates, and asked me to upgrade gradle etc after the update been installed.
Later on, the Android Studio asked me to update my Android Emulator (Emulator Nexus 5X API 24 Android v7.0), since i've made all these changes, my application has been unable to open when i click run. But remember it has no codding errors when i debug etc.
The error message from Android Monitor is:
08-13 14:07:30.735 3889-3889/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.smartlegal.law.freeman.smartlegal, PID: 3889
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.smartlegal.law.freeman.smartlegal/com.smartlegal.law.freeman.smartlegal.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at com.smartlegal.law.freeman.smartlegal.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
08-13 14:07:30.744 3889-3896/? W/art: Suspending all threads took: 5.874ms
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
As the error states, you're trying to set an onClickListener on a Button that does not exist (returns null). To simplify, when you're defining your Button, you call findViewById to associate the Button in Java with an XML element, but the ID that you are passing is not valid - either you're trying to call the setOnClickListener before you call setContentView, or the ID you are passing to findViewById has a typo or simply does not exist in the XML layout file.
Some more information, such as the code to your MainActivity and the layout file, would be useful to determine the exact cause of your problem.
Yes you're right, i forgot to specify the ID for the editText and Button, that is why it wasnt possible to find them ID on XML. So i've set it up and reloaded the project and it is running smoothly now. Thanks guys for the support.
"As the error states, you're trying to set an onClickListener on a Button that does not exist (returns null). To simplify, when you're defining your Button, you call findViewById to associate the Button in Java with an XML element, but the ID that you are passing is not valid. by: Timothy Langer".

how to fix google+ login connection in android?

Hi I'm android beginner
My code had worked a few days ago , suddenly there was problem
How did these errors come from?
Error log
05-18 11:01:52.756 710-722/? E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15401)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2512)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:685)
at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:275)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
....
05-18 11:01:52.796 748-748/com.buttering.roler E/Login_Activity: Connection to Play Services Failed, error: 4, reason: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{426e34f0: android.os.BinderProxy#423cbdb8}, message=null}
05-18 11:01:52.796 710-1728/? E/Parcel: Class not found when unmarshalling: com.google.android.gms.common.api.Scope
java.lang.ClassNotFoundException: com.google.android.gms.common.api.Scope
at java.lang.Class.classForName(Native Method)
it clearly say
Connection to Play Services Failed, error: 4, reason: ConnectionResult{statusCode=SIGN_IN_REQUIRED
SIGNIN_REQUIRED
public static final int SIGN_IN_REQUIRED
The client attempted to connect to the service but the user is not
signed in. The client may choose to continue without using the API.
Alternately, if hasResolution() returns true the client may call
startResolutionForResult(Activity, int) to prompt the user to sign in.
After the sign in activity returns with RESULT_OK further attempts
should succeed.
Constant Value: 4

java.lang.VerifyError when downloading data with jsoup in Android N

I compiled my Android app for the new Android N version and then tried to test it on an emulator. It runs normally until I try to download and parse some website data using the "jsoup" library. Then I get this java.lang.VerifyError:
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.masrepus.vplanapp, PID: 6584
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.VerifyError: Verifier rejected class org.jsoup.parser.HtmlTreeBuilderState$7: boolean org.jsoup.parser.HtmlTreeBuilderState$7.process(org.jsoup.parser.Token, org.jsoup.parser.HtmlTreeBuilder) failed to verify: boolean org.jsoup.parser.HtmlTreeBuilderState$7.process(org.jsoup.parser.Token, org.jsoup.parser.HtmlTreeBuilder): [0x140B] Invalid reg type for array index (Reference: org.jsoup.nodes.Node[]) (declaration of 'org.jsoup.parser.HtmlTreeBuilderState$7' appears in /data/app/com.masrepus.vplanapp-2/base.apk)
at org.jsoup.parser.HtmlTreeBuilderState.<clinit>(HtmlTreeBuilderState.java:246)
at org.jsoup.parser.HtmlTreeBuilder.parse(HtmlTreeBuilder.java:53)
at org.jsoup.parser.Parser.parseInput(Parser.java:30)
at org.jsoup.helper.DataUtil.parseByteData(DataUtil.java:81)
at org.jsoup.helper.HttpConnection$Response.parse(HttpConnection.java:517)
at org.jsoup.helper.HttpConnection.post(HttpConnection.java:174)
at com.masrepus.vplanapp.network.AsyncDownloader.updateAvailableFilesList(AsyncDownloader.java:961)
at com.masrepus.vplanapp.network.AsyncDownloader.downloadVplan(AsyncDownloader.java:237)
at com.masrepus.vplanapp.network.AsyncDownloader.doInBackground(AsyncDownloader.java:135)
at com.masrepus.vplanapp.network.AsyncDownloader.doInBackground(AsyncDownloader.java:113)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
at java.lang.Thread.run(Thread.java:761) 
While researching on VerifyErrors, I came across some solutions, like cleaning the project build folder. But those solutions didn't help.
What I am wondering is, what [0x140B] Invalid reg type for array index means. This may be the thing I have to resolve, but I don't know how.
Edit:
So I dove a bit deeper into the problem and located the crash inside the block named "InBody" in org.jsoup.parser.HtmlTreeBuilderState, lines 244-759. I don't know why, but when I set breakpoints there, the program never stops there, so I have no clue at which exact position inside this block the crash happens. But as the error message speaks of some sort of array index, I figured it might be one of the 6 for-loops I found that have something to do with the data type "Element": They are at lines 305, 388, 561, 582, 602 and 640
Disable jack.
I got the same error when I enable jack. I disabled jack and compiled, no error. Then I copied jsoup source code to my project folder, enabled jack and compiled, no error. So I think it is a bug of jill, the tool to convert *.class to *.jack.

Categories

Resources