<br><font size=2 face="sans-serif">the java-stacktrace shows, that the
&quot;delete&quot; is called by from the &quot;finalize&quot;-method, i.e.
from the</font><font size=3> </font><font size=2 face="sans-serif"><br>
garbage-collector. <br>
our experience is, that calling delete directly from the java-servlet is
*much* safer.</font><font size=3> </font><font size=2 face="sans-serif"><br>
</font>
<br><font size=2 face="sans-serif">if we dynamically create mapserver-objects,
we allway use code like this:<br>
 &nbsp; classObj cO = new classObj(...);</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; ..</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; // Do something with cO</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; ..</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; //now cO isn't used any more</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; cO.delete()</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
same rule for layers etc.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Benedikt</font><font size=3> </font><font size=2 face="sans-serif"><br>
 </font><font size=3>&nbsp;</font><font size=2 face="sans-serif"><br>
 </font><font size=3>&nbsp;<br>
</font><font size=2><tt><br>
UMN MapServer Users List &lt;MAPSERVER-USERS@LISTS.UMN.EDU&gt; schrieb
am 21.06.2005 17:21:39:<br>
<br>
&gt; I'm forwarding this to the users list. Hopefully, Umberto will be
able <br>
&gt; to provide some insight.<br>
&gt; <br>
&gt; cheers,<br>
&gt; Sean<br>
&gt; <br>
&gt; On Jun 16, 2005, at 5:08 PM, Christian Schröder wrote:<br>
&gt; <br>
&gt; &gt; Dear Mr. Gillies,<br>
&gt; &gt;<br>
&gt; &gt; some weeks ago me and Florian Pepping contacted you because we
had <br>
&gt; &gt; problems using the Java Mapscript API. Thanks to you we could
solve <br>
&gt; &gt; these problems :-)<br>
&gt; &gt;<br>
&gt; &gt; Now we got our program doing what it's supposed to do but there
is <br>
&gt; &gt; still a big problem left which we were not able to solve yet:<br>
&gt; &gt; We created a simple servlet which is created inside a Tomcat
5.0 <br>
&gt; &gt; Webserver. This servlet created a map image (png/jpg) and displays
<br>
&gt; &gt; some specified objects on the map. (We use it for location based
<br>
&gt; &gt; services --&gt; &quot;show me the position of the next printer&quot;).<br>
&gt; &gt; After an irregular number of calls of our servlet which uses
the Java <br>
&gt; &gt; Mapscript API the complete Java VM and with it the Tomcat crashes.
I <br>
&gt; &gt; attached the error report below. The program works properly for
a <br>
&gt; &gt; number of calls (between 5 and 1000 :-) ) and after that it crashes.<br>
&gt; &gt; We have tried several versions of the mapserver (4.4.1, 4.4.2,
4.2.4, <br>
&gt; &gt; 4.6.1 RC1) and compiled the Java Mapscript Module with JDK 1.4.2
and <br>
&gt; &gt; 1.5.0. We also configured mapserver using the --with-threads
option, <br>
&gt; &gt; but all this did not help. By the way the mapserv cgi-module
works <br>
&gt; &gt; properly.<br>
&gt; &gt;<br>
&gt; &gt; Do you have an idea for this?<br>
&gt; &gt;<br>
&gt; &gt; Thanks for your anxiety<br>
&gt; &gt;<br>
&gt; &gt; Christian &amp; Florian<br>
&gt; &gt; University of Paderborn, Germany<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;<br>
&gt; &gt; JavaMapscriptLoader: mapscript native library has been loaded.<br>
&gt; &gt; &nbsp;* mapscript native library loaded *<br>
&gt; &gt;<br>
&gt; &gt; An unexpected exception has been detected in native code outside
the <br>
&gt; &gt; VM.<br>
&gt; &gt; Unexpected Signal : 11 occurred at PC=0x3338268<br>
&gt; &gt; Function=delete_classObj+0x8<br>
&gt; &gt; Library=/usr/lib/libmapscript.so<br>
&gt; &gt;<br>
&gt; &gt; Current Java thread:<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at edu.umn.gis.mapscript.mapscriptJNI.delete_classObj(Native
<br>
&gt; &gt; Method)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at edu.umn.gis.mapscript.classObj.delete(classObj.java:32)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at edu.umn.gis.mapscript.classObj.finalize(classObj.java:26)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.ref.Finalizer.invokeFinalizeMethod(Native
Method)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.ref.Finalizer.access$100(Finalizer.java:14)<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; at <br>
&gt; &gt; java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)<br>
&gt; &gt;<br>
&gt; &gt; Dynamic libraries:<br>
&gt; &gt; Can not get information for pid = 10558<br>
&gt; &gt;<br>
&gt; &gt; Heap at VM Abort:<br>
&gt; &gt; Heap<br>
&gt; &gt; &nbsp;def new generation &nbsp; total 1152K, used 135K [0x08ae0000,
0x08c20000,<br>
&gt; &gt; 0x08fc0000)<br>
&gt; &gt; &nbsp; eden space 1024K, &nbsp; 0% used [0x08ae0000, 0x08ae4078,
0x08be0000)<br>
&gt; &gt; &nbsp; from space 128K, 100% used [0x08c00000, 0x08c20000, 0x08c20000)<br>
&gt; &gt; &nbsp; to &nbsp; space 128K, &nbsp; 0% used [0x08be0000, 0x08be0000,
0x08c00000)<br>
&gt; &gt; &nbsp;tenured generation &nbsp; total 15048K, used 13624K [0x08fc0000,
<br>
&gt; &gt; 0x09e72000,<br>
&gt; &gt; 0x0cae0000)<br>
&gt; &gt; &nbsp; &nbsp;the space 15048K, &nbsp;90% used [0x08fc0000, 0x09d0e1c0,
0x09d0e200,<br>
&gt; &gt; 0x09e72000)<br>
&gt; &gt; &nbsp;compacting perm gen &nbsp;total 18432K, used 18373K [0x0cae0000,
<br>
&gt; &gt; 0x0dce0000,<br>
&gt; &gt; 0x10ae0000)<br>
&gt; &gt; &nbsp; &nbsp;the space 18432K, &nbsp;99% used [0x0cae0000, 0x0dcd1618,
0x0dcd1800,<br>
&gt; &gt; 0x0dce0000)<br>
&gt; &gt;<br>
&gt; &gt; Local Time = Tue Jun 14 15:32:19 2005<br>
&gt; &gt; Elapsed Time = 246<br>
&gt; &gt; #<br>
&gt; &gt; # The exception above was detected in native code outside the
VM<br>
&gt; &gt; #<br>
&gt; &gt; # Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 mixed mode)<br>
&gt; &gt; #<br>
&gt; &gt; # An error report file has been saved as /tmp/hs_err_pid10558.log.<br>
&gt; &gt; # Please refer to the file for further information.<br>
&gt; &gt; #<br>
&gt; &gt;<br>
&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;<br>
&gt; &gt; On Mar 22, 2005, at 12:02 PM, Florian Pepping wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Dear Mr. Gillies,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I&#8217;m a student of the University of Paderborn in Germany
and member of <br>
&gt; &gt;&gt; &nbsp;the project group &#8220;Location Based Services for Wireless
Devices&#8221;. In <br>
&gt; &gt;&gt; &nbsp;this project we try to position laptops and other WLAN-enabled
<br>
&gt; &gt;&gt; devices &nbsp;using the signal strength of the WLAN. According
to their <br>
&gt; &gt;&gt; position, we &nbsp;want to offer location based services
to the persons <br>
&gt; &gt;&gt; using the devices &nbsp;(where I am; where&#8217;s the next printer;
is there a <br>
&gt; &gt;&gt; friend nearby)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; In order to do this, we want to use your mapserver and the
Java &nbsp;<br>
&gt; &gt;&gt; Mapscript API to generate maps according to the actual position
and &nbsp;<br>
&gt; &gt;&gt; situation. We like to customize the map of our building and
add &nbsp;<br>
&gt; &gt;&gt; points, lines and so on.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; We have been able to compile the whole mapserver and the
Java &nbsp;<br>
&gt; &gt;&gt; Mapscript API. A small Java example also works, which presents
an &nbsp;<br>
&gt; &gt;&gt; unchanged map of our building.<br>
&gt; &gt;&gt;<br>
&gt; &gt; &gt; [...]<br>
&gt; &gt;</tt></font>
<br>