pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.84k stars 2.32k forks source link

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

Open VasilisThePikachu opened 7 months ago

VasilisThePikachu commented 7 months ago

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 https://github.com/space-wizards/RobustToolbox/blob/156187a0dd4604213ee3a9bfff295f6fc3a7a412/Robust.Server/Console/SystemConsoleManager.cs#L286

Steps To Reproduce

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

Install logs

https://pteropaste.com/w2k7tm848wzj

VasilisThePikachu commented 7 months ago

Now yes for Space Station 14, the console is not so important to write into, especially after giving yourself permission (you can use the console.login_host_user ccvar into your config file). And then using the sudo command in game (or starting your command with > works too I think)

But I would expect it to not crash. This will potentially need an upstream engine fix.

Btw the reason this is not an engine issue as well is that maints don't officially support pterodactyl. The official way is using a watchdog program that handles updating and other server management

DebugOk commented 7 months ago

I have ran the watchdog in pterodactyl (on this egg), and it'll still absolutely die if you even dare press enter in the console