RadaeePDF.com :: Topic: OutOfMemory and NullPointException in PDFView (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: OutOfMemory and NullPointException in PDFView

OutOfMemory and NullPointException in PDFView 2 years 11 months ago #8176

  • Mobile
  • Mobile's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
  • Karma: 0
We got two problems when using your PDF view, please give us some advice.

1. OutOfMemoryError log

12-12 16:02:45.765: E/AndroidRuntime(5887): FATAL EXCEPTION: main
12-12 16:02:45.765: E/AndroidRuntime(5887): java.lang.OutOfMemoryError
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.graphics.Bitmap.nativeCreate(Native Method)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.graphics.Bitmap.createBitmap(Bitmap.java:718)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.graphics.Bitmap.createBitmap(Bitmap.java:695)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.graphics.Bitmap.createBitmap(Bitmap.java:662)
12-12 16:02:45.765: E/AndroidRuntime(5887): at com.radaee.view.PDFVPage.CreateBmp(PDFVPage.java:235)
12-12 16:02:45.765: E/AndroidRuntime(5887): at com.radaee.view.PDFView.motionNormal(PDFView.java:678)
12-12 16:02:45.765: E/AndroidRuntime(5887): at com.radaee.view.PDFView.vTouchEvent(PDFView.java:716)
12-12 16:02:45.765: E/AndroidRuntime(5887): at com.radaee.reader.PDFReader.onTouchEvent(PDFReader.java:1394)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.View.dispatchTouchEvent(View.java:7669)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2397)
12-12 16:02:45.765: E/AndroidRuntime(5887): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2134)
12-12 16:02:45.765: E/AndroidRuntime(5887): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2283)
12-12 16:02:45.765: E/AndroidRuntime(5887): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1578)


2. NullPointerException log

NullPointerException when Iam trying to rotate screen and/or zoom pdfview
12-18 14:14:41.566: E/MessageQueue-JNI(6730): java.lang.NullPointerException
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at com.radaee.view.PDFViewThumb.vOnFling(PDFViewThumb.java:153)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at com.radaee.view.PDFView$PDFGestureListener.onFling(PDFView.java:431)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.GestureDetector.onTouchEvent(GestureDetector.java:1447)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at com.radaee.view.PDFView.motionNormal(PDFView.java:550)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at com.radaee.view.PDFView.vTouchEvent(PDFView.java:656)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at com.radaee.util.PDFThumbView.onTouchEvent(PDFThumbView.java:75)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.View.dispatchTouchEvent(View.java:8107)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2144)
12-18 14:14:41.566: E/MessageQueue-JNI(6730): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2411)
The administrator has disabled public write access.

OutOfMemory and NullPointException in PDFView 2 years 11 months ago #8182

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
first issue mosyly caused by some un-released objects.
u shall invoke codes:

PDFThumbView.thumbClose();
PDFReader.PDFClose();
Document.Close();

to release memories, when Activity destroyed.

second mostly caused by not init PDFThumbView object.
using PDFThumbView.thumbOpen() to init.
The administrator has disabled public write access.
Powered by Kunena Forum