Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: glaze crashes due to ipc #354

Open
Dimfred opened this issue Aug 12, 2023 · 2 comments
Open

bug: glaze crashes due to ipc #354

Dimfred opened this issue Aug 12, 2023 · 2 comments

Comments

@Dimfred
Copy link

Dimfred commented Aug 12, 2023

Glaze crashes when I am subscribed to focus_changed.

How to replicate:

subscribe -e focus_changed

Tab a little bit from left to right => see crash after a ~15seconds.

08/12/2023 14:06:46[WindowFocusedHandler] Window focused: WindowsTerminal CASCADIA_HOSTING_WINDOW_CLASS
08/12/2023 14:06:46[Bus] Command SetFocusedDescendantCommand invoked.
08/12/2023 14:06:46[Bus] Command SetActiveWindowBorderCommand invoked.
08/12/2023 14:06:46[Bus] Command FocusInDirectionCommand invoked.
08/12/2023 14:06:46[Bus] Command SetNativeFocusCommand invoked.
08/12/2023 14:06:46[Bus] Command CenterCursorOnContainerCommand invoked.
08/12/2023 14:06:46[WindowFocusedHandler] Window focused: WindowsTerminal CASCADIA_HOSTING_WINDOW_CLASS
08/12/2023 14:06:46[Bus] Command SetFocusedDescendantCommand invoked.
08/12/2023 14:06:46[Bus] Command SetActiveWindowBorderCommand invoked.
08/12/2023 14:06:46[Bus] Command FocusInDirectionCommand invoked.
08/12/2023 14:06:46[Bus] Command FocusInDirectionCommand invoked.
08/12/2023 14:06:46[Bus] Command SetNativeFocusCommand invoked.
08/12/2023 14:06:46[Bus] Command CenterCursorOnContainerCommand invoked.
08/12/2023 14:06:46[WindowFocusedHandler] Window focused: WindowsTerminal CASCADIA_HOSTING_WINDOW_CLASS
08/12/2023 14:06:46[Bus] Command SetFocusedDescendantCommand invoked.
08/12/2023 14:06:46[Bus] Command SetActiveWindowBorderCommand invoked.
08/12/2023 14:06:47[Bus] Command FocusInDirectionCommand invoked.
08/12/2023 14:06:47[Bus] Command SetNativeFocusCommand invoked.
08/12/2023 14:06:47[Bus] Command CenterCursorOnContainerCommand invoked.
08/12/2023 14:06:47[WindowFocusedHandler] Window focused: powershell ConsoleWindowClass
08/12/2023 14:06:47[Bus] Command SetFocusedDescendantCommand invoked.
08/12/2023 14:06:47[Bus] Command SetActiveWindowBorderCommand invoked.
Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
at NetCoreServer.WebSocket.PrepareSendFrame(Byte opcode, Boolean mask, ReadOnlySpan`1 buffer, Int32 status)
at NetCoreServer.WsSession.SendPongAsync(ReadOnlySpan`1 buffer)
at NetCoreServer.WsSession.SendPongAsync(Byte[] buffer, Int64 offset, Int64 size)
at NetCoreServer.WsSession.OnWsPing(Byte[] buffer, Int64 offset, Int64 size)
at NetCoreServer.WebSocket.PrepareReceiveFrame(Byte[] buffer, Int64 offset, Int64 size)
at NetCoreServer.WsSession.OnReceived(Byte[] buffer, Int64 offset, Int64 size)
at NetCoreServer.TcpSession.ProcessReceive(SocketAsyncEventArgs e)
at NetCoreServer.TcpSession.OnAsyncCompleted(Object sender, SocketAsyncEventArgs e)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.Sockets.SocketAsyncEventArgs.<>c.<.cctor>b__176_0(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading.ThreadPoolTypedWorkItemQueue`2.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
08/12/2023 14:06:47[Bus] Command FocusInDirectionCommand invoked.
08/12/2023 14:06:47[Bus] Command SetNativeFocusCommand invoked.
08/12/2023 14:06:47[Bus] Command CenterCursorOnContainerCommand invoked.
08/12/2023 14:06:47[WindowFocusedHandler] Window focused: WindowsTerminal CASCADIA_HOSTING_WINDOW_CLASS
08/12/2023 14:06:47[Bus] Command SetFocusedDescendantCommand invoked.
08/12/2023 14:06:47[Bus] Command SetActiveWindowBorderCommand invoked.
08/12/2023 14:06:47[Bus] Command FocusInDirectionCommand invoked.
08/12/2023 14:06:47[Bus] Command SetNativeFocusCommand invoked.
08/12/2023 14:06:47[Bus] Command CenterCursorOnContainerCommand invoked.
08/12/2023 14:06:47[WindowFocusedHandler] Window focused: WindowsTerminal CASCADIA_HOSTING_WINDOW_CLASS
08/12/2023 14:06:47[Bus] Command SetFocusedDescendantCommand invoked.
08/12/2023 14:06:47[Bus] Command SetActiveWindowBorderCommand invoked.

@theSoberSobber
Copy link

how are you subscribing to the event? where do you run commands with the glazeWM executable? like the subscribe -e focus_changed command?

@Dimfred
Copy link
Author

Dimfred commented Aug 20, 2023

No I was running them in a python server. The server was running inside wsl.

The code was simple, basically send the subscribe message subscribe -e focus_changed, the while True: await ws.recv().

Used more or less this as an example:
https://websockets.readthedocs.io/en/stable/howto/quickstart.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants