Java Mapscript crashing Tomcat when setting image output format
Franco Arcangeli
kroneker70 at YAHOO.IT
Thu Sep 6 10:12:20 PDT 2007
Hi,
i have the necessity to use a different image type for different map
components:
the map image and the key map image in jpg format, scalebar and legend icon
in gif format.
for obtaining this i change the image format of the entire map at runtime
before i generate this components with the methods
map.setoutputFormat("jpeg") or map.setImageType("gif");
this method work fine, but after some time (20 - 30 requests), tomcat
crashes inexorably on executions of one of these methods.
what is the problem?
there are another metod to obtaining this?
Sorry for my bad english...
Thanks in advance for any help!!
My configuration:
Windows XP PRO
MapServer 4.10.3
support GD 2.0.33, FreeType 2.1.10, GDAL/OGR 1.4.1, PROJ, WMS/WFS, Flash,
PDF, ECW3.1, PostGIS, GEOS, libcurl 7.15.1, FastCGI
MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE DEBUG=MSDEBUG
Library Versions Used to build this version of MapServer:
curl-7.15.1
fcgi-2.4.0
freetype-2.1.10
gd-2.0.33
gdal-1.4.1
geos-2.2.3
gettext-0.13
jpeg-6b
libecwj2-3.3
libgeotiff-1.2.3
libiconv-1.9.1
libintl-0.11.5
libpng-1.2.8
libxml2-2.6.23.win32
mapserver-4.10.3
ming-0.2a
mrsid-6.0.7.1407
mysql-5.0.18-win32
PDFlib-Lite-6.0.2
php-5.2.3 (MS4W 2.x)
php-4.4.4 (MS4W 1.x)
postgresql-8.2.3
proj-4.4.9
Python-2.4.4
regex-0.12
SWIG-1.3.29
tiff-3.8.2
xerces-c-2.7.0
zlib-1.2.3
This is the log of tomcat:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x03432ce0, pid=3816,
tid=2340
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode, sharing)
# Problematic frame:
# C [libmap.dll+0x12ce0]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x04aec800): JavaThread "http-80-8" daemon
[_thread_in_native, id=2340]
siginfo: ExceptionCode=0xc0000005, reading address 0x63617061
Registers:
EAX=0x63617061, EBX=0x7c3549d4, ECX=0x00bcbc78, EDX=0x00b96719
ESP=0x0525d32c, EBP=0x00b96718, ESI=0x00b96718, EDI=0x63617061
EIP=0x03432ce0, EFLAGS=0x00010206
Top of Stack: (sp=0x0525d32c)
0x0525d32c: 00b96718 00b96718 00000000 031f8438
0x0525d33c: 03495477 00b96718 63617061 04aec800
0x0525d34c: 031f8438 00000000 03495eec 031f8438
0x0525d35c: 00b96718 28cf6fe8 0525d37c 28cf6fe8
0x0525d36c: 100207a1 00000004 00b96718 031f8438
0x0525d37c: 0525f3a8 100205c1 031f8438 00b96718
0x0525d38c: 000001d7 00000001 00000034 00000000
0x0525d39c: 00000000 00000000 00000000 00000000
Instructions: (pc=0x03432ce0)
0x03432cd0: 74 5c 80 3e 00 53 55 74 32 8b 1d b8 a3 63 03 90
0x03432ce0: 8a 07 84 c0 74 20 0f be c0 50 ff d3 0f be 0e 51
Stack: [0x05220000,0x05260000), sp=0x0525d32c, free space=244k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
C [libmap.dll+0x12ce0]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j
edu.umn.gis.mapscript.mapscriptJNI.mapObj_setImageType(JLjava/lang/String;)V+0
j edu.umn.gis.mapscript.mapObj.setImageType(Ljava/lang/String;)V+5
j
com.geodetix.javamapscript.actions.GetKeyMapImageAction.drawKeyMap(Lcom/geodetix/javamapscript/beans/wrappers/MapWrapper;Ljavax/servlet/http/HttpServletResponse;)V+17
j
com.geodetix.javamapscript.actions.GetKeyMapImageAction.execute(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+12
j
org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/Action;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Lorg/apache/struts/action/ActionForward;+7
j
org.apache.struts.action.RequestProcessor.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+257
j
org.apache.struts.action.ActionServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+40
j
org.apache.struts.action.ActionServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
j
javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+35
j
javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+374
j
org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j
org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
j
org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+285
j
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+327
j
org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j
org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
J
org.apache.catalina.valves.AccessLogValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V
j
org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j
org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+157
j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+432
j
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
=>0x04aec800 JavaThread "http-80-8" daemon [_thread_in_native, id=2340]
0x04af1800 JavaThread "http-80-7" daemon [_thread_in_native, id=2344]
0x04a57400 JavaThread "http-80-6" daemon [_thread_in_native, id=2752]
0x04aca400 JavaThread "http-80-5" daemon [_thread_in_native, id=368]
0x00cd2800 JavaThread "http-80-4" daemon [_thread_in_native, id=2676]
0x00d33800 JavaThread "http-80-3" daemon [_thread_in_native, id=3460]
0x008c5400 JavaThread "http-80-2" daemon [_thread_in_native, id=3244]
0x02fc3800 JavaThread "http-80-1" daemon [_thread_in_native, id=2372]
0x03050c00 JavaThread "TP-Monitor" daemon [_thread_blocked, id=3104]
0x02fac400 JavaThread "TP-Processor4" daemon [_thread_in_native, id=3088]
0x02fb2400 JavaThread "TP-Processor3" daemon [_thread_blocked, id=3108]
0x02f57800 JavaThread "TP-Processor2" daemon [_thread_blocked, id=3080]
0x03073c00 JavaThread "TP-Processor1" daemon [_thread_blocked, id=3076]
0x02fc6400 JavaThread "http-80-Acceptor-0" daemon [_thread_in_native,
id=588]
0x02fa9400 JavaThread
"ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon
[_thread_blocked, id=2680]
0x008ad000 JavaThread "Thread-1" [_thread_in_native, id=788]
0x0082d400 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=2860]
0x00828800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=316]
0x00827400 JavaThread "Attach Listener" daemon [_thread_blocked, id=4048]
0x00826800 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=4024]
0x0081ec00 JavaThread "Finalizer" daemon [_thread_blocked, id=2496]
0x0081d800 JavaThread "Reference Handler" daemon [_thread_blocked,
id=4076]
0x00676800 JavaThread "main" [_thread_in_native, id=3492]
Other Threads:
0x00814800 VMThread [id=516]
0x0082ec00 WatcherThread [id=1484]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 1600K, used 970K [0x24020000, 0x241d0000,
0x24500000)
eden space 1472K, 63% used [0x24020000, 0x2410a9a8, 0x24190000)
from space 128K, 25% used [0x24190000, 0x24198218, 0x241b0000)
to space 128K, 0% used [0x241b0000, 0x241b0000, 0x241d0000)
tenured generation total 20488K, used 14500K [0x24500000, 0x25902000,
0x28020000)
the space 20488K, 70% used [0x24500000, 0x25329250, 0x25329400,
0x25902000)
compacting perm gen total 15104K, used 14909K [0x28020000, 0x28ee0000,
0x2c020000)
the space 15104K, 98% used [0x28020000, 0x28eaf4f0, 0x28eaf600,
0x28ee0000)
ro space 8192K, 62% used [0x2c020000, 0x2c51f728, 0x2c51f800,
0x2c820000)
rw space 12288K, 52% used [0x2c820000, 0x2ce61eb8, 0x2ce62000,
0x2d420000)
Dynamic libraries:
0x00400000 - 0x0040f000 C:\Programmi\Apache Software Foundation\Tomcat
6.0\bin\tomcat6.exe
0x7c910000 - 0x7c9c6000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c900000 C:\WINDOWS\system32\kernel32.dll
0x7e390000 - 0x7e420000 C:\WINDOWS\system32\USER32.dll
0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll
0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll
0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll
0x7c9d0000 - 0x7d1ec000 C:\WINDOWS\system32\SHELL32.dll
0x77e90000 - 0x77f06000 C:\WINDOWS\system32\SHLWAPI.dll
0x76340000 - 0x7635d000 C:\WINDOWS\system32\IMM32.DLL
0x773a0000 - 0x774a3000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
0x5d4d0000 - 0x5d56a000 C:\WINDOWS\system32\comctl32.dll
0x6d7c0000 - 0x6da09000 C:\Programmi\Java\jre1.6.0_02\bin\client\jvm.dll
0x76b00000 - 0x76b2e000 C:\WINDOWS\system32\WINMM.dll
0x7c340000 - 0x7c396000 C:\WINDOWS\system32\MSVCR71.dll
0x6d310000 - 0x6d318000 C:\Programmi\Java\jre1.6.0_02\bin\hpi.dll
0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL
0x77f10000 - 0x77f21000 C:\WINDOWS\system32\Secur32.dll
0x6d770000 - 0x6d77c000 C:\Programmi\Java\jre1.6.0_02\bin\verify.dll
0x6d3b0000 - 0x6d3cf000 C:\Programmi\Java\jre1.6.0_02\bin\java.dll
0x6d7b0000 - 0x6d7bf000 C:\Programmi\Java\jre1.6.0_02\bin\zip.dll
0x6d570000 - 0x6d583000 C:\Programmi\Java\jre1.6.0_02\bin\net.dll
0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll
0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll
0x719d0000 - 0x71a10000 C:\WINDOWS\system32\mswsock.dll
0x66750000 - 0x667a8000 C:\WINDOWS\system32\hnetcfg.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll
0x6d590000 - 0x6d599000 C:\Programmi\Java\jre1.6.0_02\bin\nio.dll
0x10000000 - 0x10095000 C:\mapscript\mapscript.dll
0x03420000 - 0x0364f000 C:\mapscript\libmap.dll
0x00e20000 - 0x00e32000 C:\mapscript\zlib1.dll
0x03650000 - 0x03686000 C:\mapscript\proj.dll
0x03690000 - 0x03aaa000 C:\mapscript\gdal14.dll
0x12000000 - 0x121ad000 C:\mapscript\xerces-c_2_7.dll
0x03ab0000 - 0x03acd000 C:\mapscript\LIBPQ.dll
0x71a50000 - 0x71a5a000 C:\WINDOWS\system32\WSOCK32.dll
0x76740000 - 0x76749000 C:\WINDOWS\system32\SHFOLDER.dll
0x745e0000 - 0x7461d000 C:\WINDOWS\system32\ODBC32.dll
0x76360000 - 0x763aa000 C:\WINDOWS\system32\comdlg32.dll
0x39d00000 - 0x39e19000 C:\mapscript\libecwj2.dll
0x76c50000 - 0x76c78000 C:\WINDOWS\system32\imagehlp.dll
0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
0x77a50000 - 0x77ae5000 C:\WINDOWS\system32\CRYPT32.dll
0x77af0000 - 0x77b02000 C:\WINDOWS\system32\MSASN1.dll
0x774b0000 - 0x775ed000 C:\WINDOWS\system32\ole32.dll
0x7c3a0000 - 0x7c41b000 C:\WINDOWS\system32\MSVCP71.dll
0x03ad0000 - 0x03cae000 C:\mapscript\lti_dsdk_dll.dll
0x03cb0000 - 0x03e0b000 C:\mapscript\cfitsio.dll
0x03e10000 - 0x03e53000 C:\mapscript\netcdf.dll
0x03e60000 - 0x03e80000 C:\mapscript\geotiff.dll
0x03e80000 - 0x03f18000 C:\mapscript\libtiff.dll
0x03f20000 - 0x03f7e000 C:\mapscript\sqlite3.dll
0x03f80000 - 0x040ea000 C:\mapscript\LIBMYSQL.dll
0x040f0000 - 0x041dc000 C:\mapscript\geos_c.dll
0x041e0000 - 0x042a8000 C:\mapscript\hdf5dll.dll
0x042b0000 - 0x042d2000 C:\mapscript\szlibdll.dll
0x042e0000 - 0x0430b000 C:\mapscript\libcurl.dll
0x04310000 - 0x043bc000 C:\WINDOWS\system32\LIBEAY32.dll
0x043c0000 - 0x043e6000 C:\WINDOWS\system32\SSLEAY32.dll
0x770f0000 - 0x7717b000 C:\WINDOWS\system32\OLEAUT32.dll
0x55300000 - 0x5542a000 C:\mapscript\pdflib.dll
0x043f0000 - 0x04504000 C:\mapscript\iconv.dll
0x00e40000 - 0x00e4d000 C:\mapscript\libfcgi.dll
0x04510000 - 0x045fa000 C:\mapscript\libxml2.dll
0x20000000 - 0x20018000 C:\WINDOWS\system32\odbcint.dll
0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll
0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll
VM Arguments:
jvm_args: -Dcatalina.home=C:\Programmi\Apache Software Foundation\Tomcat 6.0
-Dcatalina.base=C:\Programmi\Apache Software Foundation\Tomcat 6.0
-Djava.endorsed.dirs=C:\Programmi\Apache Software Foundation\Tomcat
6.0\common\endorsed -Djava.io.tmpdir=C:\Programmi\Apache Software
Foundation\Tomcat 6.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Programmi\Apache Software
Foundation\Tomcat 6.0\conf\logging.properties vfprintf
java_command: <unknown>
Launcher Type: generic
Environment Variables:
JAVA_HOME=C:\Programmi\Java\jdk1.6.0_02
CLASSPATH=.;C:\Programmi\QuickTime\QTSystem\QTJava.zip
PATH=C:\mapscript;C:\Programmi\PC Connectivity
Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\IDM
Computer
Solutions\UltraEdit-32;C:\Programmi\QuickTime\QTSystem\;C:\Programmi\Java\jdk1.6.0_02\bin;C:\JAVALIB\apache-ant-1.7.0\bin;C:\Programmi\PostgreSQL\8.2\bin;
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping
6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
Memory: 4k page, physical 2095148k(1455428k free), swap 4032748k(3522888k
free)
vm_info: Java HotSpot(TM) Client VM (1.6.0_02-b06) for windows-x86, built on
Jul 12 2007 01:16:14 by "java_re" with unknown MS VC++:1310
--
View this message in context: http://www.nabble.com/Java-Mapscript-crashing-Tomcat-when-setting-image-output-format-tf4393483.html#a12527091
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list