Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在Android 6设备中还是有StackOverflowError问题 #574

Open
panyingdaoz opened this issue Jun 27, 2024 · 3 comments
Open

在Android 6设备中还是有StackOverflowError问题 #574

panyingdaoz opened this issue Jun 27, 2024 · 3 comments
Labels
type: bug Existing feature doesn't work correctly

Comments

@panyingdaoz
Copy link

Describe the bug
A clear and concise description of what the bug is.

To reproduce
Code snippet to reproduce the behavior:

System.out.println("Hello world");

PDF example
Link or attach a PDF demonstrating the issue

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what happened instead.

Environment details:

  • PdfBox-Android version: [e.g. 2.0.27.0]
  • Android API version: [e.g. API 23]

Additional context
Add any other context about the problem here.

刚刚开始还正常,使用模版导出基础后就每次都会出现StackOverflowError错误

@panyingdaoz panyingdaoz added the type: bug Existing feature doesn't work correctly label Jun 27, 2024
@panyingdaoz
Copy link
Author

当前使用源码跑也一样,错误如下:2024-06-27 11:31:37.568 26762-26762 AndroidRuntime com.tom_roush.pdfbox.sample E FATAL EXCEPTION: main
Process: com.tom_roush.pdfbox.sample, PID: 26762
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.view.View$DeclaredOnClickListener.onClick(View.java:4458)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21153)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
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:742)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.view.View$DeclaredOnClickListener.onClick(View.java:4453)
at android.view.View.performClick(View.java:5204) 
at android.view.View$PerformClick.run(View.java:21153) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
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:742) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632) 
Caused by: java.lang.StackOverflowError: stack size 8MB
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:161)
at java.io.RandomAccessFile.read(RandomAccessFile.java:272)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:115)
at com.tom_roush.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFi

@Tlanglord
Copy link

Describe the bug A clear and concise description of what the bug is.

To reproduce Code snippet to reproduce the behavior:

System.out.println("Hello world");

PDF example Link or attach a PDF demonstrating the issue

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior A clear and concise description of what happened instead.

Environment details:

  • PdfBox-Android version: [e.g. 2.0.27.0]
  • Android API version: [e.g. API 23]

Additional context Add any other context about the problem here.

刚刚开始还正常,使用模版导出基础后就每次都会出现StackOverflowError错误

此项目貌似没人维护了

@THausherr
Copy link

Please add minimum code that reproduces the behaviour and the PDF file. I strongly believe that calling System.out.println("Hello world"); does not cause a stack overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Existing feature doesn't work correctly
Projects
None yet
Development

No branches or pull requests

3 participants