geometer / FBReaderJ

Official FBReaderJ project repository
http://www.fbreader.org/FBReaderJ/
1.83k stars 801 forks source link

[Bug] PDF Books fail to open in Premium v2.7.6 #431

Closed cajun-rat closed 7 years ago

cajun-rat commented 7 years ago

Android has just auto-updated me to the latest version of FBReader Premium, and it now has problems opening PDF files.

I'm running a Nvidia Shield and Android 6.0.1. Epub files open fine, but PDF documents give a black screen, and the only way to go back is to swipe down from the top edge.

Here is the output of adb logcat when I try and open a PDF:

10-26 21:00:50.985   261   261 D Raydium_ts_main: ## Report rate in 10 seconds =1445 
10-26 21:00:51.062   682   693 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.fbreader cmp=com.fbreader/.android.fbreader.FBReader bnds=[25,433][255,768]} from uid 10096 on display 0
10-26 21:00:51.071   237   674 D NetlinkEvent: Unknown ND option type 31
10-26 21:00:51.077  1088  1088 D ShieldTech_Services: Starting service
10-26 21:00:51.104   682   700 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1287 com.nvidia.ControllerMapper.MapperClient$ServiceClient.connect:849 com.nvidia.ControllerMapper.MapperClient.<init>:111 android.view.ViewRootImpl.handleWindowActivated:905 android.view.ViewRootImpl$ViewRootHandler.handleMessage:3620 
10-26 21:00:51.236  5332  5332 I LicenseChecker: Using cached license response
10-26 21:00:51.260  5393  5393 D FBReader.Sync: stopped
10-26 21:00:51.313  1088  1088 D RSMouse : mFeatureEnabled=true  mPackageEnabled=true
10-26 21:00:51.330   682   786 I ActivityManager: START u0 {act=com.fbreader.action.plugin.VIEW flg=0x10000 cmp=com.fbreader/.android.fbreader.formats.FBReaderExt (has extras)} from uid 10111 on display 0
10-26 21:00:51.363   682   700 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1287 com.nvidia.ControllerMapper.MapperClient$ServiceClient.connect:849 com.nvidia.ControllerMapper.MapperClient.<init>:111 android.view.ViewRootImpl.handleWindowActivated:905 android.view.ViewRootImpl$ViewRootHandler.handleMessage:3620 
10-26 21:00:51.367  1088  1088 D ShieldTech_Services: Starting service
10-26 21:00:51.575  5422  5422 I LicenseChecker: Using cached license response
10-26 21:00:51.579  5422  5422 E VIEWHOLDER: CREATEcom.fbreader.android.fbreader.formats.FBReaderExt@e9aab98
10-26 21:00:51.584   682  1181 W ActivityManager: Unable to start service Intent { act=com.fbreader.action.sync.STOP pkg=com.fbreader } U=0: not found
10-26 21:00:51.614  1088  1088 D RSMouse : mFeatureEnabled=true  mPackageEnabled=true
10-26 21:00:51.683   682   700 I ActivityManager: Displayed com.fbreader/.android.fbreader.formats.FBReaderExt: +247ms (total +602ms)
10-26 21:00:51.690 25319 25319 D QuickMenuService: IsTopFullScreen: true
10-26 21:00:51.696  1088  1088 D RSMouse : mFeatureEnabled=true  mPackageEnabled=true
10-26 21:00:51.738  5422  5422 W InputMethodManager: InputMethodSession is not set properly for android.widget.ListView{4c7ff59 VFED.VC.. .F....ID 0,128-480,1824 #7f0e0178 app:id/main_drawer_menu}, so force new focus to establish.
10-26 21:00:54.559   237   674 D NetlinkEvent: Unknown ND option type 31
10-26 21:00:57.883   237   674 D NetlinkEvent: Unknown ND option type 31
10-26 21:01:00.949   237   674 D NetlinkEvent: Unknown ND option type 31
10-26 21:01:01.010   261   261 D Raydium_ts_main: ## Report rate in 10 seconds =927 
10-26 21:01:04.383   237   674 D NetlinkEvent: Unknown ND option type 31

If I open a epub then try and switch to a PDF then I get this error trace

10-26 21:08:53.687   682   786 I ActivityManager: START u0 {act=com.fbreader.action.VIEW flg=0x4000000 pkg=com.fbreader cmp=com.fbreader/.android.fbreader.FBReader (has extras)} from uid 10111 on display 0
10-26 21:08:53.694   682  6894 W ActivityManager: Duplicate finish request for ActivityRecord{9a8a908 u0 com.fbreader/org.fbreader.plugin.library.LibraryActivity t1914 f}
10-26 21:08:53.719  1088  1088 D ShieldTech_Services: Starting service
10-26 21:08:53.732  6778  6778 D FBReader.Sync: stopped
10-26 21:08:53.774  1088  1088 D RSMouse : mFeatureEnabled=true  mPackageEnabled=true
10-26 21:08:53.797   237   674 D NetlinkEvent: Unknown ND option type 31
10-26 21:08:53.866  6306  6306 D QuickMenuService: IsTopFullScreen: true
10-26 21:08:53.888  6716  6843 I System  : Loaded time zone names for "en" in 80ms (79ms in ICU)
10-26 21:08:53.901   682  1155 I ActivityManager: START u0 {act=com.fbreader.action.plugin.VIEW flg=0x10000 cmp=com.fbreader/.android.fbreader.formats.FBReaderExt (has extras)} from uid 10111 on display 0
10-26 21:08:53.902  6809  6824 D OpenGLRenderer: endAllStagingAnimators on 0xa04a9900 (RippleDrawable) with handle 0x9e0b6310
10-26 21:08:53.939   682  1165 I ActivityManager: Start proc 6848:com.fbreader:formats/u0a111 for activity com.fbreader/.android.fbreader.formats.FBReaderExt
10-26 21:08:53.947   682   700 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1287 com.nvidia.ControllerMapper.MapperClient$ServiceClient.connect:849 com.nvidia.ControllerMapper.MapperClient.<init>:111 android.view.ViewRootImpl.handleWindowActivated:905 android.view.ViewRootImpl$ViewRootHandler.handleMessage:3620 
10-26 21:08:53.949  1088  1088 D ShieldTech_Services: Starting service
10-26 21:08:53.998  6306  6306 D QuickMenuService: IsTopFullScreen: false
10-26 21:08:54.138  6848  6848 W art     : Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
10-26 21:08:54.251  6848  6848 I LicenseChecker: Using cached license response
10-26 21:08:54.263  6848  6848 E VIEWHOLDER: CREATEcom.fbreader.android.fbreader.formats.FBReaderExt@4570531
10-26 21:08:54.287  6848  6868 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
10-26 21:08:54.332   682  6052 W ActivityManager: Unable to start service Intent { act=com.fbreader.action.sync.STOP pkg=com.fbreader } U=0: not found
10-26 21:08:54.352  1088  1088 D RSMouse : mFeatureEnabled=true  mPackageEnabled=true
10-26 21:08:54.366  6848  6870 E linker  : readlink('/proc/self/fd/22') failed: Permission denied [fd=22]
10-26 21:08:54.366  6848  6870 E linker  : warning: unable to get realpath for the library "/data/app/com.fbreader-2/lib/arm/librdpdf.so". Will use given name.
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [fb2]
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [HTML]
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [txt]
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [mobi]
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [ePub]
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [RTF]
10-26 21:08:54.394  6848  6870 W System.err: native plugin: NativeFormatPlugin [msdoc]
10-26 21:08:54.467  6848  6868 I OpenGLRenderer: Initialized EGL, version 1.4
10-26 21:08:54.570  1088  1088 D RSMouse : mFeatureEnabled=true  mPackageEnabled=true
10-26 21:08:54.574  6306  6306 D QuickMenuService: IsTopFullScreen: true
10-26 21:08:54.653   682   700 I ActivityManager: Displayed com.fbreader/.android.fbreader.formats.FBReaderExt: +730ms
10-26 21:08:54.692   682  1148 W WindowManager: Force-removing child win Window{329dc8 u0 PopupWindow:b83f939} from container Window{9cdccb2 u0 com.fbreader/org.fbreader.plugin.library.LibraryActivity}
10-26 21:08:54.698  6809  6809 E WindowManager: 
10-26 21:08:54.698  6809  6809 E WindowManager: android.view.WindowLeaked: Activity org.fbreader.plugin.library.LibraryActivity has leaked window android.widget.PopupWindow$PopupDecorView{66537e2 V.E...... ........ 0,0-1080,810} that was originally added here
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.view.ViewRootImpl.<init>(ViewRootImpl.java:392)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:299)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.widget.PopupWindow.invokePopup(PopupWindow.java:1258)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1032)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.widget.PopupWindow.showAtLocation(PopupWindow.java:995)
10-26 21:08:54.698  6809  6809 E WindowManager:     at org.fbreader.plugin.library.p.a(Unknown Source)
10-26 21:08:54.698  6809  6809 E WindowManager:     at org.fbreader.plugin.library.w.a(Unknown Source)
10-26 21:08:54.698  6809  6809 E WindowManager:     at org.fbreader.plugin.library.au.a(Unknown Source)
10-26 21:08:54.698  6809  6809 E WindowManager:     at org.fbreader.plugin.library.aa.onClick(Unknown Source)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.view.View.performClick(View.java:5198)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.view.View$PerformClick.run(View.java:21147)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.os.Handler.handleCallback(Handler.java:742)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.os.Handler.dispatchMessage(Handler.java:97)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.os.Looper.loop(Looper.java:148)
10-26 21:08:54.698  6809  6809 E WindowManager:     at android.app.ActivityThread.main(ActivityThread.java:5460)
10-26 21:08:54.698  6809  6809 E WindowManager:     at java.lang.reflect.Method.invoke(Native Method)
10-26 21:08:54.698  6809  6809 E WindowManager:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-26 21:08:54.698  6809  6809 E WindowManager:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-26 21:08:54.710   682  1126 W WindowManager: Failed looking up window
10-26 21:08:54.710   682  1126 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@cce7e6b does not exist
10-26 21:08:54.710   682  1126 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8767)
10-26 21:08:54.710   682  1126 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8758)
10-26 21:08:54.710   682  1126 W WindowManager:     at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2710)
10-26 21:08:54.710   682  1126 W WindowManager:     at com.android.server.wm.Session.remove(Session.java:187)
10-26 21:08:54.710   682  1126 W WindowManager:     at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:242)
10-26 21:08:54.710   682  1126 W WindowManager:     at com.android.server.wm.Session.onTransact(Session.java:130)
10-26 21:08:54.710   682  1126 W WindowManager:     at android.os.Binder.execTransact(Binder.java:453)

I've got the android dev. tools available, so I'm happy to try and help debug this.

System Information

# adb shell pm list packages | grep -e geom -e fb
package:com.fbreader
package:org.geometerplus.zlibrary.ui.android
package:org.geometerplus.fbreader.plugin.pdf
# adb shell getprop ro.build.version.release 
6.0.1
cajun-rat commented 7 years ago

This is fixed in v2.7.7, thank you!