Minetest 0.4.7-0.4.11 does not appear some numbers - Linux

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Minetest 0.4.7-0.4.11 does not appear some numbers - Linux

Post by yullaw »

Hello gentlemen,

I have read that the game Minetest is powered by Irrlicht, so that's why I would like to report some objectionable bug.

Minetest supports other language than English and user can set his own language. The trouble is, that if the keyboard layout is non-US, example CS (Czech), we can not write some numbers for the new server setting, as following:

4 - (normally we need to press SHIFT+4 to get number 4) - but it behave like enter key.
7 - (normally we need to press SHIFT+7 to get number 7) - but it does nothing
01235689 - works well

The same reported bug here: https://github.com/minetest/minetest/issues/845

Informations:
======================================================================================
- Minetest 0.4.x(tested from 0.4.7)-0.4.11
- OS Linux (tested on Mageia 4 64bit, Ubuntu 14.04 64bit, Fedora 21 64bit) - everywhere it is the same
- no faults/errors in the terminal, just only:

Code: Select all

[yullaw@localhost Plocha]$ ./minetest
Irrlicht log: Irrlicht Engine version 1.8.1
Irrlicht log: Linux 3.14.24-desktop-1.mga4 #1 SMP Sat Nov 15 23:54:03 UTC 2014 x86_64
Irrlicht log: Using renderer: OpenGL 3.0
Irrlicht log: Mesa DRI Intel(R) Ivybridge Mobile : Intel Open Source Technology Center
Irrlicht log: OpenGL driver version is 1.2 or better.
Irrlicht log: GLSL version: 1.3

Code: Select all

[yullaw@localhost ~]$ locale
LANG=cs_CZ.UTF-8
LC_CTYPE=cs_CZ.UTF-8
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE=cs_CZ.UTF-8
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES=cs_CZ.UTF-8
LC_PAPER=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_ADDRESS=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_ALL=
Minetest can be launched with different language, example:

Code: Select all

$ LANGUAGE=cs minetest
For more information or tests I can be assisted. Thank you for advice!
CuteAlien
Admin
Posts: 9644
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by CuteAlien »

Hard to debug for us as we don't know the Minetest code and at least I don't have such a keyboard. Maybe as first step someone else can try if he can reproduce that generally with Irrlicht.

Which means - checking out Irrlicht svn (https://sourceforge.net/p/irrlicht/code/HEAD/tree/). Go into source/Irrlicht and run make.
Then checkout my tests (https://code.google.com/p/irr-playgroun ... e/checkout) and put them into irrlicht-code/examples so you get irrlicht-code/examples/irr-playground-micha. In that folder copy gui_font.cpp to main.cpp and run make. After that you have a small application called playground which I generally use for simple keyboard input tests. If it works there it's probably not an Irrlicht problem - if that also fails we'd have to figure out how to solve it.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by yullaw »

@CuteAlien:

Thank you in advice!

Just the step:" In that folder copy gui_font.cpp to main.cpp" maybe is misunderstanding for me... Can you write more detailed step?

Your playground compiled in Mageia 5 beta 1 in VirtualBox, with these results (<SHIFT>1234567890):

Irrlicht 1.9.0:

Code: Select all

 
[yullaw@localhost irr-playground-micha]$ ./playground
Irrlicht Engine version 1.9.0
Linux 3.18.1-desktop-3.mga5 #1 SMP Tue Dec 30 22:09:00 UTC 2014 x86_64
Creating X window...
libGL error: pci id for fd 4: 80ee:beef, driver (null)
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
Visual chosen: : 305
Using renderer: OpenGL 3.0
Gallium 0.4 on llvmpipe (LLVM 3.5, 128 bits): VMware, Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
Loaded texture: /home/yullaw/Plocha/irrlicht/irrlicht-code/examples/irr-playground-micha/my_media/fonts/droid_sans120.bmp
0xd
0xa0
0xbb
0xbb
EKEY_CODE not found, using orig. X11 keycode: 492
0x1ec
EKEY_CODE not found, using orig. X11 keycode: 492
0x1ec
EKEY_CODE not found, using orig. X11 keycode: 441
0x1b9
EKEY_CODE not found, using orig. X11 keycode: 441
0x1b9
EKEY_CODE not found, using orig. X11 keycode: 488
0x1e8
EKEY_CODE not found, using orig. X11 keycode: 488
0x1e8
EKEY_CODE not found, using orig. X11 keycode: 504
0x1f8
EKEY_CODE not found, using orig. X11 keycode: 504
0x1f8
EKEY_CODE not found, using orig. X11 keycode: 446
0x1be
EKEY_CODE not found, using orig. X11 keycode: 446
0x1be
EKEY_CODE not found, using orig. X11 keycode: 253
0xfd
EKEY_CODE not found, using orig. X11 keycode: 253
0xfd
EKEY_CODE not found, using orig. X11 keycode: 225
0xe1
EKEY_CODE not found, using orig. X11 keycode: 225
0xe1
EKEY_CODE not found, using orig. X11 keycode: 237
0xed
EKEY_CODE not found, using orig. X11 keycode: 237
0xed
EKEY_CODE not found, using orig. X11 keycode: 233
0xe9
EKEY_CODE not found, using orig. X11 keycode: 233
0xe9
0xa0
Quit message received.
[yullaw@localhost irr-playground-micha]$ 
 
See the screenshot: http://wiki.mageia.cz/_media/yullaw:min ... tok=aa1ac1

Irrlicht 1.8.1:

Code: Select all

 
[yullaw@localhost irr-playground-micha]$ ./playground 
Irrlicht Engine version 1.8.1
Linux 3.18.1-desktop-3.mga5 #1 SMP Tue Dec 30 22:09:00 UTC 2014 x86_64
libGL error: pci id for fd 4: 80ee:beef, driver (null)
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
Using renderer: OpenGL 3.0
Gallium 0.4 on llvmpipe (LLVM 3.5, 128 bits): VMware, Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
Loaded texture: /home/yullaw/Plocha/irrlicht-1.8.1/examples/irr-playground-micha/my_media/fonts/droid_sans120.bmp
0xd
0xa0
0xbb
0xbb
Could not find EKEY_CODE, using orig. X11 keycode instead: 11
0xb
Could not find EKEY_CODE, using orig. X11 keycode instead: 11
0xb
Could not find EKEY_CODE, using orig. X11 keycode instead: 12
0xc
Could not find EKEY_CODE, using orig. X11 keycode instead: 12
0xc
Could not find EKEY_CODE, using orig. X11 keycode instead: 13
0xd
Could not find EKEY_CODE, using orig. X11 keycode instead: 13
0xd
Could not find EKEY_CODE, using orig. X11 keycode instead: 14
0xe
Could not find EKEY_CODE, using orig. X11 keycode instead: 14
0xe
Could not find EKEY_CODE, using orig. X11 keycode instead: 15
0xf
Could not find EKEY_CODE, using orig. X11 keycode instead: 15
0xf
Could not find EKEY_CODE, using orig. X11 keycode instead: 16
0x10
Could not find EKEY_CODE, using orig. X11 keycode instead: 16
0x10
 
###  Part 2:
Could not find EKEY_CODE, using orig. X11 keycode instead: 17
0x11
Could not find EKEY_CODE, using orig. X11 keycode instead: 17
0x11
Could not find EKEY_CODE, using orig. X11 keycode instead: 18
0x12
Could not find EKEY_CODE, using orig. X11 keycode instead: 18
0x12
Could not find EKEY_CODE, using orig. X11 keycode instead: 19
0x13
Could not find EKEY_CODE, using orig. X11 keycode instead: 19
0x13
0xa0
Quit message received.
[yullaw@localhost irr-playground-micha]$ 
 
Screenshots:
- http://wiki.mageia.cz/_media/yullaw:min ... tok=824f65
- http://wiki.mageia.cz/_media/yullaw:min ... tok=e7c23a

Summary: We can see the different between Irrlicht versions !

Wishing you happy new year 2015!
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by yullaw »

FYI: The last post has been edited.
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by yullaw »

I figured out that not only issue of numbers, but with keys "ěščřžýáíéůú)" as well.

This trouble is present in SuperTuxKart 0.8.1 too!
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by yullaw »

Small workaround can be to change a keyboard layout to US by command as:

Code: Select all

 
$ setxkbmap us && ./minetest && setxkbmap cz
 
which will change a keyboard to US, launch the game and after closing will change to Czech keyboard back.

But we should launch the games without these commands... Should be nice to fix that.
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by yullaw »

Do you have other solution or fix that, please? Or should I open a bugreport?

Thanks for reply!
CuteAlien
Admin
Posts: 9644
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by CuteAlien »

Sorry, had no time yet to investigate it further.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9644
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by CuteAlien »

Unfortunately not so easy to reproduce. I did several experiments:

When I switch keyboard layout with KDE then it just works in Irrlicht trunk (aka Irrlicht 1.9). No errors and I see the czech keys in the input field and get Irrlicht keycodes.
When doing the same in Irrlicht 1.8 I get some more problems - the numbers still work in the editbox, but I can't see the characters when I press number-keys without shift.

So I tried your trick with directly setting the keymap with setxkbmap. And indeed I get then some warnings that certain keys have no corresponding EKEY_CODE. But the editbox still works (with and without shift) and Irrlicht will just pass through the original x11 keycode so the keys can still be used in games as well. This all in Irrlicht trunk. But I noticed I get other keycodes than you. For example I get 488 for '4' (aka 0x01e8 which is XK_ccaron for X11). Which seems correct to me unlike the value you seem to get.

So I'm puzzled - why are you getting such stranger X11 keycodes? They just seem wrong, those are not the numbers X11 should return.

edit: Did another test on Ubuntu, but Irrlicht trunk works there as well.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
yullaw
Posts: 7
Joined: Mon Dec 29, 2014 8:34 pm
Location: Prostejov, Czech Republic

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by yullaw »

Thank you for your test and input! Just now I have tried a trunk version irrlicht 1.9 and it works there well. Now I or we have to wait for a new stable version 1.9 and then to push it to the Linux distribution (Mageia) as an update. Do you know when it can be stable irrlich 1.9 released? Or still a lot of bugs are remaining?

Or for next tests to compile Irrlicht 1.9 for the system and then launch the games to try, that everything works well. But I do not know, if the game must be recompiled too.

Thank you for the support, seems to be solved in ver. 1.9 already.
CuteAlien
Admin
Posts: 9644
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Minetest 0.4.7-0.4.11 does not appear some numbers - Lin

Post by CuteAlien »

I don't know when 1.9 will be out. Depends a lot on if we really merge ogl-es before that or if we do another 1.10 release for that. And as usual depends on how much time our day-jobs leave us for working on the engine.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply