HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
561 stars 44 forks source link

[Windows] Window Randomly Crash #128

Closed i10416 closed 3 years ago

i10416 commented 3 years ago

I tried to use JWM from Scala( both 2.13 and 3.0.0) on Windows, but it randomly crashes.

ADD: The same error occurs on JWM's example.

It can show a window, but it crashes just after App.start or when I interacts with the window(focus,click,move,etc...).

env:

I tried adoptOpenJDK 11, jwm-windows 0.1.240~0.1.246 but they failed too.

error logs:

# Problematic frame:
# v  ~BufferBlob::jni_fast_GetIntField
...
siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x0000000000000000
WindowWin32.cc:165 Set window size w=500 h=500
WindowWin32.cc:232 Size event window w=500 h=500 content w=478 h=444
WindowWin32.cc:181 Set content size w=450 h=450 (adjusted window size w=472 h=506)
WindowWin32.cc:232 Size event window w=472 h=506 content w=450 h=450
WindowWin32.cc:67 Set window title 'example'
WindowWin32.cc:232 Size event window w=472 h=506 content w=450 h=450
WindowWin32.cc:245 Move event left=304 top304
java.lang.NullPointerException
        at org.jetbrains.jwm.App._nStart(Native Method)
        at org.jetbrains.jwm.App.start(App.java:53)
        at com.example.JWMHello$.main(Main.scala:43)
        at com.example.JWMHello.main(Main.scala)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at sbt.Run.invokeMain(Run.scala:133)
        at sbt.Run.execute$1(Run.scala:82)
        at sbt.Run.$anonfun$runWithLoader$5(Run.scala:110)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:17)
        at sbt.TrapExit$App.run(TrapExit.scala:258)
        at java.base/java.lang.Thread.run(Thread.java:831)
Internal exceptions (20 events):
Event: 17.460 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f6114fd8}> (0x00000000f6114fd8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.460 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f6115708}> (0x00000000f6115708) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.460 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f6115a08}> (0x00000000f6115a08) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.460 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f61166a0}> (0x00000000f61166a0) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.462 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f611fef8}> (0x00000000f611fef8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.462 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f6120a98}> (0x00000000f6120a98) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.462 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f61211c8}> (0x00000000f61211c8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.462 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f61214c8}> (0x00000000f61214c8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.462 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f6122160}> (0x00000000f6122160) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.488 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f612b848}> (0x00000000f612b848) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.489 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f612c3f0}> (0x00000000f612c3f0) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.489 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f612cb20}> (0x00000000f612cb20) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.489 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f612ce20}> (0x00000000f612ce20) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.489 Thread 0x000001ee30f66770 Exception <a 'sun/nio/fs/WindowsException'{0x00000000f612dab8}> (0x00000000f612dab8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 579]
Event: 17.506 Thread 0x000001ee30f66770 Exception <a 'java/lang/NoSuchMethodError'{0x00000000f61c2f20}: 'void java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)'> (0x00000000f61c2f20) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\interpreter\linkResolver.cpp, line 790]
Event: 17.507 Thread 0x000001ee30f66770 Exception <a 'java/lang/NoSuchMethodError'{0x00000000f61d2aa8}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.newInvokeSpecial(java.lang.Object, int, int, java.lang.Object)'> (0x00000000f61d2aa8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\interpreter\linkResolver.cpp, line 790]
Event: 17.507 Thread 0x000001ee30f66770 Exception <a 'java/lang/NoSuchMethodError'{0x00000000f61d68c0}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(java.lang.Object, java.lang.Object, int, int, java.lang.Object)'> (0x00000000f61d68c0) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\interpreter\linkResolver.cpp, line 790]
Event: 17.507 Thread 0x000001ee30f66770 Exception <a 'java/lang/NoSuchMethodError'{0x00000000f61da100}: 'java.lang.Object java.lang.invoke.Invokers$Holder.linkToTargetMethod(int, int, java.lang.Object, java.lang.Object)'> (0x00000000f61da100) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\interpreter\linkResolver.cpp, line 790]
Event: 17.824 Thread 0x000001ee30258fb0 Exception <a 'java/lang/NoSuchMethodError'{0x00000000f6cc80b8}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(java.lang.Object, java.lang.Object, int, int, int, int)'> (0x00000000f6cc80b8) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\interpreter\linkResolver.cpp, line 790]
Event: 17.854 Thread 0x000001ee30258fb0 Exception <a 'java/lang/NullPointerException'{0x00000000f6ceef38}> (0x00000000f6ceef38) 
thrown [e:\jenkins\tmp\workspace\build\src\src\hotspot\share\prims\jni.cpp, line 992]

Code is here. https://github.com/ItoYo16u/jwm-scala/blob/master/src/main/scala/Main.scala

i10416 commented 3 years ago

I tried reproducing this error with JWM's example and I found the same error occurs. This seems JWM's bug. When no animation is running, window crashes.

i10416 commented 3 years ago

Copy and paste this in org/jetbrains/jwm/examples/Example.java and run python ./script/run.py.

https://gist.github.com/ItoYo16u/d0a6e1e08cc8c4978e3d35c4e8871986

EgorOrachyov commented 3 years ago

@ItoYo16u Check this commit, I hope, this fixes the issue

https://github.com/JetBrains/JWM/commit/b4b4d62a64ebe86c615319dbbd9d9371a0cbdbad

i10416 commented 3 years ago

It works! Thank you!!!