I created a brand new desktop compose app using In...
# compose-desktop
y
I created a brand new desktop compose app using IntelliJ/IDEA 2020.3, on macOS without changing anything from the default demo app. run and package works fine. I then copied the folder to a Windows 10 machine and it doesn't work -> getting this error: PS D:\Work\desktop-compose-test> .\gradlew.bat run
Copy code
> Task :run
SkIcuLoader: datafile missing: C:\Program Files\Zulu\zulu-15\bin\icudtl.dat.
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Can't wrap nullptr
        at org.jetbrains.skija.impl.Native.<init>(Native.java:12)
        at org.jetbrains.skija.impl.Managed.<init>(Managed.java:15)
        at org.jetbrains.skija.impl.Managed.<init>(Managed.java:11)
        at org.jetbrains.skija.impl.RefCnt.<init>(RefCnt.java:7)
        at org.jetbrains.skija.DirectContext.<init>(DirectContext.java:21)
        at org.jetbrains.skiko.RenderTargetsKt.makeGLContext(RenderTargets.kt:6)
        at org.jetbrains.skiko.SkiaLayer.draw(SkiaWindow.kt:55)
        at org.jetbrains.skiko.HardwareLayer.redrawLayer(Native Method)
        at androidx.compose.desktop.ComposeLayer.onFrame(ComposeLayer.kt:75)
        at androidx.compose.desktop.ComposeLayer$onFrame$1.invokeSuspend(ComposeLayer.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Any idea?
I guess there is an issue for it 😞 https://github.com/JetBrains/compose-jb/issues/125
👆 1
s
@Yan Pujante it’s not a jdk issue. Seems like a skia one - https://github.com/JetBrains/skia-build/blob/a4add5d7392a0d608d6fb4d51d84b43f7a510048/patches/SkLoadICU.cpp.patch#L22 . What version of jb-compose are you using?
o
Likely you use VM without OpenGL - currently compose needs functional OpenGL
y
No it is not a VM. It is a Windows 10 physical machine.
@suresh I used the wizard to create the app and didn't choose the version. From what I can see in the build file:
Copy code
plugins {
    kotlin("jvm") version "1.4.20"
    id("org.jetbrains.compose") version "0.2.0-build132"
}
I can see that from the list of tags on github this seems quite old. I do not know why IDEA 2020.3 used this version (it was not a choice offered to me). I will try with a more recent version...
I just tried with (what I believe is) the most recent version and it still fails:
Copy code
plugins {
    kotlin("jvm") version "1.4.21"
    id("org.jetbrains.compose") version "0.3.0-build141"
}
@olonho It is not a VM, it is a Windows 10 physical machine. I am fairly sure that OpenGL is installed since I am playing video games on it, but is there a way to confirm that it is installed?
y
@olonho so yes I confirm that OpenGL is installed on my machine
o
please report issue with information about your hardware and software at https://github.com/JetBrains/compose-jb/issues
y
it is already reported https://github.com/JetBrains/compose-jb/issues/125 (since Nov 19...)
o
y
I guess you are splitting hair here... I will open a brand new one that will state the exact same thing...
@olonho per your request I have created another issue for the same problem https://github.com/JetBrains/compose-jb/issues/317