vlang / vinix

Vinix is an effort to write a modern, fast, and useful operating system in the V programming language
https://vlang.io
GNU General Public License v2.0
1.89k stars 120 forks source link

Vinix halts when pressed keys '(' and ')' in vim or nano #79

Closed mguinhos closed 2 months ago

mguinhos commented 2 years ago

Description

The system simply stops when pressed keys like '(', ')', '.', ',', TAB, BACKSPACE in nano or vim

Info

Emulator: qemu-system-x86_64 Host Memory: 8 GiB Guest Memory: 4 GiB Command: qemu-system-x86_64 -cdrom vinix.iso -m 4096

Reproduction

Debug Info

0xffffffff800280f6: f4         hlt
0xffffffff800280f7: f4         jmp 0xffffffff800280f6
0xffffffff800280f8: eb fd      popq %rbp
mguinhos commented 2 years ago

I think that is related with interrupt processing or something. or a buffer overflow.

FrostyTheSouthernSnowman commented 2 years ago

Try using make run, I used make run and didn't find any issues while using vim.

8dcc commented 2 years ago

It happens to me when using the \ key. One think that might be worth mentioning is that my layout is not US, so the key should be \ in the US layout.

image

FrostyTheSouthernSnowman commented 2 years ago

\ also didn't give me any problems. I used the make run command. What command did you use, @r4v10l1?

8dcc commented 2 years ago

I just installed the ISO.

FrostyTheSouthernSnowman commented 2 years ago

Ok. I used make to build it from source and then ran it with make run. I wonder if the ISO you downloaded was built using make distro which adds some extra features.

FrostyTheSouthernSnowman commented 2 years ago

I will try to test it with the make distro command.

FrostyTheSouthernSnowman commented 2 years ago

I downloaded the ISO file and ran the VM using make run and still couldn't find the issue.

FrostyTheSouthernSnowman commented 2 years ago

make distro failed

mguinhos commented 2 years ago

I am also not using the US layout.

My layout is BR ABNT2.

8dcc commented 2 years ago

Maybe the error in my screenshot has something to do with trying to access a key in a position that does not exist in the vinix default layout?
For example if some layout has more keys or characters, the \ key might get 'shifted', and vinix tries to access it in a smaller array.

I don't know how vinix handles layouts or keys, and I don't even know if the error is related, just pure speculation 🙂

mintsuki commented 2 months ago

This seems to be a duplicate of #104.

mintsuki commented 2 months ago

In any case I cannot reproduce the nano panic by pressing ( or ).