JetBrains / skiko

Kotlin Multiplatform bindings to Skia
Apache License 2.0
1.83k stars 118 forks source link

Crash happened in native code once version upgraded on arm64 linux #652

Closed lindeer closed 1 month ago

lindeer commented 1 year ago

Not sure if here is the correct report place, but stack trace contained something like org.jetbrains.skiko.context.ContextHandler.flush()V+12, different from issue #649

---------------  T H R E A D  ---------------

Current thread (0x000000743c830000):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=13657, stack(0x00000073b7e00000,0x00000073b8000000)]

Stack: [0x00000073b7e00000,0x00000073b8000000],  sp=0x00000073b7ffa660,  free space=2025k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.jetbrains.skia.DirectContextKt.DirectContext_nFlush(J)J+0
j  org.jetbrains.skia.DirectContextKt.access$DirectContext_nFlush(J)J+1
j  org.jetbrains.skia.DirectContext.flush()Lorg/jetbrains/skia/DirectContext;+10
j  org.jetbrains.skiko.context.ContextHandler.flush()V+12
j  org.jetbrains.skiko.context.ContextHandler.draw()V+87

Everything went well when my project using id("org.jetbrains.compose") version "1.2.0-alpha01-dev753" and classpath(kotlin("gradle-plugin", version = "1.7.0")), but gradlew run crashed once changed as id("org.jetbrains.compose") version "1.2.0" and classpath(kotlin("gradle-plugin", version = "1.7.10")). Same issue when I run template project with compose 1.2.2

here is the log file: hs_err_pid13628.log

$ uname -ar
Linux greatwall-pc 5.4.18-80.43.2-generic #GWOEM SMP Wed Mar 9 14:13:16 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
linroid commented 1 year ago

I encountered the same stack with Compose 1.2.2, it's gone after I upgraded the to Compose 1.3.0

dima-avdeev-jb commented 1 year ago

Thanks!

it's gone after I upgraded the to Compose 1.3.0

Yes, it is fixed in Compose 1.3.0 with Kotlin 1.8.0.

lindeer commented 1 year ago

Sorry, but the issue still exists on my amr64 machine in Compose 1.3.0 with Kotlin 1.8.0 @dima-avdeev-jb here is the log: hs_err_pid25894.log

dima-avdeev-jb commented 1 year ago

In your logs I see another one stacktrace:

Current thread (0x000000743c830000):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=13657, stack(0x00000073b7e00000,0x00000073b8000000)]

Stack: [0x00000073b7e00000,0x00000073b8000000],  sp=0x00000073b7ffa660,  free space=2025k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.jetbrains.skia.DirectContextKt.DirectContext_nFlush(J)J+0
j  org.jetbrains.skia.DirectContextKt.access$DirectContext_nFlush(J)J+1
j  org.jetbrains.skia.DirectContext.flush()Lorg/jetbrains/skia/DirectContext;+10
j  org.jetbrains.skiko.context.ContextHandler.flush()V+12
j  org.jetbrains.skiko.context.ContextHandler.draw()V+87
j  org.jetbrains.skiko.redrawer.LinuxOpenGLRedrawer.redrawImmediately()V+231
j  org.jetbrains.skiko.SkiaLayer.paint(Ljava/awt/Graphics;)V+85
dima-avdeev-jb commented 1 year ago

Does crash happen on application startup?

lindeer commented 1 year ago

yes, it does.

dima-avdeev-jb commented 1 year ago

Can you please check Compose 1.3.1-rc03 with Kotlin 1.8.10

lindeer commented 1 year ago

Still reproduce with Compose 1.3.1-rc03 and Kotlin 1.8.10 here is the new log: hs_err_pid12143.log

lindeer commented 1 year ago

seems my laptop is exceptional, it is acceptable for me to run some local debug tool to collect more info. @dima-avdeev-jb

dima-avdeev-jb commented 1 year ago

I don't really know how to move forward to solve this issue. I checked on Ubuntu Arm64, it works.

lindeer commented 1 year ago

I believe it is a regression, 'cause it was OK with compose 1.2.0-alpha01-dev753 and kotlin 1.7.0. Do you have any idea of debug steps so that I could have a check locally? I am suspicious of my local java sdk, it is a pre-installed version coming with system.

dima-avdeev-jb commented 1 year ago

Can you please try to run this project https://github.com/JetBrains/compose-multiplatform-template With JDK inside IntelliJ IDEA. To do so, pres Ctrl + Ctrl gradle run

image
lindeer commented 1 year ago

still not work :sob:

okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.