Skip to content

BUG: "Run Command" after "Change Page" action only works once #475

@ermshiperete

Description

@ermshiperete

Describe the bug
I have a button that has two actions: "Change Page" and "Run Command" which changes to the default page and starts an application. This works fine the first time after StreamController gets started, but after the first time it only changes the page but no longer runs the command.

To Reproduce
Steps to reproduce the behavior:

  1. On a non-default page, add the following actions to a button:

    • "Change Page" with "Page:" set to "Default"
    • "Run Command" with "Command" set to "/tmp/stream-test.sh"
  2. Create the stream-test.sh script with the following content:

    #!/bin/bash
    echo "$(date): Calling stream-test.sh" >> /tmp/stream-test.log
    

    and make it executable with chmod +x /tmp/stream-test.sh

  3. Now press the button (which will change to the default page), change back to the non-default page and press the button again.

Expected behavior
After pressing the button twice the file /tmp/stream-test.log should have two lines saying "Calling stream-test.sh"

Actual behavior
After pressing the button twice the file /tmp/stream-test.log has only one line

Additional context
The log file shows this for the first button press:

INFO     | src.backend.DeckManagement.DeckController:load_page:666 - Loading page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_page:697 - Loaded page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_background:518 - Loading background in thread: 129133468174016
INFO     | src.backend.DeckManagement.DeckController:load_all_inputs:604 - Loading all inputs took 0.029149293899536133 seconds
DEBUG    | src.backend.DeckManagement.DeckController:update_all_inputs:434 - Updating all inputs took 0.006827354431152344 seconds
INFO     | src.windows.mainWindow.elements.PageSelector:on_change_page:127 - Load page: <src.backend.PageManagement.Page.Page object at 0x7572675cf380>
INFO     | src.backend.DeckManagement.DeckController:load_page:666 - Loading page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_page:697 - Loaded page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_background:518 - Loading background in thread: 129133468174016
INFO     | src.backend.DeckManagement.DeckController:load_all_inputs:604 - Loading all inputs took 0.021685361862182617 seconds
DEBUG    | src.backend.DeckManagement.DeckController:update_all_inputs:434 - Updating all inputs took 0.003911495208740234 seconds

and this for subsequent button presses:

INFO     | src.backend.DeckManagement.DeckController:load_page:666 - Loading page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_page:697 - Loaded page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_background:518 - Loading background in thread: 129133468174016
INFO     | src.windows.mainWindow.elements.PageSelector:on_change_page:127 - Load page: <src.backend.PageManagement.Page.Page object at 0x7572675cf380>
INFO     | src.backend.DeckManagement.DeckController:load_page:666 - Loading page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_all_inputs:604 - Loading all inputs took 0.025401830673217773 seconds
DEBUG    | src.backend.DeckManagement.DeckController:update_all_inputs:434 - Updating all inputs took 0.0052165985107421875 seconds
INFO     | src.backend.DeckManagement.DeckController:load_page:697 - Loaded page Default on deck A00DA4191KI7
INFO     | src.backend.DeckManagement.DeckController:load_background:518 - Loading background in thread: 129133468174016
INFO     | src.backend.DeckManagement.DeckController:load_all_inputs:604 - Loading all inputs took 0.016976118087768555 seconds
DEBUG    | src.backend.DeckManagement.DeckController:update_all_inputs:434 - Updating all inputs took 0.004123210906982422 seconds

So the only visible difference is the order of src.windows.mainWindow.elements.PageSelector:on_change_page and src.backend.DeckManagement.DeckController:load_all_inputs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions