2010-04-08 125 views
1

我有一些代碼從我的服務器中獲取JSON數組,並且最初以字符串形式存儲它。這一切工作正常,直到我嘗試使用谷歌的Gson fromJson方法反序列化它。 logcat中吐出的錯誤:JSON數組反序列化正在崩潰Dalvik虛擬機

04-08 17:46:35.163: ERROR/dalvikvm(401): Can't shrink stack: curFrame is in reserved area (0x41049000 0x410491c4)

我的代碼導致該錯誤是:

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

任何人都瞭解什麼我做錯了一些輕?

乾杯, 山姆

回答

0

您可能運行到下面的懸而未決的問題: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有多大?