当前位置: 代码迷 >> Java Web开发 >> Java读取某种图片tomcat自动停掉,该如何处理
  详细解决方案

Java读取某种图片tomcat自动停掉,该如何处理

热度:171   发布时间:2016-04-17 01:18:16.0
Java读取某种图片tomcat自动停掉
web应用运行环境:jdk1.5+tomcat5.0,提供了用户上传查询图片的功能,代码中有通过java类读取图片的方法,一般运行是正常的。但当网站用户上传某种特殊的图片时,就会出现tomcat自动停掉(根据下面的日志文件可分析出是读取图片造成的)。错误日志文件会出现在tomcat/bin目录下。摘取文件内容如下。请高手赐教,谢谢!

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d5f92ac, pid=2328, tid=6136
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode)
# Problematic frame:
# C [cmm.dll+0x192ac]
#

--------------- T H R E A D ---------------

Current thread (0x6c22bf68): JavaThread "http-80-Processor5" daemon [_thread_in_native, id=6136]

siginfo: ExceptionCode=0xc0000005, reading address 0x6c471000

Registers:
EAX=0x00060840, EBX=0x6c4691cc, ECX=0x00016283, EDX=0x6ef5a008
ESP=0x6ccee724, EBP=0x6ccee770, ESI=0x6c471000, EDI=0x6ef61e3c
EIP=0x6d5f92ac, EFLAGS=0x00010202

Top of Stack: (sp=0x6ccee724)
0x6ccee724: 00060840 6e23b860 6d6045ea 6ef5a008
0x6ccee734: 6c4691cc 00060840 6ef5a008 6e23b860
0x6ccee744: 6e1a6db8 6d604551 6e23b860 41324230
0x6ccee754: 00060840 6c4691cc 6e1a6db8 6c4691cc
0x6ccee764: 6c469008 00060a04 00060a04 6ccee7a0
0x6ccee774: 6d602b49 6e1a6db8 41324230 00060840
0x6ccee784: 6c4691cc 00000000 6ccee7d8 6c469008
0x6ccee794: 41324230 0000000b 000b0c56 6ccee7b8 

Instructions: (pc=0x6d5f92ac)
0x6d5f929c: 8b 74 24 0c 57 8b 7c 24 0c 8b c1 8b d7 c1 e9 02
0x6d5f92ac: f3 a5 8b c8 8b c2 83 e1 03 f3 a4 5f 5e c3 8b 4c 


Stack: [0x6ccb0000,0x6ccf0000), sp=0x6ccee724, free space=249k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [cmm.dll+0x192ac]
C [cmm.dll+0x22b49]
C [cmm.dll+0x22b86]
C [cmm.dll+0x280aa]
j sun.awt.color.CMM.cmmLoadProfile([B[J)I+0
j java.awt.color.ICC_Profile.getInstance([B)Ljava/awt/color/ICC_Profile;+15
j com.sun.imageio.plugins.jpeg.JPEGImageReader.setImageData(IIIII[B)V+44
v ~StubRoutines::call_stub
V [jvm.dll+0x8168d]
V [jvm.dll+0xd4179]
V [jvm.dll+0x8155e]
V [jvm.dll+0x86845]
C [jpeg.dll+0x1d3e]
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(JZZ)Z+0
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(Z)Z+12
j com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly()V+92
j com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(I)V+41
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(IZ)V+2
j com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(ILjavax/imageio/ImageReadParam;Z)Ljava/awt/image/Raster;+3
j com.sun.imageio.plugins.jpeg.JPEGImageReader.read(ILjavax/imageio/ImageReadParam;)Ljava/awt/image/BufferedImage;+4
j javax.imageio.ImageIO.read(Ljavax/imageio/stream/ImageInputStream;)Ljava/awt/image/BufferedImage;+55
j javax.imageio.ImageIO.read(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage;+20
j com.typ.pub.ImageDo.createSmallImage(Ljava/lang/String;Ljava/lang/String;)V+18
j com.typ.service.PhotoService.addPhotoBatchAutoName(Lcom/typ/dto/Photo;Lcom/typ/dto/WebUser;Ljava/util/List;Z)Z+448
j com.typ.servlet.AddPhotoServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+487
j com.typ.servlet.AddPhotoServlet.doPost(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+139
J javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V
J org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V
J org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V
J com.typ.util.SetCharacterEncodingFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V
  相关解决方案