Git Product home page Git Product logo

Comments (12)

da-rth avatar da-rth commented on July 3, 2024 1

@sitiom this should now be fixed in eb84a87.

Turns out the komorebic.exe subscribe command was expects just the name of the pipe, without \\.\pipe\ prepended. Yasb was trying to subscribe using the string \\.\pipe\yasb, meaning komorebi was trying to subscribe to the pipe \\.\pipe\\.\pipe\yasb . I have updated yasb to just send the name of the pipe when sending a subscription request to komorebi.

https://github.com/LGUG2Z/komorebi/blob/master/komorebic/src/main.rs#L373

from yasb.

da-rth avatar da-rth commented on July 3, 2024 1

@sitiom apologies, looks like a minor bug was causing the event listener to break. should be fixed in 2111a34

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Weird, even as non-admin it sometimes fails to detect it, detection is quite unreliable. I am unable to replicate it again.

from yasb.

da-rth avatar da-rth commented on July 3, 2024

@sitiom do you see anything in yasb.log?

Failure to detect komorebi is likely because yasb is unable to get komorebi to subscribe to its name pipe for events.

This can sometimes happen if you have multiple instances of yasb running, but this may not be the issue you are encountering.

Also, which version of komorebi are you using? the latest komorebi v0.1.8 release should work quite well with yasb

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Here's what I found in yasb.log:

2022-02-01 15:46:14 INFO main.py: Starting Yasb
2022-02-01 15:46:14 INFO config_utils.py: Successfully loaded config file and stylesheet
2022-02-01 15:46:14 INFO app_bar.py: Creating Win32 App Bar for bar 0 with HWND 1643940
2022-02-01 15:46:14 INFO bar_manager.py: Created bar 0 on monitor \\.\DISPLAY1
2022-02-01 15:46:15 INFO app_bar.py: Creating Win32 App Bar for bar 1 with HWND 6034192
2022-02-01 15:46:15 INFO bar_manager.py: Created bar 1 on monitor \\.\DISPLAY5
2022-02-01 15:46:15 INFO bar_manager.py: Activating listener SystemEventListener
2022-02-01 15:46:15 INFO bar_manager.py: Activating listener KomorebiEventListener
2022-02-01 15:46:16 INFO event_listener.py: Waiting for Komorebi to subscribe to named pipe yasb
2022-02-01 15:46:16 INFO event_listener.py: SetWinEventHook Successful. Emitting focused window and waiting for events.
2022-02-01 15:46:20 INFO event_listener.py: Komorebi connected to named pipe: yasb
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of WorkspaceWidget object at 0x0000024835E0B490> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: WorkspaceWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of ActiveLayoutWidget object at 0x0000024836A98DC0> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: ActiveLayoutWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of WorkspaceWidget object at 0x0000024836A99FC0> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: WorkspaceWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of ActiveLayoutWidget object at 0x0000024836A9A830> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: ActiveLayoutWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'

And no, I'm sure yasb is not running beforehand.

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Strangely when I switch layouts, the active widget appears:
image

from yasb.

da-rth avatar da-rth commented on July 3, 2024

Here's what I found in yasb.log:

2022-02-01 15:46:14 INFO main.py: Starting Yasb
2022-02-01 15:46:14 INFO config_utils.py: Successfully loaded config file and stylesheet
2022-02-01 15:46:14 INFO app_bar.py: Creating Win32 App Bar for bar 0 with HWND 1643940
2022-02-01 15:46:14 INFO bar_manager.py: Created bar 0 on monitor \\.\DISPLAY1
2022-02-01 15:46:15 INFO app_bar.py: Creating Win32 App Bar for bar 1 with HWND 6034192
2022-02-01 15:46:15 INFO bar_manager.py: Created bar 1 on monitor \\.\DISPLAY5
2022-02-01 15:46:15 INFO bar_manager.py: Activating listener SystemEventListener
2022-02-01 15:46:15 INFO bar_manager.py: Activating listener KomorebiEventListener
2022-02-01 15:46:16 INFO event_listener.py: Waiting for Komorebi to subscribe to named pipe yasb
2022-02-01 15:46:16 INFO event_listener.py: SetWinEventHook Successful. Emitting focused window and waiting for events.
2022-02-01 15:46:20 INFO event_listener.py: Komorebi connected to named pipe: yasb
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of WorkspaceWidget object at 0x0000024835E0B490> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: WorkspaceWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of ActiveLayoutWidget object at 0x0000024836A98DC0> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: ActiveLayoutWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of WorkspaceWidget object at 0x0000024836A99FC0> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: WorkspaceWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'
2022-02-01 15:46:20 ERROR event_service.py: Failed to emit event signal <bound PYQT_SIGNAL k_signal_connect of ActiveLayoutWidget object at 0x0000024836A9A830> with args: (None,)
Traceback (most recent call last):
  File "C:\Users\rycae\source\repos\yasb\src\core\event_service.py", line 25, in emit_event
    event_signal.emit(*args)
TypeError: ActiveLayoutWidget.k_signal_connect[dict].emit(): argument 1 has unexpected type 'NoneType'

And no, I'm sure yasb is not running beforehand.

Thanks for providing a log. It looks like yasb is failing here: https://github.com/denBot/yasb/blob/main/src/core/utils/komorebi/event_listener.py#L112

It appears komorebi's state could not be retrieved (from calling komorebic.exe state) when the komorebi event listener was attempting to start up. As shown in the log, various Event Consumers are receiving a None object instead of the komorebi state dict, which appears to be causing the error.

I've added a few None state checks and have changed the komorebi event listener start-up process to loop until a valid state is retrieved from komorebi: 0f1f99d#diff-4b0019a14b0cda7955ca49f8877fd8e208283a52e72eb947dda3c44128888eceR119

Since komorebi's state is parsed from the resulting json outputted by komorebic.exe state, it may be possible that your komorebi client is erroring when the state is being requested by yasb. It may actually be komorebi's state command that is unreliable.

If you are able to reproduce this issue, it might be worth checking the output of komorebic.exe state in your terminal to see what it outputs.

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Thanks, everything seems to be working fine now. I just noticed the context menu tray font suddenly became weird:
image

For now, I'll close this issue as I am unable to reproduce this issue again.

from yasb.

sitiom avatar sitiom commented on July 3, 2024

It's not working again in the latest commit.

Log:

2022-02-10 10:47:17 INFO log.py: Yasb - Yet Another Status Bar
2022-02-10 10:47:23 INFO bar_manager.py: Starting SystemEventListener...
2022-02-10 10:47:23 INFO bar_manager.py: Starting KomorebiEventListener...
2022-02-10 10:47:23 INFO event_listener.py: Waiting for Komorebi to subscribe to named pipe yasb
2022-02-10 10:47:23 INFO watcher.py: Created file watcher for path C:\Users\rycae\.yasb

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Regression at 3c04d79

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Thanks again.

from yasb.

sitiom avatar sitiom commented on July 3, 2024

Oops, while it seems like it detects komorebi properly, komorebi becomes unresponsive and freezes (stops tiling, cannot switch to workspaces) until I exit yasb.

2022-02-10 21:00:42 INFO log.py: Yasb - Yet Another Status Bar
2022-02-10 21:00:47 INFO bar_manager.py: Starting KomorebiEventListener...
2022-02-10 21:00:47 INFO bar_manager.py: Starting SystemEventListener...
2022-02-10 21:00:48 INFO event_listener.py: Created named pipe yasb-774ecd73-8a71-11ec-baf0-00155d03a030
2022-02-10 21:00:48 INFO event_listener.py: Waiting for Komorebi to subscribe to named pipe yasb-774ecd73-8a71-11ec-baf0-00155d03a030
2022-02-10 21:00:48 INFO watcher.py: Created file watcher for path C:\Users\rycae\.yasb
2022-02-10 21:00:48 INFO event_listener.py: Komorebi connected to named pipe: yasb-774ecd73-8a71-11ec-baf0-00155d03a030
2022-02-10 21:00:48 INFO event_listener.py: Stopping Komorebi Event Listener

from yasb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.