https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-desktop
  • s

    spierce7

    11/11/2020, 9:37 PM
    To anyone trying out jetpack compose, I’m having significantly less weird IDE behavior when I use Android Studio instead of IntelliJ. I recommend using Android Studio to play around with things.
    🤔 3
    j
    w
    +3
    10 replies · 6 participants
  • s

    spierce7

    11/12/2020, 2:39 AM
    This is the first time I’ve tried aligning / justifying text in compose. Am I doing something wrong, or is this a bug? I’m trying to right-justify the text, but it’s not working.
    Column(
        Modifier
            .fillMaxSize()
            .padding(20.dp)
    ) {
        Text(
            text = "Test test test asdfasdfa sfj aslf lajsdlf jlajdsfl jlasjf jaslkfj klajdfl jaslf lkasjfljaslk f",
            style = typography.h3,
            color = Color.White,
            textAlign = TextAlign.End,
            modifier = Modifier.background(Color.Black),
        )
    }
    s
    a
    24 replies · 3 participants
  • s

    Se7eN

    11/12/2020, 8:12 AM
    How can I do rotations like in the first image? I tried
    drawLayer(rotationY = 35f, transformOrigin = TransformOrigin(0))
    but it doesn't look 3d. Do I have to scale or something like that? I tried different scale values but no luck.
    i
    4 replies · 2 participants
  • m

    mayojava

    11/12/2020, 10:01 AM
    What is the way to add images and font assets to a compose desktop project and how will they be referenced in code?
    s
    3 replies · 2 participants
  • v

    Vadim Kapustin

    11/12/2020, 11:51 AM
    How to show hint text over Icon? I try to place Text() in one Box() with Icon() when mouse pointer enter in Icon. The text is shown on top of the icon, but the problem is that the box changes its size and changes the position of neighboring elements. My code:
    @Composable
    fun IconWithHint(
        asset: ImageAsset,
        modifier: Modifier = Modifier,
        tint: Color = AmbientContentColor.current,
        hint: @Composable() () -> Unit
    ) {
        val entered = remember { mutableStateOf(false) }
        Box {
            Icon(asset,
                modifier.pointerMoveFilter(
                    onEnter = {
                        entered.value = true
                        false
                    },
                    onExit = {
                        entered.value = false
                        false
                    }
                ),
                tint
            )
            if (entered.value) hint()
        }
    }
    g
    g
    5 replies · 3 participants
  • s

    spierce7

    11/12/2020, 3:27 PM
    I wonder how difficult it’d be to get code hotswapping working with compose desktop.
    c
    1 reply · 2 participants
  • m

    Michał Kalinowski

    11/12/2020, 5:37 PM
    Hey, is there any example to make compose-desktop work with Gradle Groovy?
    o
    3 replies · 2 participants
  • m

    Mahdi Safarmohammadloo

    11/12/2020, 6:17 PM
    Hi ! How can i have relative width/height size ? Something like (FractionallySizedBox) in flutter or (vw and vh and %) in css or (app:layout_constraintHeight_percent) in android constraint layout 🤔
    z
    3 replies · 2 participants
  • f

    Foso

    11/12/2020, 6:29 PM
    Is there any release cycle(every x weeks?) for Compose Desktop or does new versions come out, when specific features are ready?
    o
    1 reply · 2 participants
  • s

    suresh

    11/12/2020, 10:03 PM
    https://github.com/JetBrains/compose-jb/blob/master/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt#L52-L56 - Where can i see the source code of these dependencies?
    j
    1 reply · 2 participants
  • a

    AdrianTodt

    11/13/2020, 12:32 AM
    Hey, in what version was "compose desktop `run` task throws NullPointerException with gradle 6.6 or 6.7" fixed?
    c
    6 replies · 2 participants
  • s

    suresh

    11/13/2020, 7:41 AM
    Intellij autocompletion is failing frequently with the following error. Have noticed this only for compose desktop applications. Things won't work until i cleanup that compose runtime jar from gradle cache. Is this a compose plugin issue? Has anybody seen this issue earlier?
    com.intellij.psi.stubs.UpToDateStubIndexMismatch: PSI and index do not match.
    Please report the problem to JetBrains with the files attached
    INDEXED VERSION IS THE CURRENT ONE file=KtFile: ProduceStateScopeImpl.class, file.class=class org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile, file.lang=Language: kotlin, modStamp=1
     AST INCONSISTENT, perhaps after incremental reparse; KtFile: ProduceStateScopeImpl.class
     stub debugInfo=created in getStubTree(), with AST = false; with backReference
    latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PsiJetFileStubImpl[package=androidx.compose.runtime]}1615692120
       same size=true
       debugInfo=created from index; with backReference
     viewProvider=org.jetbrains.kotlin.idea.decompiler.KotlinDecompiledFileViewProvider{vFile=jar:///Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.compose.runtime/runtime-desktop/0.1.0-build113/3210ec4f762a877390f2b6462f3919cd3a6580e9/runtime-desktop-0.1.0-build113.jar!/androidx/compose/runtime/ProduceStateScopeImpl.class, vFileId=1202084, content=VirtualFileContent{size=5451}, eventSystemEnabled=true}
     viewProvider stamp: 0; file stamp: 0; file modCount: 1605036751442; file length: 5451
     doc saved: true; doc stamp: 0; doc size: 772; committed: true
    indexing info: indexing timestamp = 1605036751442, binary = true, byte size = 5451, char size = -1
    	at com.intellij.psi.stubs.StubTreeLoader.handleUpToDateMismatch(StubTreeLoader.java:135)
    o
    1 reply · 2 participants
  • f

    Fudge

    11/13/2020, 11:37 AM
    I'm using the 1.4.20-RC-IJ2020.2-1 version of the Kotlin plugin but I don't see Jetbrains Compose as an option in the new project wizard, why not?
    j
    j
    +1
    4 replies · 4 participants
  • v

    Vadim Kapustin

    11/13/2020, 11:53 AM
    At first glance, MutableState and MutableStateFlow work equally well in Composable. What is better to use?
    🤔 1
    a
    g
    +2
    8 replies · 5 participants
  • a

    Animesh Sahu

    11/13/2020, 2:01 PM
    How to draw a custom GenericShape or Shape in general? Following the https://foso.github.io/Jetpack-Compose-Playground/cookbook/how_to_create_custom_shape
    val shape = GenericShape { size ->
        moveTo(size.width / 2f, 0f)
        lineTo(size.width, size.height)
        lineTo(0f, size.height)
    }
    After copy pasting the triangle shape (which I'm going to change later), I don't have idea of how to draw it. Shape seems to be a parameter of
    Modifier.border
    ,
    Modifier.drawLayer
    , so I tried, but nothing works 😛 :
    fun main() =
            Window(
                    title = "Compose for Desktop",
                    size = IntSize(300, 300),
            ) {
                DesktopMaterialTheme(
                        colors = lightColors(background = Color.Cyan),
                ) {
                    Box(modifier = Modifier.border(5.dp, Color.Cyan, shape))
                }
            }
    Any thoughts?
    a
    2 replies · 2 participants
  • d

    Dominaezzz

    11/14/2020, 11:28 AM
    Which version of Kotlin is supported?
    j
    2 replies · 2 participants
  • k

    Kirill Grouchnikov

    11/15/2020, 8:39 PM
    AppWindowAmbient.current.y
    gives the top location of the current desktop window. Is there a way to get the vertical offset from the window top for
    Canvas
    or
    DrawScope
    ? That would allow doing vertical gradients across multiple composables without trying to place them into a common container.
    t
    13 replies · 2 participants
  • k

    Kirill Grouchnikov

    11/15/2020, 9:12 PM
    Another case is to display a floating "something" (like a tooltip) anchored to the specific composable, but not overflowing the window bounds. Couldn't find anything related to tooltips in compose android / desktop though to see the implementation details.
    v
    i
    6 replies · 3 participants
  • g

    Greg Steckman

    11/15/2020, 10:30 PM
    I am new to Compose, and trying to implement a master-detail type interface that is exhibiting inconsistent behavior. I am hoping someone can tell me what I am doing wrong, or if there is a bug. Things work as expected if the selected item in the master list is not changed. But once the selected master item is changed, it is no longer possible to edit fields in the detail view. I have uploaded a code sample here: https://gist.github.com/gsteckman/bbfb046673504935388a6eafc9eb652b. I would really appreciate any insights, especially if I am doing something in an incorrect or sub-optimal way for using compose.
    i
    2 replies · 2 participants
  • a

    andylamax

    11/17/2020, 3:26 PM
    I was really hoping compose navigation to be platform agnostic. Currently it suites only android. What about desktop navigation?
    b
    a
    3 replies · 3 participants
  • a

    alorma

    11/17/2020, 4:26 PM
    Hi! Just a dummy question.... Anyone succesfully used firebase (database, realtime, auth...) + compose desktop?
    a
    o
    +1
    5 replies · 4 participants
  • a

    alorma

    11/17/2020, 5:06 PM
    Question. Why i have that white background on the text?
    Column(
        modifier = Modifier.padding(16.dp),
    ) {
        Surface(
            elevation = 4.dp,
            modifier = Modifier.clip(MaterialTheme.shapes.medium)
                .background(color = MaterialTheme.colors.primary)
                .clickable {}
                .padding(8.dp)
        ) {
            Text(text = "${repo.owner.login}/${repo.name}")
        }
    }
    i
    2 replies · 2 participants
  • p

    Paul Nogas

    11/17/2020, 7:14 PM
    Does jb-compose support Menu Bar (especially for the difference in behaviour in Mac where it is always at the top of the screen but only top of in the window on Windows). Or should that be a feature request for the roadmap?
    j
    2 replies · 2 participants
  • k

    Kirill Grouchnikov

    11/17/2020, 7:32 PM
    Somewhere "apple.laf.useScreenMenuBar" system property needs to be set to true. Either in https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/compose/desktop/desktop/src/jvmMain/kotlin/androidx/compose/desktop/AppWindow.kt?autodive=0%2F%2F%2F%2F or the mac packager
    👍 1
    o
    t
    3 replies · 3 participants
  • z

    Zach Klippenstein (he/him) [MOD]

    11/17/2020, 11:43 PM
    Is it true that the multiplatform/desktop Compose gradle plugin and stuff doesn’t support Compose alpha07? I haven’t seen any configuration in the samples referencing any of the alphas, so I’m assuming it’s hard-coded to something around alpha06?
    e
    i
    4 replies · 3 participants
  • k

    Kyant

    11/18/2020, 4:56 AM
    When will IDEA support compose preview? Or can I use Android Studio to preview it?
    👍 2
    a
    1 reply · 2 participants
  • p

    Paul Woitaschek

    11/18/2020, 10:36 AM
    Not 100% related but it seems compose desktop needs java 11. I thought I could just specify that in gradle:
    java {
        toolchain {
            languageVersion.set(JavaLanguageVersion.of(11))
        }
    }
    But when running from the command line:
    ./gradlew run
    It shows an error:
    Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: org/jetbrains/skiko/Library has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    e
    b
    +3
    6 replies · 6 participants
  • v

    Vadim Kapustin

    11/18/2020, 11:32 AM
    The app displays an icon using
    Icon(imageFromResource("images/logo.png"))
    But sometimes, when the system is under heavy load I have NullPointerException in DesktopImageAssetKt.loadResource() Apparently the icon doesn't have time to load... How to make waiting for the icon to load and then display it?
    i
    13 replies · 2 participants
  • b

    bjonnh

    11/18/2020, 2:50 PM
    That's what happen when I run any compose demo on wayland/gnome. If I move the window, the black bar disappears.
    s
    t
    4 replies · 3 participants
  • t

    Timo Drick

    11/19/2020, 1:55 PM
    I get sometimes crashes when i am showing images loaded from files. I am not able to reproduces it reliable. So maybe is it necessary to be on the Main/UI thread to do skia canvas operations? (But it looks like most of the time it is also working when i am on a background thread)
    o
    i
    7 replies · 3 participants
Powered by Linen
Title
t

Timo Drick

11/19/2020, 1:55 PM
I get sometimes crashes when i am showing images loaded from files. I am not able to reproduces it reliable. So maybe is it necessary to be on the Main/UI thread to do skia canvas operations? (But it looks like most of the time it is also working when i am on a background thread)
Her is the error backstack:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007efd5f0d3f4a, pid=46282, tid=46347
#
# JRE version: OpenJDK Runtime Environment (15.0+32) (build 15-ea+32-Ubuntu-220.04)
# Java VM: OpenJDK 64-Bit Server VM (15-ea+32-Ubuntu-220.04, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libskiko.so+0x95af4a]  SkSwizzler::swizzle(void*, unsigned char const*)+0xa
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/timo/dev/compose/my_gitlab/imagebrowser/core.46282)
#
# If you would like to submit a bug report, please visit:
#   Unknown
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  S U M M A R Y ------------

Command Line: -javaagent:/home/timo/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm/1.3.9/4be434f5e86c1998a273e7f19a7286440894f0b0/kotlinx-coroutines-core-jvm-1.3.9.jar -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea MainKt

Host: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, 8 cores, 15G, Ubuntu 20.04.1 LTS
Time: Sun Nov 15 04:57:57 2020 CET elapsed time: 152.624555 seconds (0d 0h 2m 32s)

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

Current thread (0x00007efce4000e50):  JavaThread "DefaultDispatcher-worker-1 @coroutine#9327" daemon [_thread_in_native, id=46347, stack(0x00007efd0850e000,0x00007efd0860f000)]

Stack: [0x00007efd0850e000,0x00007efd0860f000],  sp=0x00007efd0860c3c8,  free space=1016k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libskiko.so+0x95af4a]  SkSwizzler::swizzle(void*, unsigned char const*)+0xa

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 6629  org.jetbrains.skija.Canvas._nDrawImageIRect(JJIIIIFFFFJZ)V (0 bytes) @ 0x00007efde8724815 [0x00007efde87247a0+0x0000000000000075]
J 7354 c1 org.jetbrains.skija.Canvas.drawImage(Lorg/jetbrains/skija/Image;FFLorg/jetbrains/skija/Paint;)Lorg/jetbrains/skija/Canvas; (48 bytes) @ 0x00007efde1347c64 [0x00007efde1347640+0x0000000000000624]
J 7353 c1 org.jetbrains.skija.Canvas.drawImage(Lorg/jetbrains/skija/Image;FF)Lorg/jetbrains/skija/Canvas; (9 bytes) @ 0x00007efde10382a4 [0x00007efde10381a0+0x0000000000000104]
J 7352 c1 androidx.compose.ui.graphics.DesktopImageAssetKt.toBitmap(Lorg/jetbrains/skija/Image;)Lorg/jetbrains/skija/Bitmap; (51 bytes) @ 0x00007efde13d9654 [0x00007efde13d8b80+0x0000000000000ad4]
J 6846 c1 de.appsonair.compose.FileUtilsKt$toImageAsset$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; (50 bytes) @ 0x00007efde18ace1c [0x00007efde18ac880+0x000000000000059c]
J 6848 c1 de.appsonair.compose.FileUtilsKt$toImageAsset$2.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; (19 bytes) @ 0x00007efde18adc04 [0x00007efde18ad960+0x00000000000002a4]
J 6490 c1 kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Lkotlinx/coroutines/internal/ScopeCoroutine;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object; (265 bytes) @ 0x00007efde1473d4c [0x00007efde1473880+0x00000000000004cc]
J 4776 c1 kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; (212 bytes) @ 0x00007efde16b49dc [0x00007efde16b3ca0+0x0000000000000d3c]
J 6844 c1 de.appsonair.compose.FileUtilsKt.toImageAsset(Lorg/jetbrains/skija/Image;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; (30 bytes) @ 0x00007efde18ab514 [0x00007efde18ab200+0x0000000000000314]
J 6874 c1 de.appsonair.compose.FileUtilsKt$toScaledImageAsset$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; (450 bytes) @ 0x00007efde18c6074 [0x00007efde18c3940+0x0000000000002734]
J 6646 c1 de.appsonair.compose.FileUtilsKt$toScaledImageAsset$2.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; (19 bytes) @ 0x00007efde0da6c04 [0x00007efde0da6960+0x00000000000002a4]
J 6490 c1 kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Lkotlinx/coroutines/internal/ScopeCoroutine;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object; (265 bytes) @ 0x00007efde1473d4c [0x00007efde1473880+0x00000000000004cc]
J 4776 c1 kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; (212 bytes) @ 0x00007efde16b49dc [0x00007efde16b3ca0+0x0000000000000d3c]
J 6627 c1 de.appsonair.compose.FileUtilsKt.toScaledImageAsset(Lorg/jetbrains/skija/Image;Ljava/lang/String;IILkotlin/coroutines/Continuation;)Ljava/lang/Object; (34 bytes) @ 0x00007efde10124d4 [0x00007efde1012180+0x0000000000000354]
J 6089 c1 de.appsonair.compose.FileUtilsKt$loadImageSizeFile$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; (201 bytes) @ 0x00007efde17c8214 [0x00007efde17c76e0+0x0000000000000b34]
J 3605 c2 kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Ljava/lang/Object;)V (142 bytes) @ 0x00007efde83f0660 [0x00007efde83f05e0+0x0000000000000080]
J 6572 c2 kotlinx.coroutines.DispatchedTask.run()V (580 bytes) @ 0x00007efde8715acc [0x00007efde8715820+0x00000000000002ac]
J 6611 c1 kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(Lkotlinx/coroutines/scheduling/Task;)V (85 bytes) @ 0x00007efde0e565ac [0x00007efde0e564a0+0x000000000000010c]
J 6608 c1 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(Lkotlinx/coroutines/scheduling/Task;)V (39 bytes) @ 0x00007efde115ff0c [0x00007efde115fc80+0x000000000000028c]
j  kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker()V+44
j  kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run()V+1
v  ~StubRoutines::call_stub

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000002e64

Register to memory mapping:
.....
message has been deleted
o

olonho

11/19/2020, 2:06 PM
please report an issue at https://github.com/JetBrains/compose-jb/issues with reproducer
t

Timo Drick

11/19/2020, 2:08 PM
As i said. It is very difficult to reproduce reliable. Some times i need to scroll throw a list of more than 100/1000 images. Sometimes it happens after showing 10 or 20. But yes i will try to create a bugreport with sample code to reproduce it.
:tnx: 1
i

Igor Demin

11/19/2020, 2:33 PM
So maybe is it necessary to be on the Main/UI thread
By design "Image.asImageAsset()" should be allowed to be called from any thread (because it doesn't use common resources) Maybe it is a bug in skia/skija. Reproducer will help a lot to understand where the bug is.
t

Timo Drick

11/19/2020, 2:45 PM
Ok thanks. Filed a bugreport here: https://github.com/JetBrains/compose-jb/issues/124
👍 1
View count: 3