fastjson在android 17上发生内存溢出

r7s23pms  于 2021-11-27  发布在  Java
关注(0)|答案(1)|浏览(298)

阿里的同事,你们好,这边解析用的是fastjson,最近后台一直有反馈了一个内存溢出的异常,查看我这边的代码,没有发现问题,跟踪了一段时间,发现这个异常一直在android 系统版本为17的机子上出现这个问题。用的fastjson版本是:com.alibaba:fastjson:1.1.52.android以下是异常信息:

{STACK_TRACE=java.lang.OutOfMemoryError
at com.alibaba.fastjson.serializer.SerializeWriter.expandCapacity(alphalauncher:173)
at com.alibaba.fastjson.serializer.SerializeWriter.writeStringWithDoubleQuote(alphalauncher:528)
at com.alibaba.fastjson.serializer.SerializeWriter.writeFieldName(alphalauncher:902)
at com.alibaba.fastjson.serializer.MapSerializer.write(alphalauncher:114)
at com.alibaba.fastjson.serializer.ListSerializer.write(alphalauncher:171)
at com.alibaba.fastjson.serializer.JSONSerializer.write(alphalauncher:262)
at com.alibaba.fastjson.JSON.toJSONString(alphalauncher:438)
at com.alibaba.fastjson.JSON.toString(alphalauncher:432)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseString(alphalauncher:1541)
at com.alibaba.fastjson.serializer.StringCodec.deserialze(alphalauncher:50)
at com.alibaba.fastjson.parser.DefaultFieldDeserializer.parseField(alphalauncher:39)
at com.alibaba.fastjson.parser.JavaBeanDeserializer.parseField(alphalauncher:786)
at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(alphalauncher:648)
at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(alphalauncher:97)
at com.alibaba.fastjson.parser.DefaultFieldDeserializer.parseField(alphalauncher:39)
at com.alibaba.fastjson.parser.JavaBeanDeserializer.parseField(alphalauncher:786)
at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(alphalauncher:648)
at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(alphalauncher:97)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(alphalauncher:682)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(alphalauncher:655)
at com.alibaba.fastjson.JSON.parseObject(alphalauncher:216)
at com.alibaba.fastjson.JSON.parseObject(alphalauncher:188)
at com.alibaba.fastjson.JSON.parseObject(alphalauncher:142)
at com.content.incubator.news.requests.CoreRequest$1.parse(Unknown Source)
parse
at com.content.incubator.news.requests.CoreRequest$1.parse(Unknown Source)
parse
at com.content.incubator.news.requests.a.a.parser(Unknown Source)
okhttp3.Response.body
parser
okhttp3.Response.request
parser
okhttp3.Request.url
parser
okhttp3.Response.message
parser
okhttp3.Response.code
parser
okhttp3.Response.headers
parser
at org.zeus.ZeusNetworkLayer.a(alphalauncher:376)
at org.zeus.ZeusNetworkLayer$a.onResponse(alphalauncher:623)
at okhttp3.RealCall$AsyncCall.execute(alphalauncher:133)
at okhttp3.internal.NamedRunnable.run(alphalauncher:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:838)
,pkg=com.apusapps.launcher,source=com.android.vending,
ActivityTrace=0#DynamicVirtualEntryActivity.created;1#GuideActivity.created;2#GuideActivity.started;3#GuideActivity.resumed;4#DynamicVirtualEntryActivity.destroyed;5#GuideActivity.paused;6#GuideActivity.stopped;7#GuideActivity.started;8#GuideActivity.resumed;9#GuideActivity.paused;10#ApusLauncherActivity.created;11#ApusLauncherActivity.started;12#ApusLauncherActivity.resumed;13#GuideActivity.stopped;14#GuideActivity.destroyed;,
client=vpdjxb7mt0110arjhpfwys41olp5wg44,
data_dir=/data/data/com.apusapps.launcher,
time_zone=Hora de Colombia,
process=com.apusapps.launcher,
cgv=1.1.31.3-release,
lv=null:-1,igc=0,android_id=2cac8c349252d321,
AlwaysFinishActivity=false,vName=3.9.0.1052,vCode=387,system=false,sig=350148cb2542608fc28c7fb369ddfbb7,
cert=CN%3DApus+Launcher%2C+OU%3DApus+Apps%2C+O%3DApus+Group%2C+L%3DInterlaken%2C+ST%3DInterlaken%2C+C%3DCH%7C,
apk=9b0bf5eca9dc5b8d15869887e781c56e,
ro.build.version.sdk=17,ro.product.model=ALCATEL ONE TOUCH 7040A,
ro.product.manufacturer=TCT,abi=armeabi-v7a,gms_version=12.6.85 (000304-197041431);12685002,
occur_time=1527462872,timestamp_hera_install=1527462803,timestamp_hera_install_uptime=3377,is_upgraded=1,recent_upgraded_time=1527462808,timestamp_hera_duration=69,inter_ava=200MB,inter_tot=2061MB,exter_ava=189MB,exter_tot=941MB,has_traces=1,has_dump=0,is_native=0,channel=100272
}

相关问题