Hi all,<br><br>Apologies in advance for not providing a testable case that can be fired up. I&#39;m hoping the background info provided and investigation work shown below is enough to help trace what the issue is.<br><br>PROBLEM DEFINITION:<br>
I work with a custom java application that loads GIS data using GDAL (current TRUNK code in use though issue occurs with v1.7.2 also). We can load a variety of data types (MapInfo, DGN,etc) with no issues. A problem occurs when TIGER data is loaded though - the TIGER data loads and is viewable but after a few pans and zooms the JAVA server process crashes. This seems to happen when it tries to unload loaded features. Was using US Census data tiger files.<br>
<br>PROBLEM ANALYSIS:<br>Two sources of debug information were looked at. A (1) general log file generated by java and (2) a core dump file. The outputs of these are below.<br><br>1. LOG NUMBER ONE: The log file generated on crash indicates the source of the problem is the GDAL library when features are deleted. <br>
<br>Current thread (0x0000000041a4d800):  JavaThread &quot;FeatureNativeObjectsCleaner&quot; daemon [_thread_in_native, id=28311, stack(0x00007ff5f4cc8000,0x00007ff5f4dc9000)]<br>siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x000000000000003a<br>
Stack: [0x00007ff5f4cc8000,0x00007ff5f4dc9000],  sp=0x00007ff5f4dc77a8,  free space=3fd0000000000000018k<br>Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)<br>C  0x0000000042355af0<br>j  org.gdal.ogr.FeatureNative.delete()V+23<br>
<br>2. LOG NUMBER TWO: A linux core dump was captured when the JVM crashed. This was analysed for more precise details using the GDB debugger using the approach outlined at <a href="http://www.dialogic.com/support/helpweb/dxall/tn957.aspx">http://www.dialogic.com/support/helpweb/dxall/tn957.aspx</a><br>
<br>The output from the core dump file analysis was:<br>Loaded symbols for /usr/lib/jvm/jrrt-4.0.1-1.6.0/jre/lib/amd64/libdcpr.so<br>Core was generated by `/usr/lib/jvm/java-6-jrockit/bin/java -Xms2048m -Xmx2048m -<a href="http://Djava.util.logging.ma">Djava.util.logging.ma</a>&#39;.<br>
Program terminated with signal 6, Aborted.<br>#0  0x00007f51ac719a75 in raise () from /lib/libc.so.6<br>(gdb) bt<br>#0  0x00007f51ac719a75 in raise () from /lib/libc.so.6<br>#1  0x00007f51ac71d5c0 in abort () from /lib/libc.so.6<br>
#2  0x00007f51ac7534fb in ?? () from /lib/libc.so.6<br>#3  0x00007f51ac75d5b6 in ?? () from /lib/libc.so.6<br>#4  0x00007f51ac7616d8 in ?? () from /lib/libc.so.6<br>#5  0x00007f51ac76258e in malloc () from /lib/libc.so.6<br>
#6  0x00007f515d06c262 in OGRLineString::exportToWkt (this=0x7f5154722bb0, <br>    ppszDstText=0x7f5158804728) at ogrlinestring.cpp:1049<br>#7  0x00007f515d51655f in OGRGeometryShadow_ExportToWkt__SWIG_1 (jenv=0x5952bf0, <br>
    jcls=&lt;value optimized out&gt;, jarg1=6, jarg1_=0xffffffffffffffff)<br>    at ogr_wrap.cpp:1792<br>#8  Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToWkt_1_1SWIG_11 (jenv=0x5952bf0, <br>    jcls=&lt;value optimized out&gt;, jarg1=6, jarg1_=0xffffffffffffffff)<br>
    at ogr_wrap.cpp:7166<br>#9  0x00007f5166de2715 in ?? ()<br>#10 0x00000000827520c0 in ?? ()<br><br><br>1. The core dump file indicates that an exception occurs in the file ogrlinestring.cpp at L1049. In the GDAL trunk source code that I have this corresponds to the line:<br>
       *ppszDstText = (char *) VSIMalloc( nMaxString );<br>2. The output from Log #1 indicates that there might be an issue with memory pointers. This is based on the SEGV_MAPERR error output and the opinion on the post here: <a href="http://www.linuxquestions.org/questions/programming-9/free-invalid-next-size-fast-c-error-729852/">http://www.linuxquestions.org/questions/programming-9/free-invalid-next-size-fast-c-error-729852/</a><br>
<br>It looks like the problem could be a memory pointer size issue related to ogrlinestring. If anyone could take a quick look and suggest a fix that would be appreciated. I&#39;m a java programmer lost in a C++ world on this one.<br>
<br>Thanks,<br>Brian<br><br><br><br><br><br><br><br>