whkd icon indicating copy to clipboard operation
whkd copied to clipboard

[BUG]: Crash after start

Open chiwou opened this issue 1 year ago • 8 comments

Describe the bug

Instantly crashes after start. And the location line keeps changing, this time it's line 43, but before it was 122.

To Reproduce

Installed with winget

komorebic start --whkd or whkd by itself, only then I got an error message.

Expected behavior

komorebic starting with whkd ;-)

Console output

> Get-Item .\whkdrc

    Directory: C:\Users\chwo\.config

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          2025-02-06    12:25            859 whkdrc

> whkd
The application panicked (crashed).

Message:  could not load whkdrc from "C:\\Users\\chwo\\.config\\whkdrc"

Location: src\main.rs:43

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.

Run with RUST_BACKTRACE=full to include source snippets.

Operating System

OS Name:                   Microsoft Windows 11 Enterprise
OS Version:                10.0.22631 N/A Build 22631

chiwou avatar Feb 06 '25 13:02 chiwou

I am experiencing similar behavior. I also tried setting the variables in Git Bash as suggested in the output message and this was what I got. ` $ whkd The application panicked (crashed). Message: could not load whkdrc from "C:\Users\stratjm\.config\whkdrc" Location: src\main.rs:43

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1: BaseThreadInitThunk at : 2: RtlUserThreadStart at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.

$ ƒexport –COLORBT_SHOW_HIDDEN=1 bash: $'\302\203export': command not found `

Ultrafeeder avatar Feb 27 '25 16:02 Ultrafeeder

oof same problem here. always line 44 full backtrace does not show any additional info. any chance it has been solved already?

itszaen avatar May 04 '25 21:05 itszaen

Crashes tend to be because of syntax errors - drop your whkdrc in here

LGUG2Z avatar May 04 '25 21:05 LGUG2Z

hmm this is super strange. I've tried all sorts of methods to see what the underlying problem is with zero success. the Windows Event Log suggests that the file is read and loaded successfully, so it does not seem to be an issue with permission or security.

itszaen avatar May 04 '25 22:05 itszaen

Like I said, it'll be a syntax error in your config file

LGUG2Z avatar May 04 '25 23:05 LGUG2Z

oh shoot, i didn't think you'd reply so quick! the page wasn't refreshed, sorry that i didn't catch your reply I have tried with my original configuration, a blank line, as well as a 0KB file. None works.

The config is the following but i'm 99% it has nothing to do with it.

# ~/.config/komorebi/whkdrc
# Using Caps Lock remapped to Ctrl+Alt+Win (Mod) via AutoHotkey

# Focus Workspace: Mod + Number (0-9)
ctrl + alt + win + 1 : komorebic focus-workspace 1
ctrl + alt + win + 2 : komorebic focus-workspace 2
ctrl + alt + win + 3 : komorebic focus-workspace 3
ctrl + alt + win + 4 : komorebic focus-workspace 4
ctrl + alt + win + 5 : komorebic focus-workspace 5
ctrl + alt + win + 6 : komorebic focus-workspace 6
ctrl + alt + win + 7 : komorebic focus-workspace 7
ctrl + alt + win + 8 : komorebic focus-workspace 8
ctrl + alt + win + 9 : komorebic focus-workspace 9
ctrl + alt + win + 0 : komorebic focus-workspace 10 # Usually workspace 10

# Focus Window Direction: Mod + HJKL
ctrl + alt + win + h : komorebic focus left
ctrl + alt + win + j : komorebic focus down
ctrl + alt + win + k : komorebic focus up
ctrl + alt + win + l : komorebic focus right

# Focus Window Cycle: Mod + Tab / Mod + Shift + Tab
ctrl + alt + win + tab : komorebic cycle-focus next
ctrl + alt + win + shift + tab : komorebic cycle-focus prev

# Move Window to Workspace: Mod + Shift + Number (0-9)
ctrl + alt + win + shift + 1 : komorebic move-to-workspace 1
ctrl + alt + win + shift + 2 : komorebic move-to-workspace 2
ctrl + alt + win + shift + 3 : komorebic move-to-workspace 3
ctrl + alt + win + shift + 4 : komorebic move-to-workspace 4
ctrl + alt + win + shift + 5 : komorebic move-to-workspace 5
ctrl + alt + win + shift + 6 : komorebic move-to-workspace 6
ctrl + alt + win + shift + 7 : komorebic move-to-workspace 7
ctrl + alt + win + shift + 8 : komorebic move-to-workspace 8
ctrl + alt + win + shift + 9 : komorebic move-to-workspace 9
ctrl + alt + win + shift + 0 : komorebic move-to-workspace 10 # Usually workspace 10

# Move Window Direction: Mod + Shift + HJKL
ctrl + alt + win + shift + h : komorebic move left
ctrl + alt + win + shift + j : komorebic move down
ctrl + alt + win + shift + k : komorebic move up
ctrl + alt + win + shift + l : komorebic move right

# Window Layout & State: Mod + Key
ctrl + alt + win + f : komorebic toggle-monocle
ctrl + alt + win + space : komorebic toggle-float
ctrl + alt + win + b : komore

itszaen avatar May 05 '25 00:05 itszaen

maybe you miss this line in fron of all the following alias lines: .shell powershell

Zeuyel avatar Jun 06 '25 18:06 Zeuyel

maybe you miss this line in fron of all the following alias lines: .shell powershell

this one totally fix it for me, at first it was pwsh which is not installed in my system. thank you.

ppaauuoo avatar Nov 01 '25 02:11 ppaauuoo