Loading URLs in javafx webview is crashing the JVM

孤街浪徒 提交于 2019-12-11 11:37:31

问题


I am loading some urls into javafx webview. I am doing a crawling operation here , using javafx webview and it's engine. However JVM is crashing frequently. I am unable to make out anything from the below crash log. Pls help.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000076fe3290, pid=6164, tid=9896
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode windows-amd64 )
# Problematic frame:
# C  [ntdll.dll+0x53290]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

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

Current thread (0x000000000c74f800):  JavaThread "JavaFX Application Thread" [_thread_in_native, id=9896, stack(0x000000000d4b0000,0x000000000d530000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000fd4c3c998c8

Registers:
RAX=0x0000000000000000, RBX=0x00000fd4c3c998c0, RCX=0x000000ffffffffff, RDX=0x00000000179e0dd0
RSP=0x000000000d52c1c0, RBP=0x0000000000000000, RSI=0x0000000002290000, RDI=0x00000000179e0de0
R8 =0x00000000179e0de0, R9 =0x0000000000000000, R10=0x00000000000003e9, R11=0x0000000019054670
R12=0x000000000d52e150, R13=0x000000000d52c7a0, R14=0x000000000d52defc, R15=0x00000000198e8a24
RIP=0x0000000076fe3290, EFLAGS=0x0000000000010206

Top of Stack: (sp=0x000000000d52c1c0)
0x000000000d52c1c0:   000000000d52c780 000000000d52e150
0x000000000d52c1d0:   00000000000000a0 0000000000000000
0x000000000d52c1e0:   000000000d52c3a0 0000000073288d17
0x000000000d52c1f0:   0000000000000002 00000000000000a0
0x000000000d52c200:   00000000198e8a24 000000000d52defc
0x000000000d52c210:   000000000d52c7a0 000000000d52e150
0x000000000d52c220:   0000000000000101 0000000000000000
0x000000000d52c230:   000000000d52c3a0 00000000768b1a4a
0x000000000d52c240:   0000000000000000 00000000179e0de0
0x000000000d52c250:   000000726f6c6f63 00000000606e1497
0x000000000d52c260:   0000000000000000 0000000073288d94
0x000000000d52c270:   fffffffffffffffe 00000000219f8230
0x000000000d52c280:   0000000000000101 0000000000000000
0x000000000d52c290:   00000000179e0de0 0000000060dc1976
0x000000000d52c2a0:   00000000179e0de0 0000000000000000
0x000000000d52c2b0:   00000000179e0de0 0000000000000000 

Instructions: (pc=0x0000000076fe3290)
0x0000000076fe3270:   ff ff 00 00 00 48 33 de 48 23 c1 48 c1 eb 04 48
0x0000000076fe3280:   33 d8 48 33 1d 3f f1 0d 00 48 c1 e3 04 0f 0d 0b
0x0000000076fe3290:   4c 8b 63 08 49 bd 01 00 00 00 01 00 00 00 49 be
0x0000000076fe32a0:   ff 7f 00 00 ff ff ff ff c6 42 0f 80 c6 42 0e 00 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x00000fd4c3c998c0 is an unknown value
RCX=0x000000ffffffffff is an unknown value
RDX=0x00000000179e0dd0 is an unknown value
RSP=0x000000000d52c1c0 is pointing into the stack for thread: 0x000000000c74f800
RBP=0x0000000000000000 is an unknown value
RSI=0x0000000002290000 is an unknown value
RDI=0x00000000179e0de0 is an unknown value
R8 =0x00000000179e0de0 is an unknown value
R9 =0x0000000000000000 is an unknown value
R10=0x00000000000003e9 is an unknown value
R11=0x0000000019054670 is an unknown value
R12=0x000000000d52e150 is pointing into the stack for thread: 0x000000000c74f800
R13=0x000000000d52c7a0 is pointing into the stack for thread: 0x000000000c74f800
R14=0x000000000d52defc is pointing into the stack for thread: 0x000000000c74f800
R15=0x00000000198e8a24 is an unknown value


Stack: [0x000000000d4b0000,0x000000000d530000],  sp=0x000000000d52c1c0,  free space=496k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [ntdll.dll+0x53290]

[error occurred during error reporting (printing native stack), id 0xc0000005]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.webpane.webkit.network.URLLoader.twkDidReceiveData(Ljava/nio/ByteBuffer;IIJ)V+0
j  com.sun.webpane.webkit.network.URLLoader.access$1200(Ljava/nio/ByteBuffer;IIJ)V+4
j  com.sun.webpane.webkit.network.URLLoader$5.run()V+35
j  com.sun.glass.ui.InvokeLaterDispatcher$Future.run()V+4
v  ~StubRoutines::call_stub
j  com.sun.glass.ui.win.WinApplication._runLoop([Ljava/lang/String;Lcom/sun/glass/ui/Launchable;)V+0
j  com.sun.glass.ui.win.WinApplication.access$100(Lcom/sun/glass/ui/win/WinApplication;[Ljava/lang/String;Lcom/sun/glass/ui/Launchable;)V+3
j  com.sun.glass.ui.win.WinApplication$3$1.run()V+32
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

回答1:


There is known issue with WebView forcing the JavaVM to crash with an EXCEPTION_ACCESS_VIOLATION filed at https://javafx-jira.kenai.com/browse/RT-35262 (unfortunately, free Jira account needed).

The WebView seems to have issues with garbage collecting issued JavaScript statements, so after some amount of JavaScript it will turn down the JVM. We have observed this only on 32-bit JVM.

A fix has been deferred from Java 8u40 to Java 9, which is not even sheduled yet (vaguely probably in 2016).



来源:https://stackoverflow.com/questions/26227786/loading-urls-in-javafx-webview-is-crashing-the-jvm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!