java - 在 javafx webview 中加载 URL 会导致 JVM 崩溃

标签 java javafx jvm-crash

我正在将一些 url 加载到 javafx webview 中。我在这里使用 javafx webview 及其引擎进行爬行操作。然而,JVM 经常崩溃。我无法从下面的崩溃日志中看出任何内容。请帮忙。

#
# 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.
#

--------------- 线程读取 ---------------

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

最佳答案

WebView 存在一个已知问题,会迫使 JavaVM 崩溃,并在 https://javafx-jira.kenai.com/browse/RT-35262 处提交 EXCEPTION_ACCESS_VIOLATION。 (不幸的是,需要免费的 Jira 帐户)。

WebView 似乎在垃圾收集已发出的 JavaScript 语句方面存在问题,因此在使用一定量的 JavaScript 后,它将关闭 JVM。我们仅在 32 位 JVM 上观察到这一点。

修复已从 Java 8u40 推迟到 Java 9,甚至还没有计划(模糊地可能是在 2016 年)。

关于java - 在 javafx webview 中加载 URL 会导致 JVM 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26227786/

相关文章:

java - 如何在内存不足错误时生成线程转储java

java - 从 C++ 调用 Java : how to catch/detect a fatal JVM error?

java - 正则表达式不会将空格字符与 [\r\n\t\f\s] 匹配

java - 如何在自定义 ListView ArrayList 中进行排序以及如何使其在 Spinner 中工作?

JavaFX等待用户输入的文本,没有任何文本字段

java - 如何在 TreeItem JavaFX 上添加 KeyListener?

java - 如何为 "BottomNavigationView"设置菜单图标图像,因为它仅显示图像的设计,即结构......?

java - Java 中异常的 throws 关键字

JavaFX 菜单 - 首字母、下划线装饰

java - JVM 使用 JOGL、顶点缓冲区对象并尝试在 finalize 方法中释放 vbo 时崩溃