RadaeePDF.com :: Topic: Android ndk crash: ReferenceTable overflow (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: Android ndk crash: ReferenceTable overflow

Android ndk crash: ReferenceTable overflow 2 years 8 months ago #8226

  • Hewie
  • Hewie's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hello!
I have a problem to use sdk for my project.
I implement a function to get pdf ducument node data use Path class
getNode() function, when I call the function, I got logcat message below(Screenshot)
than my program were crush. It's any solutions to solve this problem?
This is my project informations
Android SDK: 4.4
Device: Asus Nexus7
PDF SDK Version: 2.9.3
Code:
public void TestPath() {
Path path = new Path();
path.MoveTo(0, 0);
int x = 0, y = 0;
Random random = new Random();
for(int i = 0; i < 1025; i++) {
x = random.nextInt(100);
y = random.nextInt(100);
System.out.println("x = " + y + " , " + "y = " + y);
path.LineTo(x, y);
}
path.CurveTo(100, 0, 100, 100, 30, 70);
path.ClosePath();
int cnt = path.GetNodeCount();
int cur = 0;
float point[] = new float[2];
while( cur < cnt )
{
path.GetNode(cur, point); // Error
cur++;
}
Page page = m_doc.GetPage(0);
page.ObjsStart();
Matrix mat = new Matrix( 1, 0, 0, -1, 0, m_doc.GetPageHeight(0) );
page.AddAnnotGlyph(mat, path, 0xFF0000, true);
page.Close();
path.Destroy();
}
Logcat:
12-29 22:56:34.459: W/dalvikvm(31424): JNI: pin count on array 0x432b4bc0 ([F) is now 61
12-29 22:56:34.459: I/System.out(31424): Path: 473 : 60 => 1
12-29 22:56:34.459: I/System.out(31424): 503.26538
12-29 22:56:34.459: I/System.out(31424): 625.3756
12-29 22:56:34.459: W/dalvikvm(31424): JNI: pin count on array 0x432b4bc0 ([F) is now 62
12-29 22:56:34.459: I/System.out(31424): Path: 473 : 61 => 1
12-29 22:56:34.459: I/System.out(31424): 485.00024
12-29 22:56:34.459: I/System.out(31424): 607.18317
12-29 22:56:34.459: W/dalvikvm(31424): JNI: pin count on array 0x432b4bc0 ([F) is now 63
12-29 22:56:34.459: I/System.out(31424): Path: 473 : 62 => 1
12-29 22:56:34.459: I/System.out(31424): 468.0114
12-29 22:56:34.459: I/System.out(31424): 591.6051
12-29 22:56:34.459: W/dalvikvm(31424): JNI: pin count on array 0x432b4bc0 ([F) is now 64
12-29 22:56:34.459: I/System.out(31424): Path: 473 : 63 => 1
12-29 22:56:34.459: I/System.out(31424): 456.5977
12-29 22:56:34.459: I/System.out(31424): 583.4371
12-29 22:56:34.459: W/dalvikvm(31424): JNI: pin count on array 0x432b4bc0 ([F) is now 65
12-29 22:56:34.459: I/System.out(31424): Path: 473 : 64 => 1
12-29 22:56:34.459: I/System.out(31424): 449.6581
12-29 22:56:34.459: I/System.out(31424): 584.03564
12-29 22:56:34.459: W/dalvikvm(31424): ReferenceTable overflow (max=1024)
12-29 22:56:34.459: W/dalvikvm(31424): JNI pinned array reference table (0x792bdac8) dump:
12-29 22:56:34.459: W/dalvikvm(31424): Last 10 entries (of 1024):
12-29 22:56:34.459: W/dalvikvm(31424): 1023: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1022: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1021: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1020: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1019: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1018: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1017: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1016: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1015: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1014: 0x432b4bc0 float[] (2 elements)
12-29 22:56:34.459: W/dalvikvm(31424): Summary:
12-29 22:56:34.459: W/dalvikvm(31424): 1 of byte[] (8192 elements)
12-29 22:56:34.459: W/dalvikvm(31424): 1023 of float[] (2 elements) (4 unique instances)
12-29 22:56:34.459: E/dalvikvm(31424): Failed adding to JNI pinned array ref table (1024 entries)
12-29 22:56:34.459: I/dalvikvm(31424): "main" prio=5 tid=1 RUNNABLE
12-29 22:56:34.459: I/dalvikvm(31424): | group="main" sCount=0 dsCount=0 obj=0x415d0ca8 self=0x414a4418
12-29 22:56:34.459: I/dalvikvm(31424): | sysTid=31424 nice=0 sched=0/0 cgrp=apps handle=1074020692
12-29 22:56:34.459: I/dalvikvm(31424): | state=R schedstat=( 0 0 0 ) utm=864 stm=185 core=1
12-29 22:56:34.459: I/dalvikvm(31424): at com.radaee.pdf.Path.getNode(Native Method)
12-29 22:56:34.459: I/dalvikvm(31424): at com.radaee.pdf.Path.GetNode(Path.java:93)
12-29 22:56:34.459: I/dalvikvm(31424): at com.radaee.reader.PDFReader.AnnotToDrawing(PDFReader.java:1996)
12-29 22:56:34.459: I/dalvikvm(31424): at com.radaee.reader.PDFReader.OutPutMarkUpModel(PDFReader.java:1936)
12-29 22:56:34.459: I/dalvikvm(31424): at cc.nexdoor.standalonepdfreader.PDFReaderActivity$3.onConfirmClick(PDFReaderActivity.java:444)
12-29 22:56:34.459: I/dalvikvm(31424): at cc.nexdoor.ent.cloudconference.ly.utils.DialogUtils$4.onClick(DialogUtils.java:147)
12-29 22:56:34.459: I/dalvikvm(31424): at android.view.View.performClick(View.java:4438)
12-29 22:56:34.459: I/dalvikvm(31424): at android.view.View$PerformClick.run(View.java:18422)
12-29 22:56:34.459: I/dalvikvm(31424): at android.os.Handler.handleCallback(Handler.java:733)
12-29 22:56:34.459: I/dalvikvm(31424): at android.os.Handler.dispatchMessage(Handler.java:95)
12-29 22:56:34.459: I/dalvikvm(31424): at android.os.Looper.loop(Looper.java:136)
12-29 22:56:34.459: I/dalvikvm(31424): at android.app.ActivityThread.main(ActivityThread.java:5001)
12-29 22:56:34.459: I/dalvikvm(31424): at java.lang.reflect.Method.invokeNative(Native Method)
12-29 22:56:34.459: I/dalvikvm(31424): at java.lang.reflect.Method.invoke(Method.java:515)
12-29 22:56:34.459: I/dalvikvm(31424): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
12-29 22:56:34.459: I/dalvikvm(31424): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
12-29 22:56:34.459: I/dalvikvm(31424): at dalvik.system.NativeStart.main(Native Method)
12-29 22:56:34.459: E/dalvikvm(31424): VM aborting
12-29 22:56:34.459: A/libc(31424): Fatal signal 6 (SIGABRT) at 0x00007ac0 (code=-6), thread 31424 (udconference.ly)

Thank you for help.
The administrator has disabled public write access.

Android ndk crash: ReferenceTable overflow 2 years 8 months ago #8251

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 684
  • Thank you received: 40
  • Karma: 18
Our developers will check it and get back to you
The administrator has disabled public write access.
The following user(s) said Thank You: minionion

Android ndk crash: ReferenceTable overflow 2 years 8 months ago #8252

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
OK, fixed, forgot to invoke ReleaseFloatArrayElements
The administrator has disabled public write access.
The following user(s) said Thank You: minionion

Android ndk crash: ReferenceTable overflow 2 years 8 months ago #8259

  • Hewie
  • Hewie's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Thanks for your help!
Our project used PDF SDK Version(2.3.9).
We need get the same Version(2.3.9) fixed solutions.
Could you help us?
My Email : This email address is being protected from spambots. You need JavaScript enabled to view it.
The administrator has disabled public write access.

Android ndk crash: ReferenceTable overflow 2 years 8 months ago #8264

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 684
  • Thank you received: 40
  • Karma: 18
The new version 3.3.4 has a fix for your issue.

Sorry but we cannot apply the fix for the requested version, as it's very old one and the native APIs has been changed significantly since then.
The administrator has disabled public write access.
Powered by Kunena Forum