pelican-eggs / games-standalone

Eggs for game servers that are standalone in their installation (ie. don't require 3rd party tools).
MIT License
23 stars 13 forks source link

[Bug]: Space Station 14: Entering a command in the panel crashes the server #19

Open VasilisThePikachu opened 6 days ago

VasilisThePikachu commented 6 days ago

Moving here from https://github.com/pelican-eggs/eggs/issues/2755

Panel Version

1.11.5

Wings Version

1.11.8

Service

spacestation_14

Modified

No, I did not modify the egg

Expected Behavior

Using the console works and does not crash the game

Actual Behavior

Pterodactl does not provide a console width and length. Causing the game to crash as soon as the user attempts to write a command. One of the reasons I held my egg for this was cause of this. (along with the maintainer team not really liking web hosters using this as they can't give proper support)

Had tried to get support for the egg bug a while ago in the eggs channel but we had no luck

See https://github.com/pterodactyl/panel/issues/4797

Server exception:

[ERRO] runtime: Caught exception in "GameLoop Input"
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')arser, Box2
Actual value was -1.ting up ColorTypeParser, Color
   at System.Console.SetCursorPosition(Int32 left, Int32 top)ere T: INumberBase<T>
   at Robust.Server.Console.SystemConsoleManager.ClearCurrentLine() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Console/SystemConsoleManager.cs:line 289
   at Robust.Server.Console.SystemConsoleManager.DrawCommandLine() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Console/SystemConsoleManager.cs:line 280
   at Robust.Server.Console.SystemConsoleManager.HandleKeyboard() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Console/SystemConsoleManager.cs:line 268
   at Robust.Server.Console.SystemConsoleManager.UpdateInput() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Console/SystemConsoleManager.cs:line 130
   at Robust.Server.BaseServer.Input(FrameEventArgs args) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/BaseServer.cs:line 692s size 850.49 KiB
   at Robust.Shared.Timing.GameLoop.Run() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/Timing/GameLoop.cs:line 135new toolshed context in 00:00:00.2063273

Engine source where (I think) the crash happens according to logs space-wizards/RobustToolbox@156187a/Robust.Server/Console/SystemConsoleManager.cs#L286

Steps To Reproduce

  1. Run the server
  2. Type in console
  3. Experience System.ArgumentOutOfRangeException

Install logs

Eggs installs fine and runs correctly. (exept for the above bug)

VasilisThePikachu commented 6 days ago

This can either be solved panel/wings level or game engine level.

As far as I can tell, the reason this bug happens is that wings does not specify a terminal width/height. Or it can be solved game engine side but I literally cant debug this currently since due to how this project works i cant just attach a debugger without making my dev computer a node. (if that will even work)

QuintenQVD0 commented 6 days ago

We can easy set a tty with and height with an egg thats not an issue but I have tried this in the past and the console will still not take any commands.

VasilisThePikachu commented 6 days ago

We can easy set a tty with and height with an egg thats not an issue but I have tried this in the past and the console will still not take any commands.

I have tried that as well actually. If I could attach a debugger I would have probably at least found out why this happens.