JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.9k stars 1.16k forks source link

Texts are not displayed on specific windows device #3247

Open sdercolin opened 1 year ago

sdercolin commented 1 year ago

Describe the bug All texts are not displayed on a specific device.

Affected platforms Select one of the platforms below:

Versions

To Reproduce

Tested with the Hello World project template created by IDEA.

@Composable
@Preview
fun App() {
    var text by remember { mutableStateOf("Hello, World!") }

    MaterialTheme {
        Button(onClick = {
            text = "Hello, Desktop!"
        }) {
            Text(text)
        }
    }
}

fun main() = application {
    Window(onCloseRequest = ::exitApplication) {
        App()
    }
}

Expected behavior A clear and concise description of what you expected to happen.

image

Screenshots

image

Additional context

m-sasha commented 1 year ago

Does this show the text?

fun main() = singleWindowApplication(
    state = WindowState(
        size = DpSize(400.dp, 800.dp)
    )
) {
    Text("Hello")
}
sdercolin commented 1 year ago

Tried. The text is still not displayed.

m-sasha commented 1 year ago

We're going to need something more to go on, since it's obviously a unique case. Can you think of any reason (other than the locale) that particular PC won't render compose text?

sdercolin commented 1 year ago

I think it looks like similar to #214, but it's already solved 🤔 Not sure if related but this device is AMD CPU, which is somehow rare..

m-sasha commented 1 year ago

Maybe it's a regression, or maybe that PC has even less memory in its graphics card. Can you try with either SKIKO_RENDER_API=SOFTWARE (environment variable) or skiko.renderApi=SOFTWARE (Java system property)?

sdercolin commented 1 year ago

It's working after setting SKIKO_RENDER_API=SOFTWARE!

Is it possible to fix the problem?

m-sasha commented 1 year ago

What's the graphics card on that PC?

sdercolin commented 1 year ago

Provided by the user integrated graphic ati radeon 4200 hd

m-sasha commented 1 year ago

That GPU doesn't support even DirectX 11. But we should fallback gracefully to OpenGL or software renderer.

Can you try SKIKO_RENDER_API=OPENGL?

sdercolin commented 1 year ago

Sorry for the delay. OPENGL does not work either.

m-sasha commented 1 year ago

Perhaps our fallback mechanism is broken or doesn't always detect an unsupported render API.

m-sasha commented 1 year ago

The GPU specs: https://www.techpowerup.com/gpu-specs/radeon-hd-4200-igp.c775

okushnikov commented 2 weeks ago

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