You are not logged in.

#1 2019-09-22 12:58:51

7thCore
Member
Registered: 2018-06-09
Posts: 65

[SOLVED] Net framework console application/game server crash in wine

I have a game server based on net framework 4.7.2 running in wine-staging 4.11. I have tried more recent versions up to 4.16 but the problem persists. The problem being if I type any kind of upper case letter (that requires pressing shift of having caps lock on) or just plain symbols (- + ' work) the program crashes.

Here is the error log from the console:

Encountered unhandled exception, logging before the process is killed.                                                                                                                                                                                                         
10:11:11,141 [Game.Program] {Exceptions} () FATAL: Unhandled exception on thread Main Thread (Id: 1) System.ArgumentOutOfRangeException: Console key values must be between 0 and 255.                                                                                         
Parameter name: key                                                                                                                                                                                                                                                            
   at System.ConsoleKeyInfo..ctor(Char keyChar, ConsoleKey key, Boolean shift, Boolean alt, Boolean control)                                                                                                                                                                   
   at System.Console.ReadKey(Boolean intercept)                                                                                                                                                                                                                                
   at Game.Framework.CommandSystem.<Logic>d__30.MoveNext()                                                                                                                                                                                                                     
   at Game.GameStates.GameServer.Update()                                                                                                                                                                                                                                      
   at Game.Program.Mainloop_AlunaRenderer()                                                                                                                                                                                                                                    
   at Game.Program.Main(String[] args)                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                               
Unhandled Exception: System.ArgumentOutOfRangeException: Console key values must be between 0 and 255.                                                                                                                                                                         
Parameter name: key                                                                                                                                                                                                                                                            
   at System.ConsoleKeyInfo..ctor(Char keyChar, ConsoleKey key, Boolean shift, Boolean alt, Boolean control)                                                                                                                                                                   
   at System.Console.ReadKey(Boolean intercept)                                                                                                                                                                                                                                
   at Game.Framework.CommandSystem.<Logic>d__30.MoveNext()                                                                                                                                                                                                                     
   at Game.GameStates.GameServer.Update()                                                                                                                                                                                                                                      
   at Game.Program.Mainloop_AlunaRenderer()                                                                                                                                                                                                                                    
   at Game.Program.Main(String[] args)    

Also what wine debug value should I use to provide more information regarding this error?

Edit: I'm running the application with wineconsole

Edit2: I'm figuring that the wrong key values are being sent to the console. I should also mention I'm running the program in a tmux session on a headless linux server but the problem is also present on systems running xorg and running it with plain wine in it's own console window.

Last edited by 7thCore (2019-10-15 11:17:43)


[ Arch x86_64 | linux | Asus Prime X570-Pro | AMD Ryzen 9 5900X @4,8Ghz | AMD RX580 | 32GB RAM DDR4 | Main, 2 Monitors ]
[ Arch x86_64 | linux | Asus Pro WS X570-Ace | AMD Ryzen 9 5950X @4,9Ghz | Intel A750 | 128GB RAM DDR4 | Server ]

The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.

Offline

#2 2019-10-11 05:32:58

7thCore
Member
Registered: 2018-06-09
Posts: 65

Re: [SOLVED] Net framework console application/game server crash in wine

I have updated some details in my original post. I have also tried manually creating a fifo pipe with:

mkfifo /tmp/wine-input
cat > /tmp/wine-input &
echo $! > /tmp/wine-input-cat-pid

And then piping the input to the application:

cat /tmp/wine-input | env WINEARCH=win32 WINEDEBUG=-all WINEPREFIX=/mnt/tmpfs/isr-creative wineconsole --backend=curses /mnt/tmpfs/isr-creative/drive_c/Games/InterstellarRift/Build/IR.exe -server -inline -linux -nossl

And redirecting the input

 env WINEARCH=win32 WINEDEBUG=-all WINEPREFIX=/mnt/tmpfs/isr-creative wineconsole --backend=curses /mnt/tmpfs/isr-creative/drive_c/Games/InterstellarRift/Build/IR.exe -server -inline -linux -nossl < /tmp/wine-input

While I was able to send commands to the console using either one, the console still crashed with the same error.


[ Arch x86_64 | linux | Asus Prime X570-Pro | AMD Ryzen 9 5900X @4,8Ghz | AMD RX580 | 32GB RAM DDR4 | Main, 2 Monitors ]
[ Arch x86_64 | linux | Asus Pro WS X570-Ace | AMD Ryzen 9 5950X @4,9Ghz | Intel A750 | 128GB RAM DDR4 | Server ]

The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.

Offline

#3 2019-10-15 11:17:25

7thCore
Member
Registered: 2018-06-09
Posts: 65

Re: [SOLVED] Net framework console application/game server crash in wine

The problem was caused by an autocomplete feature in the net framework console. Devs added an argument to disable it. Marked as solved.

Last edited by 7thCore (2019-10-15 11:18:18)


[ Arch x86_64 | linux | Asus Prime X570-Pro | AMD Ryzen 9 5900X @4,8Ghz | AMD RX580 | 32GB RAM DDR4 | Main, 2 Monitors ]
[ Arch x86_64 | linux | Asus Pro WS X570-Ace | AMD Ryzen 9 5950X @4,9Ghz | Intel A750 | 128GB RAM DDR4 | Server ]

The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.

Offline

Board footer

Powered by FluxBB