-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.jetbrains.skiko.RenderException: Cannot init graphic context / Insufficient Memory #4761
Comments
Hey @sunny-chung I can clearly see this in both cases:
I wonder why any metal commands are dispatched in a first place. |
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. |
Thanks, I'll have a look. |
Are there some specific circumstances, that you could note, that lead to this? |
My wild guess is that It was solved by this PR on iOS: JetBrains/compose-multiplatform-core#1127 |
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 |
I have just reproduced with:
During the time, I have no other heavy graphic-demanding applications running. Edit: Run |
Speculative fix for [a case](JetBrains/compose-multiplatform#4761), where a lot of windows are created and dismissed. Caches command queue per device [similar to iOS](JetBrains/compose-multiplatform-core#1127)
Describe the bug
On running the gradle task
run
, an empty window is displayed, and some error messages are logged.Affected platforms
Versions
To Reproduce
Steps and/or the code snippet to reproduce the behavior:
run
. Optionally, add the java VM option-Xmx4096m
to the run configuration.Expected behavior
A window with application UI should be displayed.
Screenshots
Additional context
Log:
When "Insufficient Memory" appeared, I checked "Activity Monitor" in macOS and observed both IntelliJ IDEA and MainKt (the application) did not exceed the customized JVM memory limit. Their sum did not exceed the customized JVM memory limit set on IntelliJ IDEA as well.
"Insufficient Memory" does not always appear (e.g. the first screenshot).
This issue does not consistently appear all the time. I just want to know how could I workaround this when it appears, except restarting my computer.
The text was updated successfully, but these errors were encountered: