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

Crashed right away #2

Closed
bogorad opened this issue Feb 26, 2024 · 2 comments
Closed

Crashed right away #2

bogorad opened this issue Feb 26, 2024 · 2 comments

Comments

@bogorad
Copy link

bogorad commented Feb 26, 2024

I do have a layer called U_NEW, but's a dummy template layer, commented out.

win10, fully patched.

On second try it worked.

image

...\miryoku-kanata> kanata_helper_daemon.exe --port=5588 --config-file=./kanata.kbd --default-layer=U_BASE
Starting...
12 layers found in ./kanata.kbd.
Layer 0: 'U_NEW'
Layer 1: 'U_BASE'
Layer 2: 'U_QWERTY'
Layer 3: 'U_TAP'
Layer 4: 'U_NUM'
Layer 5: 'U_SYM'
Layer 6: 'U_FUN'
Layer 7: 'U_NAV'
Layer 8: 'U_BUTTON'
Layer 9: 'U_MOUSE'
Layer 10: 'U_MEDIA'
Layer 11: 'U_CTL'
Connecting to localhost:5588...
TCP connection successful.
New window activated: hWnd='0000000000440C10',  Title='Terminal',       Process='WindowsTerminal'
Sending: '{"ChangeLayer":{"new":"U_BASE"}}'
reidprichard added a commit that referenced this issue Feb 26, 2024
… TCP messages from 256 to 2048 bytes. Fix for #2 hopefully.
@reidprichard
Copy link
Owner

Thanks for the detailed report!

I think I've reproduced the crash you got. I believe Kanata sent a lot of data over TCP when the connection began, overflowing my buffer to accept it. The Kanata TCP functionality is still very much in flux, so the documentation isn't mature on what to expect on my end. I've pushed 787e878 to increase the buffer size to handle the longest message I can imagine Kanata ever sending, and I'll fine-tune this value as Kanata matures.

I believe I have also tracked down the issue causing your U_NEW layer to show up. I'm assuming it's in a multi-line comment block ("#| ... |#")? I've pushed b88401d to allow kanata_helper_daemon to handle multiline comments. Long-term, while the functionality to read layer names will probably remain in the code as a fallback mechanism, Kanata has added functionality to send layer names over TCP and save me the trouble of parsing the file. As soon as that functionality is released I'll work it into kanata_helper_daemon.

Release v0.1.3 contains these bugfixes. Please let me know if the new release fixes both of your issues.

@bogorad
Copy link
Author

bogorad commented Feb 26, 2024

Thanks for your prompt response!

You are correct about the multi line comments.

I'll check and get back to you.

I also have a feature request, will post separately.

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