endigo / flutter_pdfview

PDF view for Flutter
https://pub.dev/packages/flutter_pdfview
MIT License
264 stars 218 forks source link

NullPointerException #252

Closed duki97 closed 1 month ago

duki97 commented 1 year ago

Sometimes I get some errors. The app doesn't crash and shows the PDF, but these errors are displayed in the console. It doesn't happen always, only sometimes randomly. 1.------------------------------------------ E/FrameEvents( 5755): updateAcquireFence: Did not find frame. D/EGL_emulation( 5755): app_time_stats: avg=516.62ms min=13.77ms max=1963.59ms count=4 E/FrameEvents( 5755): updateAcquireFence: Did not find frame. E/com.shockwave.pdfium.PdfiumCore( 5755): mContext may be null W/System.err( 5755): java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference W/System.err( 5755): at com.shockwave.pdfium.PdfiumCore.renderPageBitmap(PdfiumCore.java:312) W/System.err( 5755): at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:295) W/System.err( 5755): at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109) W/System.err( 5755): at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66) W/System.err( 5755): at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err( 5755): at android.os.Looper.loopOnce(Looper.java:201) W/System.err( 5755): at android.os.Looper.loop(Looper.java:288) W/System.err( 5755): at android.os.HandlerThread.run(HandlerThread.java:67) 2.------------------------------------------ E/FrameEvents(10208): updateAcquireFence: Did not find frame. D/com.shockwave.pdfium.PdfiumCore(10208): Starting PdfiumAndroid 1.9.2 I/PlatformViewsController(10208): Hosting view in view hierarchy for platform view: 58 E/FrameEvents(10208): updateAcquireFence: Did not find frame. W/Parcel (10208): Expecting binder but got null! 2 E/FrameEvents(10208): updateAcquireFence: Did not find frame. E/com.shockwave.pdfium.PdfiumCore(10208): mContext may be null W/System.err(10208): java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference W/System.err(10208): at com.shockwave.pdfium.PdfiumCore.renderPageBitmap(PdfiumCore.java:312) W/System.err(10208): at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:295) W/System.err(10208): at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109) W/System.err(10208): at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66) W/System.err(10208): at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err(10208): at android.os.Looper.loopOnce(Looper.java:210) W/System.err(10208): at android.os.Looper.loop(Looper.java:299) W/System.err(10208): at android.os.HandlerThread.run(HandlerThread.java:67) D/com.shockwave.pdfium.PdfiumCore(10208): Starting PdfiumAndroid 1.9.2 I/PlatformViewsController(10208): Hosting view in view hierarchy for platform view: 59 E/FrameEvents(10208): updateAcquireFence: Did not find frame. W/Parcel (10208): Expecting binder but got null! 32 E/FrameEvents(10208): updateAcquireFence: Did not find frame. D/com.shockwave.pdfium.PdfiumCore(10208): Starting PdfiumAndroid 1.9.2 I/PlatformViewsController(10208): Hosting view in view hierarchy for platform view: 60 E/FrameEvents(10208): updateAcquireFence: Did not find frame. W/Parcel (10208): Expecting binder but got null! E/FrameEvents(10208): updateAcquireFence: Did not find frame. E/com.shockwave.pdfium.PdfiumCore(10208): mContext may be null W/System.err(10208): java.lang.NullPointerException: Attempt to read from field 'java.util.Map com.shockwave.pdfium.PdfDocument.mNativePagesPtr' on a null object reference in method 'void com.shockwave.pdfium.PdfiumCore.renderPageBitmap(com.shockwave.pdfium.PdfDocument, android.graphics.Bitmap, int, int, int, int, int, boolean)' W/System.err(10208): at com.shockwave.pdfium.PdfiumCore.renderPageBitmap(PdfiumCore.java:312) W/System.err(10208): at com.github.barteksc.pdfviewer.PdfFile.renderPageBitmap(PdfFile.java:295) W/System.err(10208): at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:109) W/System.err(10208): at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:66) W/System.err(10208): at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err(10208): at android.os.Looper.loopOnce(Looper.java:210) W/System.err(10208): at android.os.Looper.loop(Looper.java:299) W/System.err(10208): at android.os.HandlerThread.run(HandlerThread.java:67) D/com.shockwave.pdfium.PdfiumCore(10208): Starting PdfiumAndroid 1.9.2 I/PlatformViewsController(10208): Hosting view in view hierarchy for platform view: 61 E/FrameEvents(10208): updateAcquireFence: Did not find frame. W/Parcel (10208): Expecting binder but got null!.