Skip to content

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

Description

@hbk619

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']:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions