StreamController / StreamController

An elegant Linux app for the Elgato Stream Deck with support for plugins
https://core447.com
GNU General Public License v3.0
250 stars 31 forks source link

Page Manager hangs for 45 seconds #183

Open jfbauer432 opened 2 months ago

jfbauer432 commented 2 months ago

Describe the bug When trying to bring up the Page Manger it takes about 45 seconds for the window to appear and the GUI is unresponsive during that time. Also doing any operation in the Page Manager also seem to cause it to hang for that same amount of time.

To Reproduce Steps to reproduce the behavior:

  1. Do not have any StreamDecks plugged in (not sure if that is important)
  2. Start with a clean slate: rm -rf .var/app/com.core447.StreamController (or just rename it)
  3. Run StreamController: flatpak run com.core447.StreamController
  4. Dismiss welcome window
  5. Add a Fake Deck, number of Fake Decks: 1, Dismiss window
  6. Create new page and give it a name.
  7. Click on icon to open Page Manger
  8. Notice long time before window appears. Trying to do anything (like selecting a page) takes an additional 45 seconds for the operation to complete

Expected behavior Page Manager window should appear right away and be responsive.

Terminal output

$ flatpak run com.core447.StreamController 
 _____ _                            _____             _             _ _           
/  ___| |                          /  __ \           | |           | | |          
\ `--.| |_ _ __ ___  __ _ _ __ ___ | /  \/ ___  _ __ | |_ _ __ ___ | | | ___ _ __ 
 `--. \ __| '__/ _ \/ _` | '_ ` _ \| |    / _ \| '_ \| __| '__/ _ \| | |/ _ \ '__|
/\__/ / |_| | |  __/ (_| | | | | | | \__/\ (_) | | | | |_| | | (_) | | |  __/ |   
\____/ \__|_|  \___|\__,_|_| |_| |_|\____/\___/|_| |_|\__|_|  \___/|_|_|\___|_|   

2024-07-22 09:42:26.584 | INFO     | __main__:quit_running:195 - Checking if another instance is running
2024-07-22 09:42:26.589 | INFO     | __main__:quit_running:203 - No other instance running, continuing
2024-07-22 09:42:26.589 | ERROR    | __main__:quit_running:204 - org.freedesktop.DBus.Error.ServiceUnknown: The name com.core447.StreamController was not provided by any .service files
2024-07-22 09:42:26.606 | INFO     | src.backend.Migration.MigrationManager:run_migrators:30 - Running migrator to app version 1.5.0-beta.5
2024-07-22 09:42:26.607 | SUCCESS  | src.backend.Migration.MigrationManager:run_migrators:33 - Successfully ran migrator to app version 1.5.0-beta.5
2024-07-22 09:42:26.609 | ERROR    | src.backend.GnomeExtensions:connect_dbus:31 - Failed to connect to D-Bus: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files
2024-07-22 09:42:26.610 | INFO     | src.backend.PageManagement.PageManagerBackend:update_auto_change_info:329 - Updated auto-change info in 5.4836273193359375e-05 seconds
2024-07-22 09:42:26.651 | INFO     | src.backend.WindowGrabber.WindowGrabber:init_integration:62 - Initializing window grabber for environment: xfce under server: x11
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
2024-07-22 09:42:27.413 | INFO     | __main__:update_assets:155 - Updating store assets
2024-07-22 09:42:27.430 | INFO     | __main__:load:96 - Loading app
2024-07-22 09:42:27.450 | INFO     | src.backend.DeckManagement.DeckManager:__init__:63 - Running under Flatpak. Using separate thread to disconnect device disconnection.
2024-07-22 09:42:27.451 | INFO     | src.backend.DeckManagement.DeckManager:__init__:67 - Beta resume mode: True

(process:3): Gtk-WARNING **: 09:42:27.467: Theme parser error: style.css:399:19-27: Unknown name of pseudo-class
2024-07-22 09:42:27.558 | TRACE    | src.app:on_activate:73 - running: on_activate
2024-07-22 09:42:27.559 | TRACE    | src.windows.mainWindow.mainWindow:build:93 - Building main window
/bin/sh: line 1: flatpak: command not found

** (StreamController:3): WARNING **: 09:42:27.964: expected enumeration type PangoWrapMode, but got GtkWrapMode instead
/app/bin/StreamController/src/windows/Onboarding/OnboardingWindow.py:358: Warning: value "((PangoWrapMode) 3)" of type 'PangoWrapMode' is invalid or out of range for property 'wrap-mode' of type 'PangoWrapMode'
  self.detail = Gtk.Label(label="Join our discord to ask questions, get help and request new features!", css_classes=["onboarding-welcome-detail-label"],
2024-07-22 09:42:28.004 | SUCCESS  | src.app:on_activate:103 - Finished loading app
2024-07-22 09:42:28.010 | INFO     | autostart:request_background_callback:57 - request_background success=False
2024-07-22 09:42:28.011 | INFO     | autostart:setup_autostart_desktop_entry:81 - Setting up autostart using desktop entry
2024-07-22 09:42:28.012 | INFO     | autostart:setup_autostart_desktop_entry:92 - Autostart set up at: /home/jfb/.config/autostart/StreamController.desktop
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
2024-07-22 09:42:32.255 | INFO     | __main__:update_assets:163 - Updating 0 store assets took 4.8425774574279785 seconds
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
2024-07-22 09:44:15.372 | INFO     | src.backend.DeckManagement.DeckManager:load_fake_decks:99 - Loading 1 fake deck(s)
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.

(StreamController:3): Gtk-CRITICAL **: 09:44:42.763: gtk_editable_set_text: assertion 'text != NULL' failed
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
2024-07-22 09:44:46.753 | INFO     | src.backend.PageManagement.PageManagerBackend:update_auto_change_info:329 - Updated auto-change info in 0.0005736351013183594 seconds
2024-07-22 09:44:46.757 | DEBUG    | src.backend.PageManagement.Page:load:77 - Loaded page test in 0.00 seconds
2024-07-22 09:44:46.758 | INFO     | src.backend.DeckManagement.DeckController:load_page:670 - Loading page test on deck fake-deck-1
2024-07-22 09:44:46.827 | INFO     | src.backend.DeckManagement.DeckController:load_page:699 - Loaded page test on deck fake-deck-1
2024-07-22 09:44:46.858 | INFO     | src.backend.DeckManagement.DeckController:load_background:522 - Loading background in thread: 136190504208064
2024-07-22 09:44:46.888 | INFO     | src.backend.DeckManagement.DeckController:load_all_inputs:608 - Loading all inputs took 0.0023064613342285156 seconds
2024-07-22 09:44:46.899 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_inputs:432 - Updating all inputs took 0.010963916778564453 seconds
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.

Additional context StreamController 1.5.0-beta.6 Ubuntu 24.04 Xorg Xfce4

Core447 commented 2 months ago

I'm not experiencing this. Can you please check if you're also facing this problem on Wayland? If not, 9f5ea0590d3d9ffa9d1a438b467c06c4a3bd7e9d might fix it for X on future app versions

jfbauer432 commented 2 months ago

Tried it on Wayland (along with Unity as xfce4 4.18.3 doesn't seem to have wayland support) . Problem did not reproduce there.

I went back to Xorg/xfce4. And gave it another try. Now it works as expected. Not sure how it fixed itself, but I did a reboot when doing the Wayland test.

If it happens again, do you want me to try anything?

Core447 commented 2 months ago

Tried it on Wayland (along with Unity as xfce4 4.18.3 doesn't seem to have wayland support) . Problem did not reproduce there.

I went back to Xorg/xfce4. And gave it another try. Now it works as expected. Not sure how it fixed itself, but I did a reboot when doing the Wayland test.

Weird. During my test on Ubuntu 22.04 LTS on X I had no problem.

If it happens again, do you want me to try anything?

It would be nice if you could capture the logs if this happens again, by closing the current instance via the option in the hamburger menu and reopening the app from the command line using flatpak run com.core447.StreamController.

jfbauer432 commented 2 months ago

I has happened again, but not as long of a delay. When the problem went away, the time to bring up the Page Manager window was less than 1 second. I day or two later, I noticed it had increased to 3-5 seconds. Today, I see that it is taking about 16 seconds.

All I did was...

  1. Run StreamController (no StreamDeck was connected)
  2. Clicked on button to bring up Page Manager.
  3. Dismissed window when it appeared
  4. Selected Quit from hamburger menu on main window
$ flatpak run com.core447.StreamController
 _____ _                            _____             _             _ _           
/  ___| |                          /  __ \           | |           | | |          
\ `--.| |_ _ __ ___  __ _ _ __ ___ | /  \/ ___  _ __ | |_ _ __ ___ | | | ___ _ __ 
 `--. \ __| '__/ _ \/ _` | '_ ` _ \| |    / _ \| '_ \| __| '__/ _ \| | |/ _ \ '__|
/\__/ / |_| | |  __/ (_| | | | | | | \__/\ (_) | | | | |_| | | (_) | | |  __/ |   
\____/ \__|_|  \___|\__,_|_| |_| |_|\____/\___/|_| |_|\__|_|  \___/|_|_|\___|_|   

2024-07-27 12:31:40.161 | INFO     | __main__:quit_running:195 - Checking if another instance is running
2024-07-27 12:31:40.165 | INFO     | __main__:quit_running:203 - No other instance running, continuing
2024-07-27 12:31:40.165 | ERROR    | __main__:quit_running:204 - org.freedesktop.DBus.Error.ServiceUnknown: The name com.core447.StreamController was not provided by any .service files
2024-07-27 12:31:40.208 | ERROR    | src.backend.GnomeExtensions:connect_dbus:31 - Failed to connect to D-Bus: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files
2024-07-27 12:31:40.211 | INFO     | src.backend.PageManagement.PageManagerBackend:update_auto_change_info:329 - Updated auto-change info in 0.00021219253540039062 seconds
launch backend
2024-07-27 12:31:40.581 | INFO     | src.backend.PluginManager.PluginBase:launch_backend:519 - Launching backend: source /home/jfb/.var/app/com.core447.StreamController/data/plugins/com_core447_OBSPlugin/backend/.venv/bin/activate && python3 /home/jfb/.var/app/com.core447.StreamController/data/plugins/com_core447_OBSPlugin/backend/backend.py --port=38973
2024-07-27 12:31:40.710 | SUCCESS  | streamcontroller_plugin_tools.BackendBase:start_server:33 - Started server
2024-07-27 12:31:40.718 | DEBUG    | OBSController:connect_to:30 - Trying to connect to obs with legacy: False
2024-07-27 12:31:40.718 | INFO     | OBSController:connect_to:34 - Successfully connected to OBS
backend launched
2024-07-27 12:31:40.996 | ERROR    | plugins.com_core447_OSPlugin.main:init_vars:245 - "/dev/uinput" cannot be opened for writing
2024-07-27 12:31:40.998 | INFO     | src.backend.WindowGrabber.WindowGrabber:init_integration:62 - Initializing window grabber for environment: xfce under server: x11
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
2024-07-27 12:31:41.506 | INFO     | autostart:setup_autostart_desktop_entry:81 - Setting up autostart using desktop entry
2024-07-27 12:31:41.507 | INFO     | autostart:setup_autostart_desktop_entry:99 - Autostart removed from: /home/jfb/.config/autostart/StreamController.desktop
2024-07-27 12:31:41.528 | INFO     | __main__:load:96 - Loading app
2024-07-27 12:31:41.551 | INFO     | src.backend.DeckManagement.DeckManager:__init__:63 - Running under Flatpak. Using separate thread to disconnect device disconnection.
2024-07-27 12:31:41.553 | INFO     | src.backend.DeckManagement.DeckManager:__init__:67 - Beta resume mode: True
2024-07-27 12:31:41.566 | INFO     | src.backend.DeckManagement.DeckManager:load_fake_decks:99 - Loading 1 fake deck(s)
2024-07-27 12:31:41.571 | INFO     | src.backend.PluginManager.ActionBase:__init__:77 - Loaded action Change Page with id com_core447_DeckPlugin::ChangePage
2024-07-27 12:31:41.571 | INFO     | src.backend.PluginManager.ActionBase:__init__:77 - Loaded action Digital clock with id com_core447_Clocks::DigitalClock
2024-07-27 12:31:41.572 | INFO     | src.backend.PluginManager.ActionBase:__init__:77 - Loaded action Run Command with id com_core447_OSPlugin::RunCommand
2024-07-27 12:31:41.572 | INFO     | src.backend.PluginManager.ActionBase:__init__:77 - Loaded action Run Command with id com_core447_OSPlugin::RunCommand
2024-07-27 12:31:41.573 | DEBUG    | src.backend.PageManagement.Page:load:77 - Loaded page Main in 0.00 seconds
2024-07-27 12:31:41.573 | INFO     | src.backend.DeckManagement.DeckController:load_page:670 - Loading page Main on deck fake-deck-1
2024-07-27 12:31:41.657 | INFO     | src.backend.DeckManagement.DeckController:load_page:699 - Loaded page Main on deck fake-deck-1
2024-07-27 12:31:41.688 | INFO     | src.backend.DeckManagement.DeckController:load_background:522 - Loading background in thread: 139560866547392

(process:3): Gtk-WARNING **: 12:31:41.690: Theme parser error: style.css:399:19-27: Unknown name of pseudo-class
findfont: Font family [''] not found. Falling back to DejaVu Sans.
2024-07-27 12:31:41.746 | INFO     | src.backend.DeckManagement.DeckController:load_all_inputs:608 - Loading all inputs took 0.028921842575073242 seconds
2024-07-27 12:31:41.762 | DEBUG    | src.backend.DeckManagement.DeckController:update_all_inputs:432 - Updating all inputs took 0.015464544296264648 seconds
2024-07-27 12:31:41.795 | TRACE    | src.app:on_activate:73 - running: on_activate
2024-07-27 12:31:41.796 | TRACE    | src.windows.mainWindow.mainWindow:build:93 - Building main window
xprop: error: Invalid window id format: 0x0.
2024-07-27 12:31:42.187 | SUCCESS  | src.app:on_activate:103 - Finished loading app
2024-07-27 12:31:42.191 | INFO     | autostart:request_background_callback:57 - request_background success=False
2024-07-27 12:31:42.191 | INFO     | autostart:setup_autostart_desktop_entry:81 - Setting up autostart using desktop entry
2024-07-27 12:31:42.192 | INFO     | autostart:setup_autostart_desktop_entry:92 - Autostart set up at: /home/jfb/.config/autostart/StreamController.desktop
2024-07-27 12:31:42.204 | INFO     | __main__:update_assets:163 - Updating 0 store assets took 0.6902649402618408 seconds
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.

** Clicked on button to bring up Page Manager **

xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
xprop: error: Invalid window id format: 0x0.
2024-07-27 12:32:15.358 | INFO     | src.app:on_quit:140 - Quitting...
xprop: error: Invalid window id format: 0x0.
2024-07-27 12:32:15.465 | DEBUG    | src.app:on_quit:158 - non-daemon threads:
2024-07-27 12:32:15.465 | DEBUG    | src.app:on_quit:162 - name: MainThread, id: 139562284492608 id2: 3
2024-07-27 12:32:15.466 | DEBUG    | src.app:on_quit:162 - name: FlatpakDeckDisconnectThread, id: 139561025930944 id2: 49
2024-07-27 12:32:15.466 | DEBUG    | src.app:on_quit:162 - name: tick_actions, id: 139560856061632 id2: 54
2024-07-27 12:32:15.466 | INFO     | src.backend.DeckManagement.DeckManager:close_all:198 - Closing all decks
2024-07-27 12:32:15.466 | INFO     | src.backend.DeckManagement.DeckManager:close_all:205 - Closing deck: fake-deck-1
2024-07-27 12:32:15.467 | SUCCESS  | src.app:on_quit:172 - Stopped StreamController. Have a nice day!
xprop: error: Invalid window id format: 0x0.
2024-07-27 12:32:15.761 | INFO     | streamcontroller_plugin_tools.BackendBase:on_disconnect:39 - Connection closed
$ 
Core447 commented 2 months ago

xprop: error: Invalid window id format: 0x0. might be the problem. Can you please check if the lag increases the more windows you have opened?

jfbauer432 commented 2 months ago

In this test, the only thing I changed was the number of browser (firefox) windows open and I restarted StreamController each time.

17 browser windows --> time to open Page Manager = 12 seconds none --> 6 seconds 15 --> 11 seconds 25 --> 16 seconds

In case it might be important, I have noticed StreamController complain (stderr) whenever there happens to be another program/window with an '&' in the title.

Core447 commented 2 months ago

Thanks for the detailed testing! Can you maybe share the exact output of the error with the & sign?

jfbauer432 commented 2 months ago

I started a program with a title set that had an & in it (I originally saw it with the title of a web browser window, but this works just as easily).

xterm -title 'foo & bar' -e sleep 100

Ran StreamController. Then opened the Page Manager. This was printed while waiting for the Page Manager window to appear.

StreamController:3): Gtk-WARNING **: 09:57:14.959: Failed to set text 'foo & bar' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &
x
Core447 commented 2 months ago

I started a program with a title set that had an & in it (I originally saw it with the title of a web browser window, but this works just as easily).

ffe8064647789c38cc24298d42ad852f83de1f37 fixes this

xprop: error: Invalid window id format: 0x0. got already fixed by #161, but I forgot that it's not already available on Flathub/released).

I hope this also fixes the delays. Can you maybe try to run the source version (wiki) to check this?

jfbauer432 commented 2 months ago

Looks like that works. Current delay using flatpak version: 12 seconds. Source version (main branch): ~1 second.

BTW, I had to install libportal-dev package (on Ubuntu 24.04) which wasn't mentioned in the install instructions

Core447 commented 2 months ago

Looks like that works. Current delay using flatpak version: 12 seconds. Source version (main branch): ~1 second.

Great, thanks for testing!

BTW, I had to install libportal-dev package (on Ubuntu 24.04) which wasn't mentioned in the install instructions

Ok, thanks for letting me know! The problem is that a lot of packages are named a bit differently on different distros, so I can't just give one "always working" list...