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

java.lang.StackOverflowError: stack size 8MB 在打印 android.app.job.JobParameters 对象的时候出现 #54

Open
pythoncat1024 opened this issue Oct 26, 2018 · 0 comments

Comments

@pythoncat1024
Copy link

LogUtils.w(jobParameters);

异常:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.pycat.jobscheduler, PID: 18263
    java.lang.StackOverflowError: stack size 8MB
        at java.util.ArrayList.<init>(ArrayList.java:158)
        at java.util.Formatter.parse(Formatter.java:2511)
        at java.util.Formatter.format(Formatter.java:2472)
        at java.util.Formatter.format(Formatter.java:2426)
        at java.util.Formatter.formatString(Formatter.java:4533)
        at java.lang.String.format(String.java:2636)
        at com.apkfuns.logutils.utils.ObjectUtil.getClassFields(ObjectUtil.java:130)
        at com.apkfuns.logutils.utils.ObjectUtil.objectToString(ObjectUtil.java:63)
        at com.apkfuns.logutils.utils.ObjectUtil.objectToString(ObjectUtil.java:25)
        at com.apkfuns.logutils.parser.ReferenceParse.parseString(ReferenceParse.java:22)
        at com.apkfuns.logutils.parser.ReferenceParse.parseString(ReferenceParse.java:11)
        at com.apkfuns.logutils.utils.ObjectUtil.objectToString(ObjectUtil.java:54)
        at com.apkfuns.logutils.utils.ObjectUtil.getClassFields(ObjectUtil.java:125)
        at com.apkfuns.logutils.utils.ObjectUtil.objectToString(ObjectUtil.java:63)
        at com.apkfuns.logutils.utils.ObjectUtil.objectToString(ObjectUtil.java:25)
        at com.apkfuns.logutils.parser.ReferenceParse.parseString(ReferenceParse.java:22)
        at com.apkfuns.logutils.parser.ReferenceParse.parseString(ReferenceParse.java:11)
        at com.apkfuns.logutils.utils.ObjectUtil.objectToString(ObjectUtil.java:54)
        at com.apkfuns.logutils.utils.ObjectUtil.getClassFields(ObjectUtil.java:125)

从我 debug 跟踪来看,是代码在 logutils 里面的好几个方法里面来回执行,似乎是陷入了调用死循环里面。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant