gpt4 book ai didi

java - JSON 数组反序列化导致 Dalvik VM 崩溃

转载 作者:行者123 更新时间:2023-12-01 05:57:04 30 4
gpt4 key购买 nike

我有一些代码从我的服务器获取 JSON 数组并最初将其存储为字符串。这一切都工作正常,直到我尝试使用谷歌的 gson fromJson 方法对其进行反序列化。 LogCat 吐出错误:

04-08 17:46:35.163: 错误/dalvikvm(401): 无法收缩堆栈:curFrame 位于保留区域 (0x41049000 0x410491c4)

导致错误的我的代码是:

String[] results = gson.fromJson(returnString, String[].class);

任何人都可以阐明我做错了什么吗?

干杯,山姆

最佳答案

您可能遇到以下未决问题:http://code.google.com/p/android/issues/detail?id=6245 .

The stack is supposed to expand briefly while the StackOverflowError is being handled, then shrink back down afterward. The problem is that an exception is being thrown during the SOE processing, and we're trying to shrink the stack down when that second exception finishes, instead of waiting until we're wrapping up the SOE itself.

There's also enough going on during the SOE recovery that an extra 512 bytes of stack isn't enough, and it'll encounter a double-SOE.

您尝试反序列化的 JSON 有多大?

关于java - JSON 数组反序列化导致 Dalvik VM 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2598363/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com