When on Linux box, and using the LayerRasterSkija, rather than the default LayerGLSkija class, the "empty" example crashes at runtime.
Here are the relevant code of the "empty" example:
|
try { |
|
window.setLayer(new LayerGLSkija()); |
|
} catch (Throwable e) { |
|
window.setLayer(new LayerRasterSkija()); |
|
} |
The above code is working fine in Linux, because the LayerGLSkija class works fine so the LayerRasterSkija never has a chance to be used.
But when you deliberately force the LayerRasterSkija class to be used, like this change:
// try {
// window.setLayer(new LayerGLSkija());
// } catch (Throwable e) {
window.setLayer(new LayerRasterSkija());
// }
then the JVM would crash at runtime when trying to create a new instance of LayerRasterSkija class (?), and produce a crash log file.
The relevant info in the crash's log are here:
...
Stack: [0x00007e67a4f00000,0x00007e67a5000000], sp=0x00007e67a4ffde58, free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libX11.so.6+0x282b4] XInitImage+0x4
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j io.github.humbleui.jwm.LayerRaster._nResize(II)V+0
j io.github.humbleui.jwm.LayerRaster.resize(II)V+35
j io.github.humbleui.jwm.skija.LayerRasterSkija.resize(II)V+22
j io.github.humbleui.jwm.Window.accept(Lio/github/humbleui/jwm/Event;)V+50
j io.github.humbleui.jwm.Window.accept(Lio/github/humbleui/jwm/Event;)V+115
j io.github.humbleui.jwm.Window.setLayer(Lio/github/humbleui/jwm/Layer;)Lio/github/humbleui/jwm/Window;+63
j io.github.humbleui.jwm.examples.Example.<init>()V+41
j io.github.humbleui.jwm.examples.Example.lambda$main$0()V+4
j io.github.humbleui.jwm.examples.Example$$Lambda+0x0000000064041578.run()V+0
j io.github.humbleui.jwm.App.lambda$start$1(Ljava/lang/ClassLoader;Ljava/lang/Runnable;)V+43
j io.github.humbleui.jwm.App$$Lambda+0x00000000640491e0.run()V+8
v ~StubRoutines::call_stub 0x00007e678f85ffa6
j io.github.humbleui.jwm.App._nStart(Ljava/lang/Runnable;)V+0
j io.github.humbleui.jwm.App.start(Ljava/lang/Runnable;)V+17
j io.github.humbleui.jwm.examples.Example.main([Ljava/lang/String;)V+5
v ~StubRoutines::call_stub 0x00007e678f85ffa6
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000028
...
Any idea what happens? This crash only happens in Linux; the Windows box works fine for both LayerRasterSkija and LayerGLSkija classes.
(I don't know about the Mac box.)
In fact, the issue happens to all/any subclass of LayerRaster, not just the Skija one. This is how I discovered the issue which happened in my "graphics2d" example in Linux :-(
When on Linux box, and using the
LayerRasterSkija, rather than the defaultLayerGLSkijaclass, the "empty" example crashes at runtime.Here are the relevant code of the "empty" example:
JWM/examples/empty/java/Example.java
Lines 18 to 22 in d5fe7cb
The above code is working fine in Linux, because the
LayerGLSkijaclass works fine so theLayerRasterSkijanever has a chance to be used.But when you deliberately force the
LayerRasterSkijaclass to be used, like this change:then the JVM would crash at runtime when trying to create a new instance of
LayerRasterSkijaclass (?), and produce a crash log file.The relevant info in the crash's log are here:
Any idea what happens? This crash only happens in Linux; the Windows box works fine for both
LayerRasterSkijaandLayerGLSkijaclasses.(I don't know about the Mac box.)
In fact, the issue happens to all/any subclass of
LayerRaster, not just the Skija one. This is how I discovered the issue which happened in my "graphics2d" example in Linux :-(