Skip to content

BUG: Double clicking buttons in GUI breaks button pressing and clicking #60

Closed

Description

@v4u6h4n

Describe the bug
Double clicking buttons to execute the actions associated with that button causes an error that renders button presses unusable, on the physical deck or by double clicking, even after restarting the process.

The log isn't showing the errors I could see in terminal, so I'll just show that below instead, I think it's specifically this section:

Traceback (most recent call last):
  File "/home/v4u6h4n/StreamController/src/backend/DeckManagement/DeckController.py", line 347, in key_change_callback
    self.active_page.ready_to_clear = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ready_to_clear'

This is the rest of the terminal output:

2024-04-20 17:53:31.657 | WARNING  | src.backend.SettingsManager:load_settings_from_file:25 - Settings file /home/v4u6h4n/.var/app/com.core447.StreamController/data/settings/settings.json not found.
Traceback (most recent call last):
  File "/home/v4u6h4n/StreamController/src/backend/DeckManagement/DeckController.py", line 347, in key_change_callback
    self.active_page.ready_to_clear = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ready_to_clear'
2024-04-20 17:54:03.133 | INFO     | src.windows.mainWindow.elements.PageSelector:on_change_page:128 - Load page: <src.backend.PageManagement.Page.Page object at 0x7c92197e0f90>
2024-04-20 17:54:03.134 | INFO     | src.backend.DeckManagement.DeckController:load_page:527 - Loading page ui_BL25K1B02780_10 on deck BL25K1B02780
callback: <bound method PageSelector.update_selected of <PageSelector.PageSelector object at 0x7c92197991c0 (src+windows+mainWindow+elements+PageSelector+PageSelector at 0x5eba552829c0)>>
2024-04-20 17:54:03.136 | INFO     | src.backend.DeckManagement.DeckController:load_page:552 - Loaded page ui_BL25K1B02780_10 on deck BL25K1B02780
2024-04-20 17:54:03.158 | INFO     | src.backend.DeckManagement.DeckController:load_background:382 - Loading background in thread: 136966060377792
2024-04-20 17:54:03.208 | ERROR    | src.backend.PageManagement.Page:make_backup:90 - Invalid json in /home/v4u6h4n/.var/app/com.core447.StreamController/data/pages/ui_BL25K1B02780_10.json: Expecting value: line 1 column 1 (char 0)
2024-04-20 17:54:03.208 | ERROR    | src.backend.PageManagement.Page:make_backup:90 - Invalid json in /home/v4u6h4n/.var/app/com.core447.StreamController/data/pages/ui_BL25K1B02780_10.json: Expecting value: line 1 column 1 (char 0)
2024-04-20 17:54:03.211 | INFO     | src.backend.DeckManagement.DeckController:load_all_keys:466 - Loading all keys took 0.0075223445892333984 seconds
2024-04-20 17:54:03.213 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_keys:327 - Updating all keys took 0.001714468002319336 seconds
2024-04-20 17:54:04.057 | WARNING  | src.backend.SettingsManager:load_settings_from_file:25 - Settings file /home/v4u6h4n/.var/app/com.core447.StreamController/data/settings/settings.json not found.
2024-04-20 17:54:04.068 | INFO     | src.backend.DeckManagement.DeckController:load_page:527 - Loading page ui_BL25K1B02780_9 on deck BL25K1B02780
callback: <bound method PageSelector.update_selected of <PageSelector.PageSelector object at 0x7c92197991c0 (src+windows+mainWindow+elements+PageSelector+PageSelector at 0x5eba552829c0)>>
2024-04-20 17:54:04.070 | INFO     | src.backend.DeckManagement.DeckController:load_page:552 - Loaded page ui_BL25K1B02780_9 on deck BL25K1B02780
2024-04-20 17:54:04.108 | INFO     | src.backend.DeckManagement.DeckController:load_background:382 - Loading background in thread: 136966060377792
2024-04-20 17:54:04.108 | INFO     | src.windows.mainWindow.elements.PageSelector:on_change_page:128 - Load page: <src.backend.PageManagement.Page.Page object at 0x7c92197906d0>
2024-04-20 17:54:04.148 | INFO     | src.backend.DeckManagement.DeckController:load_page:527 - Loading page ui_BL25K1B02780_9 on deck BL25K1B02780
callback: <bound method PageSelector.update_selected of <PageSelector.PageSelector object at 0x7c92197991c0 (src+windows+mainWindow+elements+PageSelector+PageSelector at 0x5eba552829c0)>>
2024-04-20 17:54:04.151 | INFO     | src.backend.DeckManagement.DeckController:load_page:552 - Loaded page ui_BL25K1B02780_9 on deck BL25K1B02780
2024-04-20 17:54:04.176 | ERROR    | src.backend.PageManagement.Page:make_backup:90 - Invalid json in /home/v4u6h4n/.var/app/com.core447.StreamController/data/pages/ui_BL25K1B02780_9.json: Expecting value: line 1 column 1 (char 0)
2024-04-20 17:54:04.183 | INFO     | src.backend.DeckManagement.DeckController:load_all_keys:466 - Loading all keys took 0.034641265869140625 seconds
2024-04-20 17:54:04.185 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_keys:327 - Updating all keys took 0.0020737648010253906 seconds
2024-04-20 17:54:04.211 | INFO     | src.backend.DeckManagement.DeckController:load_background:382 - Loading background in thread: 136966060377792
2024-04-20 17:54:08.399 | INFO     | src.windows.mainWindow.elements.PageSelector:on_change_page:128 - Load page: <src.backend.PageManagement.Page.Page object at 0x7c921977e090>
2024-04-20 17:54:08.399 | INFO     | src.backend.DeckManagement.DeckController:load_page:527 - Loading page Main Menu on deck BL25K1B02780
callback: <bound method PageSelector.update_selected of <PageSelector.PageSelector object at 0x7c92197991c0 (src+windows+mainWindow+elements+PageSelector+PageSelector at 0x5eba552829c0)>>
2024-04-20 17:54:08.401 | INFO     | src.backend.DeckManagement.DeckController:load_page:552 - Loaded page Main Menu on deck BL25K1B02780
2024-04-20 17:54:08.432 | INFO     | src.backend.DeckManagement.DeckController:load_background:382 - Loading background in thread: 136966060377792
2024-04-20 17:54:08.485 | INFO     | src.backend.DeckManagement.DeckController:load_all_keys:466 - Loading all keys took 0.011605024337768555 seconds
2024-04-20 17:54:08.488 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_keys:327 - Updating all keys took 0.002725362777709961 seconds
2024-04-20 17:54:09.775 | WARNING  | src.backend.SettingsManager:load_settings_from_file:25 - Settings file /home/v4u6h4n/.var/app/com.core447.StreamController/data/settings/settings.json not found.
Traceback (most recent call last):
  File "/home/v4u6h4n/StreamController/src/backend/DeckManagement/DeckController.py", line 347, in key_change_callback
    self.active_page.ready_to_clear = False
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ready_to_clear'
^C2024-04-20 17:54:12.825 | INFO     | src.app:on_quit:119 - Quitting...
2024-04-20 17:54:13.231 | DEBUG    | src.app:on_quit:137 - non-daemon threads:
2024-04-20 17:54:13.231 | DEBUG    | src.app:on_quit:141 - name: MainThread, id: 136968583485248 id2: 977334
2024-04-20 17:54:13.231 | DEBUG    | src.app:on_quit:141 - name: tick_actions, id: 136966282675904 id2: 977424
2024-04-20 17:54:13.231 | DEBUG    | src.app:on_quit:141 - name: tick_actions, id: 136965890508480 id2: 977474
2024-04-20 17:54:13.231 | DEBUG    | src.app:on_quit:141 - name: tick_actions, id: 136965668210368 id2: 977499
2024-04-20 17:54:13.231 | INFO     | src.backend.DeckManagement.DeckManager:close_all:167 - Closing all decks
2024-04-20 17:54:13.232 | INFO     | src.backend.DeckManagement.DeckManager:close_all:174 - Closing deck: BL25K1B02779
2024-04-20 17:54:13.258 | INFO     | src.backend.DeckManagement.DeckManager:close_all:174 - Closing deck: BL25K1B02780
2024-04-20 17:54:13.288 | INFO     | src.backend.DeckManagement.DeckManager:close_all:174 - Closing deck: BL25K1B02763
2024-04-20 17:54:13.315 | INFO     | src.backend.DeckManagement.DeckManager:close_all:174 - Closing deck: BL19K1B01105
2024-04-20 17:54:13.338 | SUCCESS  | src.app:on_quit:150 - Stopped StreamController. Have a nice day!

UPDATE: It's not just double clicking, I just stumbled across the bug again during normal use, during page change actions. The button press that triggers the error displays the pressed image (the original image of the button minimised to a smaller square).

Activity

  1. Core447 commented on Apr 20, 2024

    @Core447
    Member

    This might be fixed now, can you please try again?

    Some problems might be caused by the "Number of cached pages" setting. Can you try to change it to more than 4 if the new fixes don't work?

    image

  2. v4u6h4n commented on Apr 20, 2024

    @v4u6h4n
    Author

    I cranked up the cache, but something is still bugged out. I don't know if it helps but this seems new, after one of the updates from today, because I was able to navigate more before this.

    2024-04-20 19:42:58.995 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_keys:327 - Updating all keys took 0.002388477325439453 seconds
    2024-04-20 19:42:59.033 | DEBUG    | src.backend.PageManagement.Page:load:67 - Loaded page ui_BL25K1B02780_107 in 0.04 seconds
    2024-04-20 19:42:59.036 | INFO     | src.backend.DeckManagement.DeckController:load_page:527 - Loading page ui_BL25K1B02780_107 on deck BL19K1B01105
    callback: <bound method PageSelector.update_selected of <PageSelector.PageSelector object at 0x72ad51b511c0 (src+windows+mainWindow+elements+PageSelector+PageSelector at 0x649a6b7acaf0)>>
    2024-04-20 19:42:59.084 | INFO     | src.backend.DeckManagement.DeckController:load_page:552 - Loaded page ui_BL25K1B02780_107 on deck BL19K1B01105
    2024-04-20 19:42:59.105 | INFO     | src.backend.DeckManagement.DeckController:load_background:382 - Loading background in thread: 126087688357568
    2024-04-20 19:42:59.160 | INFO     | src.backend.DeckManagement.DeckController:load_all_keys:466 - Loading all keys took 0.009505033493041992 seconds
    2024-04-20 19:42:59.166 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_keys:327 - Updating all keys took 0.005666971206665039 seconds
    Traceback (most recent call last):
      File "/usr/bin/streamdeckc", line 8, in <module>
        sys.exit(execute())
                 ^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/streamdeck_ui/cli/server.py", line 167, in execute
        sock.connect(path)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "/usr/bin/streamdeckc", line 8, in <module>
        sys.exit(execute())
                 ^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/streamdeck_ui/cli/server.py", line 167, in execute
        sock.connect(path)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "/usr/bin/streamdeckc", line 8, in <module>
        sys.exit(execute())
                 ^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/streamdeck_ui/cli/server.py", line 167, in execute
        sock.connect(path)
    FileNotFoundError: [Errno 2] No such file or directory
    2024-04-20 19:43:02.847 | INFO     | __main__:update_assets:136 - Updating 0 store assets took 10.630457401275635 seconds
    
  3. Core447 commented on Apr 20, 2024

    @Core447
    Member

    This is a strange bug. Do you have the streamcontroller dependencies installed in a venv? If not, please follow our guide to set one up. It seems like some streamdeck_ui packages are being used

  4. v4u6h4n commented on Apr 20, 2024

    @v4u6h4n
    Author

    Oh I'm such a dummy. I was using the streamdeckc (command line for streamdeck-gui) for page changes across multiple decks in my scripts --_--

    Sorry!

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