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

Unexpect exit of ggui window after clicking Alt, Shift or Ctrl #6513

Open
Rabmelon opened this issue Nov 3, 2022 · 2 comments
Open

Unexpect exit of ggui window after clicking Alt, Shift or Ctrl #6513

Rabmelon opened this issue Nov 3, 2022 · 2 comments
Labels
potential bug Something that looks like a bug but not yet confirmed welcome contribution

Comments

@Rabmelon
Copy link

Rabmelon commented Nov 3, 2022

Describe the bug
Unexpect exit of ggui after pressing Alt, Shift and Ctrl after using window.get_events in code to press ESC to exit.

To Reproduce
I want my ggui can be closed after I press ESC (or other keys such as r). However when I want to change to another window using Alt+Tab I find that the ggui exits wrongly.

It will fatally exit after pressing the button Alt, Shift or Ctrl (maybe not after the first press, but the second or the third press), and refer to the running information the key Super may also cause this error. Also, the problem happens both in my laptop and PC.

import taichi as ti
ti.init()
window = ti.ui.Window('TEST', (768, 512))
while window.running:
	for e in window.get_events(ti.ui.PRESS):
		if e.key == ti.ui.ESCAPE:
			window.running = False
	window.show()

By the way, code as below runs well without the function of pressing a button:

import taichi as ti
ti.init()
window = ti.ui.Window('TEST', (768, 512))
while window.running:
	window.show()

Log
All running information:

$ti .\test_ggui.py
[Taichi] version 1.2.1, llvm 10.0.0, commit 12ab828a, win, python 3.9.13
[Taichi] Starting on arch=x64
[I 11/03/22 16:48:17.613 3644] [C:/Users/buildbot/actions-runner/_work/taichi/taichi/taichi/rhi/vulkan/vulkan_device_creator.cpp:pick_physical_device@394] Found Vulkan Device 0 (NVIDIA GeForce RTX 3060 Laptop GPU)
[I 11/03/22 16:48:17.613 3644] [C:/Users/buildbot/actions-runner/_work/taichi/taichi/taichi/rhi/vulkan/vulkan_device_creator.cpp:find_queue_families@148] Async compute queue 2, graphics queue 0
[I 11/03/22 16:48:17.613 3644] [C:/Users/buildbot/actions-runner/_work/taichi/taichi/taichi/rhi/vulkan/vulkan_device_creator.cpp:find_queue_families@148] Async compute queue 2, graphics queue 0
[I 11/03/22 16:48:17.613 3644] [C:/Users/buildbot/actions-runner/_work/taichi/taichi/taichi/rhi/vulkan/vulkan_device_creator.cpp:create_logical_device@462] Vulkan Device "NVIDIA GeForce RTX 3060 Laptop GPU" supports Vulkan 0 version 1.3.194
[I 11/03/22 16:48:17.766 3644] [C:/Users/buildbot/actions-runner/_work/taichi/taichi/taichi/rhi/vulkan/vulkan_device.cpp:create_swap_chain@2416] Creating suface of 768x512
Assertion failed: (key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods", file C:/Users/buildbot/actions-runner/_work/taichi/taichi/external/imgui/imgui.cpp, line 7234
@Rabmelon Rabmelon added the potential bug Something that looks like a bug but not yet confirmed label Nov 3, 2022
@gingerkidney gingerkidney removed their assignment Dec 6, 2022
@maxstronge
Copy link

Having this exact same issue, any update on this?

@Rabmelon
Copy link
Author

Rabmelon commented Dec 7, 2022

Having this exact same issue, any update on this?

Not yet I think. Still having this issue in version 1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed welcome contribution
Projects
Status: Backlog
Development

No branches or pull requests

3 participants