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