Getting lot of crashes in Youtube Player API

£可爱£侵袭症+ 提交于 2019-12-07 06:45:01

问题


I have implemented youtube player api in android app.

I get the following crash frequently while playing the video:

08-03 11:18:25.289 15393 15393 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void iqe.a(boolean)' on a null object reference
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at ioy.onFilterTouchEventForSecurity(SourceFile:115)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2091)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2419)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1744)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.app.Activity.dispatchTouchEvent(Activity.java:2771)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2380)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.View.dispatchPointerEvent(View.java:9529)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
08-03 11:18:25.289 15393 15393 E AndroidRuntime:    at android.view.ViewRootImpl$WindowInpu

The problem is that in order to find root cause of crash i need a line number in my code but the crash log in only Google Code.

I have tried to google about the crash in this method :

Attempt to invoke virtual method 'void iqe.a(boolean)' on a null object reference

However, this crash happens sometimes with method isu.a(boolean) instead of iqe.a(boolean).

The Google and StackOverflow does not have any content / information about this crash or method.

I have tried to search for this method in my entire project but this does not result in any result.

Since the crash log does not have any line from my project i feel it very difficult to analyse what is the problem.

When crash occurs:

  1. Play video, new Activity opens. > Press Back Button.
  2. Repeat Step 1 10-20 times.

回答1:


Use intent in backpress method

Intent intent=new Intent(Playlist.this,MainActivity.class);
    startActivity(intent);
    finish();


来源:https://stackoverflow.com/questions/45857554/getting-lot-of-crashes-in-youtube-player-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!