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

Invalid python in @imggui.open causes infinite loop and host UI doesn't respond to mouse input #85

Closed
hbk619 opened this issue Jun 29, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@hbk619
Copy link

hbk619 commented Jun 29, 2020

OS: Windows
Talon version: Talon Version: 0.0.8.29-1369-g9618e8f
Expected behaviour: An error to be logged once and the mouse to continue to function

If you have a runtime error in the Python of a method annotated with @imggui.open then Talon logs the error and loops infinitely, trying to draw the GUI, and blocks the UI from having mouse input (clicking other windows etc does nothing). Saying a command that will hide the GUI you're trying to draw or using the keyboard to open Powershell as admin and killing Talon seems to be the only ways to get the mouse responding again.

For example, I got the syntax wrong for looping a dictionary resulting in "too many values to unpack" with the stack trace below after modifying https://github.com/knausj85/knausj_talon/blob/master/code/switcher.py#L81 and saying "list running"

2020-06-29 14:48:29 ERROR cb error topic="draw" cb=<bound method GUI._draw_event of <talon.imgui.GUI object at 0x000000000B304E08>>
   11:                                  talon\canvas.py:16 |
   10:                                  talon\canvas.py:152|
    9:                      talon\scripting\dispatch.py:133|
    8:                      talon\scripting\dispatch.py:126|
    7:                          talon\scripting\rctx.py:201|
    6: ----------------------------------------------------# 'draw' user.talon_new_api_starter_pack.code.switcher:_draw_event()
    5: ----------------------------------------------------# stack splice
    4:                          talon\scripting\rctx.py:199|
    3:                                   talon\imgui.py:765|
    2:                                   talon\imgui.py:756|
    1: user\talon_new_api_starter_pack\code\switcher.py:81 | for k, line in  ctx.lists['self.running']:
@lunixbochs lunixbochs added the bug Something isn't working label Nov 2, 2020
@lunixbochs
Copy link

fixed in next beta, imgui will now hide itself on exception instead of attempting to draw further

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