Coder Social home page Coder Social logo

Comments (7)

elijah-semyonov avatar elijah-semyonov commented on May 30, 2024

Hey @sunny-chung
What is the device you are running this on?
Can you create a minimal reproducible with this problem and share it with us?

I can clearly see this in both cases:

Failed to create Skia Metal context!

I wonder why any metal commands are dispatched in a first place.

from compose-multiplatform.

sunny-chung avatar sunny-chung commented on May 30, 2024

Hi @elijah-semyonov

I am running on a M2 MacBook Pro.

I can only provide the project I am working on to you, as I am not sure what is going on. The issue is not frequently reproducible. But once I hit it, I would keep hitting for a while. The file Main.kt may have what you need. Please let me know if I use Compose Desktop in a wrong way.

https://github.com/sunny-chung/hello-http/blob/f2dac5216bf8b96c28b57e43a1d6ac03870b7470/src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/Main.kt

from compose-multiplatform.

elijah-semyonov avatar elijah-semyonov commented on May 30, 2024

Thanks, I'll have a look.

from compose-multiplatform.

elijah-semyonov avatar elijah-semyonov commented on May 30, 2024

Are there some specific circumstances, that you could note, that lead to this?
Do you have some heavy graphics application running along? I've played with an app for several minutes but didn't manage to reproduce the behavior.

from compose-multiplatform.

elijah-semyonov avatar elijah-semyonov commented on May 30, 2024

My wild guess is that id <MTLCommandQueue> is null if there are windows(popups) opened and closed very quickly for continuous time span.

It was solved by this PR on iOS: JetBrains/compose-multiplatform-core#1127
If it's indeed the case, I'll roll a speculative fix for skiko window management on macOS.

from compose-multiplatform.

sunny-chung avatar sunny-chung commented on May 30, 2024

It apparently only reproducible with IntelliJ IDEA and after I upgraded Compose Multiplatform from 1.6.0-rc02 to 1.6.2. It only happens while launching the application.

I did have running lots of browsers along. It seems my Mac runs apparently slower and displays some black pixels if I have Instagram with HDR media opening.

Near the end of Main.kt, there is a dummy Window. It will be dismissed after some background loading and after 500ms, and immediately followed by launching another Window. Perhaps that relates to the issue you mentioned.

from compose-multiplatform.

sunny-chung avatar sunny-chung commented on May 30, 2024

I have just reproduced with:

  1. Run the gradle task run with IntelliJ IDEA.
  2. Without closing the application, run a test case in the "ux-and-transport-test" module of the project using the green triangle button in IntelliJ IDEA. The window created in the test case is an empty window.
  3. Stop all the tasks.
  4. Rerun the test case. The window created is normal now.
  5. Repeat step 1 - 4 for several times.
  6. Without running the application, run the gradle task :ux-and-transport-test:check, the window created is an empty window.
  7. Stop it and then run the gradle task run. Now the application also shows an empty window, with the reported error messages output in the console.
  8. Rerun the gradle task run, the issue still exists.
  9. Stop it, run the gradle task clean and then run, the issue still exists.

During the time, I have no other heavy graphic-demanding applications running.

Edit: Run ./gradlew run in an external console yields the same result. Sometimes the issue is gone for a short while after reopening IntelliJ IDEA, sometimes after I rerun the :ux-and-transport-test:check gradle task and let it completes for several times.

from compose-multiplatform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.