首页 / 浏览问题 / 组件GIS / 问题详情
feature序列化失败,导致jvm崩溃
3EXP 2020年05月17日
代码大致结构是这样得
try{
for (String line : lineList) {
    Feature feature = new Feature();
    feature.FeatureDeSerialize(line, SerializeGeojson);//序列化

}

}catch(Exception e){

e.printStackTrace();

}

如果我传得line是一个   格式正确的feature是可以序列化得,但是如果我得格式有问题,比如少一个]这种,无法catch到报错,会直接虚拟机崩溃,服务重启,想知道有没有解决办法

参数如下

"lineList": [
        "{\"type\":\"Feature\",\"properties\":{\"SmUserID\":666},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[118.7802359,31.8665820],[118.7812359,31.8665820]}}"
    ]

谢谢

1个回答

你好,可以看一下输出的报错信息吗?
2,842EXP 2020年05月18日
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000212acbb0, pid=15576, tid=0x0000000000003670
#
# JRE version: Java(TM) SE Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [SuGeometry.dll+0xcbb0]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

这是log里边的,具体报错是让看这个log
私信您,加qq看下代码
...