运行过程中偶尔会报空指针异常:
FATAL EXCEPTION: DFM Cache-Building Thread
Process: com.rongyan.aikanvideo, PID: 21125
java.lang.NullPointerException: Attempt to read from field 'int master.flame.danmaku.danmaku.model.GlobalFlagValues.FILTER_RESET_FLAG' on a null object reference
at master.flame.danmaku.danmaku.model.BaseDanmaku.hasPassedFilter(BaseDanmaku.java:281)
at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler$1.accept(CacheManagingDrawTask.java:729)
at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler$1.accept(CacheManagingDrawTask.java:723)
at master.flame.danmaku.danmaku.model.android.Danmakus.forEach(Danmakus.java:295)
at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler.preMeasure(CacheManagingDrawTask.java:723)
at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler.prepareCaches(CacheManagingDrawTask.java:747)
at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler.handleMessage(CacheManagingDrawTask.java:563)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.os.HandlerThread.run(HandlerThread.java:61)
运行过程中偶尔会报空指针异常: FATAL EXCEPTION: DFM Cache-Building Thread Process: com.rongyan.aikanvideo, PID: 21125 java.lang.NullPointerException: Attempt to read from field 'int master.flame.danmaku.danmaku.model.GlobalFlagValues.FILTER_RESET_FLAG' on a null object reference at master.flame.danmaku.danmaku.model.BaseDanmaku.hasPassedFilter(BaseDanmaku.java:281) at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler$1.accept(CacheManagingDrawTask.java:729) at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler$1.accept(CacheManagingDrawTask.java:723) at master.flame.danmaku.danmaku.model.android.Danmakus.forEach(Danmakus.java:295) at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler.preMeasure(CacheManagingDrawTask.java:723) at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler.prepareCaches(CacheManagingDrawTask.java:747) at master.flame.danmaku.controller.CacheManagingDrawTask$CacheManager$CacheHandler.handleMessage(CacheManagingDrawTask.java:563) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.os.HandlerThread.run(HandlerThread.java:61)
然后我通过一个自定义解析器解析弹幕,我跟踪到解析器成功执行danmakus.addItem(item);代码之后在播放器中看不见弹幕出现不知道哪儿出了问题。。