RadaeePDF.com :: Topic: App crashes after zooming and moving in landscape (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Here you should submit your bug reports with logcat.

TOPIC: App crashes after zooming and moving in landscape

App crashes after zooming and moving in landscape 11 months 4 weeks ago #11214

  • jorisk
  • jorisk's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 1
Hi,

There is a bug with PDFViewer 3.7 for Android.
I tried the demo code with the "def_view = 6" in the default_config() method, but the app crashes when I move after zooming on a page in landscape mode (2 pages). Here is the log if it can help.

Looks like a problem in PDFReader.java, in the method onTouchEvent(MotionEvent event) because the returned m_view.vTouchEvent(event) seems to be null.

How can I resolve this?

Thanks by advance.
09-20 15:51:35.363 29405-29405/com.radaee.reader E/InputEventReceiver: Exception dispatching input event.
09-20 15:51:35.363 29405-29405/com.radaee.reader E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
09-20 15:51:35.366 29405-29405/com.radaee.reader E/MessageQueue-JNI: java.lang.NullPointerException: Attempt to read from null array
                                                                         at com.radaee.view.PDFViewDual.vOnFling(PDFViewDual.java:460)
                                                                         at com.radaee.view.PDFView$PDFGestureListener.onFling(PDFView.java:493)
                                                                         at android.view.GestureDetector.onTouchEvent(GestureDetector.java:650)
                                                                         at com.radaee.view.PDFView.motionNormal(PDFView.java:616)
                                                                         at com.radaee.view.PDFView.vTouchEvent(PDFView.java:727)
                                                                         at com.radaee.reader.PDFReader.onTouchEvent(PDFReader.java:1443)
                                                                         at android.view.View.dispatchTouchEvent(View.java:9300)
                                                                         at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                         at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                         at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                         at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                         at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403)
                                                                         at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737)
                                                                         at android.app.Activity.dispatchTouchEvent(Activity.java:2771)
                                                                         at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
                                                                         at android.view.View.dispatchPointerEvent(View.java:9520)
                                                                         at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
                                                                         at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
                                                                         at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                         at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
                                                                         at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
                                                                         at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
                                                                         at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
                                                                         at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
                                                                         at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                         at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
                                                                         at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
                                                                         at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
                                                                         at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                         at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
                                                                         at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
                                                                         at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
                                                                         at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6025)
                                                                         at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
                                                                         at android.os.MessageQueue.nativePollOnce(Native Method)
                                                                         at android.os.MessageQueue.next(MessageQueue.java:323)
                                                                         at android.os.Looper.loop(Looper.java:135)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-20 15:51:35.366 29405-29405/com.radaee.reader D/AndroidRuntime: Shutting down VM
09-20 15:51:35.367 29405-29405/com.radaee.reader E/AndroidRuntime: FATAL EXCEPTION: main
                                                                   Process: com.radaee.reader, PID: 29405
                                                                   java.lang.NullPointerException: Attempt to read from null array
                                                                       at com.radaee.view.PDFViewDual.vOnFling(PDFViewDual.java:460)
                                                                       at com.radaee.view.PDFView$PDFGestureListener.onFling(PDFView.java:493)
                                                                       at android.view.GestureDetector.onTouchEvent(GestureDetector.java:650)
                                                                       at com.radaee.view.PDFView.motionNormal(PDFView.java:616)
                                                                       at com.radaee.view.PDFView.vTouchEvent(PDFView.java:727)
                                                                       at com.radaee.reader.PDFReader.onTouchEvent(PDFReader.java:1443)
                                                                       at android.view.View.dispatchTouchEvent(View.java:9300)
                                                                       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
                                                                       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
                                                                       at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403)
                                                                       at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737)
                                                                       at android.app.Activity.dispatchTouchEvent(Activity.java:2771)
                                                                       at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
                                                                       at android.view.View.dispatchPointerEvent(View.java:9520)
                                                                       at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
                                                                       at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
                                                                       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
                                                                       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
                                                                       at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
                                                                       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
                                                                       at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
                                                                       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
                                                                       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
                                                                       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
                                                                       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
                                                                       at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
                                                                       at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
                                                                       at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
                                                                       at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6025)
                                                                       at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
                                                                       at android.os.MessageQueue.nativePollOnce(Native Method)
                                                                       at android.os.MessageQueue.next(MessageQueue.java:323)
                                                                       at android.os.Looper.loop(Looper.java:135)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
The topic has been locked.

App crashes after zooming and moving in landscape 11 months 4 weeks ago #11216

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
it is using old view class.
now we recommand PDFLayout classes,
which module name is "RDPDFReader", support infinite zoom scales.
The topic has been locked.
The following user(s) said Thank You: jorisk

App crashes after zooming and moving in landscape 11 months 4 weeks ago #11217

  • jorisk
  • jorisk's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 1
Thanks for the fast answer. Is it possible to customize the PDFLayoutView class as I have done for the PDFReaderAct class? For example, displaying thumbs on click?
The topic has been locked.

App crashes after zooming and moving in landscape 11 months 4 weeks ago #11218

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 676
  • Thank you received: 40
  • Karma: 18
Yes, For thumbs with latest beta version you can set the variable mNavigationMode in PDFViewController as follows:
mNavigationMode = NAVIGATION_THUMBS;

OR in PDFViewAct as:
m_controller.setNavigationMode(PDFViewController.NAVIGATION_THUMBS);
Last Edit: 11 months 4 weeks ago by nermeen.
The topic has been locked.
The following user(s) said Thank You: jorisk

App crashes after zooming and moving in landscape 11 months 4 weeks ago #11219

  • jorisk
  • jorisk's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 1
OK, thank you!
The topic has been locked.
Powered by Kunena Forum