[JAVA] Note Book: La JVM est plantée par HighGui #imshow Sur Windows 10 d'Open JDK 11, 14, 15 et 15.01 avec OpenCV, mais cela fonctionne sur OpenJDK16ea.

It isn't work awt on opencv HighGui. It's Just windows probrem. This logic work on linux eclipse. If use OpenJDK16ea, It is work.

A crimina → awt.dll+0x902ae

hs_err_pid19144.log


# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff9a47002ae, pid=19144, tid=13948
#
# JRE version: OpenJDK Runtime Environment (15.0+36) (build 15+36-1562)
# Java VM: OpenJDK 64-Bit Server VM (15+36-1562, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  [awt.dll+0x902ae]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.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 (0x0000028729632f20):  JavaThread "main" [_thread_in_native, id=13948, stack(0x000000ba51300000,0x000000ba51400000)]

Stack: [0x000000ba51300000,0x000000ba51400000],  sp=0x000000ba513fef70,  free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [awt.dll+0x902ae]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.windows.WComponentPeer._setFont(Ljava/awt/Font;)V+0 java.desktop@15
j  sun.awt.windows.WComponentPeer.setFont(Ljava/awt/Font;)V+7 java.desktop@15
j  sun.awt.windows.WWindowPeer.initialize()V+42 java.desktop@15
j  sun.awt.windows.WFramePeer.initialize()V+1 java.desktop@15
j  sun.awt.windows.WComponentPeer.<init>(Ljava/awt/Component;)V+83 java.desktop@15
j  sun.awt.windows.WCanvasPeer.<init>(Ljava/awt/Component;)V+2 java.desktop@15
j  sun.awt.windows.WPanelPeer.<init>(Ljava/awt/Component;)V+2 java.desktop@15
j  sun.awt.windows.WWindowPeer.<init>(Ljava/awt/Window;)V+2 java.desktop@15
j  sun.awt.windows.WFramePeer.<init>(Ljava/awt/Frame;)V+2 java.desktop@15
j  sun.awt.windows.WToolkit.createFrame(Ljava/awt/Frame;)Ljava/awt/peer/FramePeer;+5 java.desktop@15
j  java.awt.Frame.addNotify()V+20 java.desktop@15
j  java.awt.Window.pack()V+28 java.desktop@15
j  org.opencv.highgui.ImageWindow.setFrameLabelVisible(Ljavax/swing/JFrame;Ljavax/swing/JLabel;)V+84
j  org.opencv.highgui.HighGui.waitKey(I)I+203
j  env.check.SampleDnnOnnx$Logic.doExecute()V+206
j  env.check.SampleDnnOnnx.main([Ljava/lang/String;)V+15
v  ~StubRoutines::call_stub

siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x0000000000000058

I haven't been able to classify it yet.

Ubuntu 20.04 LTS on OpenJDK15 image.png

Windows 10 on OpenJDK16ea image.png

Recommended Posts

Note Book: La JVM est plantée par HighGui #imshow Sur Windows 10 d'Open JDK 11, 14, 15 et 15.01 avec OpenCV, mais cela fonctionne sur OpenJDK16ea.
Note Book: OpenCV avec CUDA Install sur Windows10
Note Book: OpenCV v4.5.0 avec Alphamat Install sur Windows10 mais il faut Eigen