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

NullPointerException & Warning #64

Closed
oneenam opened this issue Sep 13, 2016 · 7 comments
Closed

NullPointerException & Warning #64

oneenam opened this issue Sep 13, 2016 · 7 comments
Assignees
Labels

Comments

@oneenam
Copy link

oneenam commented Sep 13, 2016

As last time on issue #62 you explained now using without resume, pause and clean method. Now a days sometime suddenly app goes down because of this exception:

FATAL EXCEPTION: main java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference at tv.teads.utils.DeviceUtility.getAppDeviceFamily(Unknown Source) at tv.teads.sdk.publisher.BaseTeadsVideo$1.interceptPostRequest(BaseTeadsVideo.java:98) at tv.teads.logger.RemoteLog.a(Unknown Source) at tv.teads.logger.RemoteLog.sendEvent(Unknown Source) at tv.teads.sdk.publisher.BaseTeadsAd.adDidCollapse(BaseTeadsAd.java:616) at tv.teads.sdk.adContent.video.VideoAdContent.q(VideoAdContent.java:497) at tv.teads.sdk.adContainer.InReadTopAdContainer$3.onAnimationEnd(InReadTopAdContainer.java:201) at android.view.animation.Animation$3.run(Animation.java:376) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

and this warning showing sometime when closing activity :(

MessageQueue: Handler (tv.teads.exoplayer.upstream.Loader$LoadTask) {dcce0ff} sending message to a Handler on a dead thread java.lang.IllegalStateException: Handler (tv.teads.exoplayer.upstream.Loader$LoadTask) {dcce0ff} sending message to a Handler on a dead thread at android.os.MessageQueue.enqueueMessage(MessageQueue.java:543) at android.os.Handler.enqueueMessage(Handler.java:631) at android.os.Handler.sendMessageAtTime(Handler.java:600) at android.os.Handler.sendMessageDelayed(Handler.java:570) at android.os.Handler.sendEmptyMessageDelayed(Handler.java:534) at android.os.Handler.sendEmptyMessage(Handler.java:519) at tv.teads.exoplayer.upstream.Loader$LoadTask.run(Loader.java:212) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

@HugoGresse
Copy link
Contributor

HugoGresse commented Sep 13, 2016

Can you switch your call to Teads from TeadsVideo to TeadsAd as TeadsVideo is depcrecated and the issue may be solved using TeadsAd. I'm waiting for your feedback to consider the issue.

About the warning it's an issue with ExoPlayer that we used, we'll update Exoplayer soon, this will maybe remove the warning.

@oneenam
Copy link
Author

oneenam commented Sep 13, 2016

moved to TeadsAd, now got this 2 crash though only once. using version 2.2.10.

thanks

Activity (main activity name) has leaked ServiceConnection tv.teads.sdk.util.chromeTabs.ServiceConnection@422c4160 that was originally bound here android.app.ServiceConnectionLeaked: Activity (main activity name) has leaked ServiceConnection tv.teads.sdk.util.chromeTabs.ServiceConnection@422c4160 that was originally bound here at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:970) at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:864) at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1786) at android.app.ContextImpl.bindService(ContextImpl.java:1769) at android.content.ContextWrapper.bindService(ContextWrapper.java:536) at android.support.customtabs.CustomTabsClient.bindCustomTabsService(CustomTabsClient.java:64) at tv.teads.sdk.util.chromeTabs.ChromeCustomManager.a(ChromeCustomManager.java:62) at tv.teads.sdk.util.chromeTabs.ChromeCustomManager.<init>(ChromeCustomManager.java:53) at tv.teads.sdk.adContent.FullNativeVideoAdContent.a(FullNativeVideoAdContent.java:39) at tv.teads.sdk.publisher.BaseTeadsAd$3.onSuccess(BaseTeadsAd.java:193) at tv.teads.adserver.AdServerClient$6.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5584) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method)

FATAL EXCEPTION: OkHttp Dispatcher java.lang.NullPointerException at tv.teads.teadsevent.a.b.c(Unknown Source) at tv.teads.teadsevent.service.EventService.c(Unknown Source) at tv.teads.teadsevent.service.EventService.b(Unknown Source) at tv.teads.teadsevent.service.EventService.a(Unknown Source) at tv.teads.teadsevent.service.EventService$1.onResponse(Unknown Source) at tv.teads.network.okhttp.OkHttpNetworkCall$1.onResponse(OkHttpNetworkCall.java:41) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)

@github-benjamin-volland
Copy link
Contributor

Have you a pattern to reproduce this crash?

@oneenam
Copy link
Author

oneenam commented Sep 14, 2016

For activity and fragment both case it happens when I open the ad in big screen and close or when I close the activity and come back to fragment onResume mode. Now its not regular case like it was before. Now also I am not getting the warning MessageQueue: Handler (tv.teads.exoplayer.upstream.Loader$LoadTask) {dcce0ff} sending message to a Handler on a dead thread which was regular before too.

let me know if u need more info.

thanks

@github-benjamin-volland
Copy link
Contributor

The two bugs are not related, I didn't succed to reproduce this two crash. For the first do you call mTeadsAd.onPause() in your Activity or fragment onPause() method?

@oneenam
Copy link
Author

oneenam commented Sep 14, 2016

for fragment i am using mTeadsAd.onPause() and for activity no, but for activity i am using clean because my activity opening from fragment.

@github-benjamin-volland
Copy link
Contributor

I fixed the second crash, it will be available in the next release the 2.2.12 before the end of this week. For the first, I didn't succed to reproduce it, if it will happen with this new release, please open a new issue. For the warning, it come from our exoplayer version, you can have more information here google/ExoPlayer#426, I will upgrade to 2.x in the new release

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

No branches or pull requests

3 participants