https://kotlinlang.org logo
Title
r

Rajashekar

01/20/2021, 12:45 PM
Hi Everyone! I was curious about compose for desktop. So I wanted to try it for the first time. Right now I'm using IDEA Ultimate Edition, I have chosen Template - Compose Desktop Application and Run the main function which shows "Hello World ". Now the JetpackDesktopWindow shows nothing but a blank screen which struggles to render following these logs below which I understood there is a missing file. Does anyone know what exactly this means?
SkIcuLoader: datafile missing: C:\Users\rajas\.jdks\openjdk-15.0.2\bin\icudtl.dat.
Exception in thread "AWT-EventQueue-0 @coroutine#2" 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)
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 org.jetbrains.skiko.HardwareLayer.display(HardwareLayer.kt:20)
	at org.jetbrains.skiko.HardwareLayer.paint(HardwareLayer.kt:16)
	at java.desktop/sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
	at java.desktop/sun.awt.RepaintArea.paint(RepaintArea.java:240)
	at java.desktop/sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:371)
i

Igor Demin

01/20/2021, 12:56 PM
Probably you don't have OpenGL installed. Try to reinstall graphic driver. See also https://github.com/JetBrains/compose-jb/issues/125
r

Rajashekar

01/20/2021, 12:57 PM
Which means I can't install them if I don't have a physical graphic card, right?
i

Igor Demin

01/20/2021, 1:04 PM
Maybe you have graphic card, but it is integrated with CPU? All modern (and not so modern) CPUs have integrated GPU. But if you run Compose on Virtual Machine, you probably won't be able to run Compose.
r

Rajashekar

01/20/2021, 1:17 PM
Okay I Understood. Also I found out now, that I can't run compose on my machine. RIP Me.
i

Igor Demin

01/20/2021, 1:19 PM
In the future we will probably support software rendering
r

Rajashekar

01/20/2021, 1:22 PM
Good to know. Thanks for the information.