win-vind icon indicating copy to clipboard operation
win-vind copied to clipboard

[Bug] 'Invalid unordered_map<K, T> key' error at startup

Open pidgeon777 opened this issue 2 years ago • 6 comments

Describe the bug

This error appears when launching the latest portable x64 version:

image

Environment

  • Windows 10 Edition: Pro
  • OS Type: 64bit
  • OS Version: 21H2
  • OS Build: 19044.1586
  • win-vind Version: v4.3.3
  • win-vind Type: zip
  • Is it reproducible?: Yes

pidgeon777 avatar Mar 23 '22 12:03 pidgeon777

Thanks for the report.

Are there any messages in the log file? If so, please share. If you do not wish to make it public, then send it to [email protected]

pit-ray avatar Mar 25 '22 06:03 pit-ray

========== System Infomation ==========
[Windows]
      Edition: Windows 10 Pro
      Version: 21H2
Build Numbers: 10.0.19044
 Architecture: x64

[win-vind]
      Version: 4.3.3
=======================================
[Message] E: Invalid Syntax (L:827)

[Error] An runtime exception occurred from class std::vector<class vind::core::KeyCode,class std::allocator<class vind::core::KeyCode> > __cdecl vind::core::parse_ascii_command(char). The character '~' is invalid ascii key code. (C:\Users\myusername\AppData\Local\Temp\b53b63a89c3b87cb5455c7485c47a8\win-vind\default_config\.vindrc, L:827) (enum vind::SystemCall __cdecl vind::bind::SyscmdSource::sprocess(const class std::filesystem::path &,bool))

I solved this by replacing the ~ character with ' in the .vindrc file, line 827:

" Switch char case (Vim Emulation: ')
ennoremap ' switch_char_case

pidgeon777 avatar Mar 25 '22 09:03 pidgeon777

Can you tell me the language of the system and the keyboard layout? I would like to reproduce it.

Thanks again.

pit-ray avatar Mar 27 '22 13:03 pit-ray

System Language: Italian Keyboard Layout: Italian - QWERTY

pidgeon777 avatar Mar 28 '22 11:03 pidgeon777

Thanks. I try that setting.

pit-ray avatar Mar 28 '22 11:03 pit-ray

Sorry for the late reply.

I was able to reproduce this when I started win-vind using an Italian layout keyboard.

win-vind can only map characters that can be typed with a simple key sequence. This seems to have caused a mapping error.

In Italian layout, how does ~ in Vim generally map?

For now, I am considering not changing the default value, outputting the error to the log, and ignoring it.

Thanks.

pit-ray avatar Apr 17 '22 14:04 pit-ray

Has anyone managed to solve this problem with the Italian layout keyboard?

Rain-ctrl avatar Jan 29 '23 15:01 Rain-ctrl

@Rain-ctrl I do not have an Italian layout keyboard and am unable to confirm the key code. How do you type ~ when using Vim with an Italian keyboard?

pit-ray avatar Jan 29 '23 15:01 pit-ray

Hi @pit-ray how are you? With the Italian keyboard we have to press the "alt" + "126" key

Rain-ctrl avatar Jan 29 '23 16:01 Rain-ctrl

@Rain-ctrl Thanks for the info.

I checked and it seems that the current Windows standard Italian layout does not allow ~ to be entered oneshot. win-vind prefers one-shot input when describing with letters, so I assume it is an error. https://learn.microsoft.com/en-us/globalization/keyboards/kbdit.html,

Instead, Italian (142) allows one-shot input of ~ and win-vind starts normally. https://learn.microsoft.com/en-us/globalization/keyboards/kbdit142.html

I will consider solution.

Thanks.

pit-ray avatar Jan 29 '23 19:01 pit-ray

Fixed at v5.2.3.

pit-ray avatar Aug 05 '23 17:08 pit-ray