Skip to content
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

Bug: Applications fails if you have enabled ViewportsEnable and screens with different UI scaling configured on system level #137

Open
Raspberry-Crocodile opened this issue Aug 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Raspberry-Crocodile
Copy link

Raspberry-Crocodile commented Aug 24, 2022

Version

1.86.4

What happened?

Applications (e.g. example from this repository - ./gradlew :example:run) with enabled ImGuiConfigFlags.ViewportsEnable fails if you have two displays with different UI scaling configured throught Windows 11 settings (e.g. 100% and 200%, 125% and 150% etc)

Reproduction

Prerequisites:
-Windows 11 Pro (21H2 v.22000.527) (have no idea is it reproducible on Windows 10 or not)
-Two displays with different UI scaling (e.g. 100% and 200%, 125% and 100% etc)
My monitors have different resolutions (UHD and FHD), but application runs fine while you have same (does not matter which one 100% or 175%) scaling on both monitors
-Copy of this repository of version 1.86.4

Steps:

  1. execute ./gradlew :example:run

Relevant log output

[LWJGL] GLFW_PLATFORM_ERROR error
        Description : Win32: Failed to query monitor DPI
        Stacktrace  :
                org.lwjgl.glfw.GLFW.glfwGetMonitorContentScale(GLFW.java:5138)
                imgui.glfw.ImGuiImplGlfw.updateMonitors(ImGuiImplGlfw.java:587)
                imgui.glfw.ImGuiImplGlfw.init(ImGuiImplGlfw.java:324)
                imgui.app.Window.init(Window.java:50)
                imgui.app.Application.initialize(Application.java:92)
                imgui.app.Application.launch(Application.java:82)
                Main.main(Main.java:100)
Dear ImGui Assertion Failed: ImRect(mon.MainPos, mon.MainPos + mon.MainSize).Contains(ImRect(mon.WorkPos, mon.WorkPos + mon.WorkSize)) && "Monitor work bounds not setup properly. If you don't have work area information, just copy MainPos/MainSize into them."
Assertion Located At: /tmp/imgui/jni/imgui.cpp:8128
java.lang.Exception: Stack trace
        at java.lang.Thread.dumpStack(Thread.java:1341)
        at imgui.ImGui$1.imAssertCallback(ImGui.java:85)
        at imgui.assertion.ImAssertCallback.imAssert(ImAssertCallback.java:21)
        at imgui.ImGui.newFrame(Native Method)
        at imgui.app.Window.startFrame(Window.java:193)
        at imgui.app.Window.runFrame(Window.java:166)
        at imgui.app.Window.run(Window.java:158)
        at imgui.app.Application.launch(Application.java:84)
        at Main.main(Main.java:100)
@Raspberry-Crocodile Raspberry-Crocodile added the bug Something isn't working label Aug 24, 2022
@SpaiR SpaiR added the api label Feb 27, 2023
@SpaiR SpaiR removed the api label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants