midspace / Space-Engineers-Admin-script-mod

Modding script for Space Engineers with dozens of Admin commands for creating game scenarios or supporting servers.
45 stars 13 forks source link

MOTD draw causes CTD with ArgumentOutOfRangeException #185

Closed leonexis closed 6 years ago

leonexis commented 6 years ago

Occurs with the MOTD window. Removing the MOTD resolves the issue. May be due to recent changes in SE re GUI.

From log:

2017-09-14 21:28:23.326 - Thread:   1 ->  Exception occured: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at Sandbox.Graphics.GUI.MyRichLabel.Draw(Vector2 position, Single offset, Vector2 drawSizeMax, Single alphamask)
   at Sandbox.Graphics.GUI.MyGuiControlMultilineText.DrawText(Single offset, Single alphamask)
   at Sandbox.Graphics.GUI.MyGuiControlMultilineText.Draw(Single transitionAlpha, Single backgroundTransitionAlpha)
   at Sandbox.Graphics.GUI.MyGuiScreenBase.DrawControls(Single transitionAlpha, Single backgroundTransitionAlpha)
   at Sandbox.Graphics.GUI.MyGuiScreenBase.Draw()
   at Sandbox.Graphics.GUI.MyScreenManager.Draw()
   at Sandbox.Graphics.GUI.MyDX9Gui.Draw()
   at Sandbox.MySandboxGame.PrepareForDraw()
   at Sandbox.Engine.Platform.Game.UpdateInternal()
   at Sandbox.Engine.Platform.Game.RunSingleFrame()
   at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass1.<Run>b__0()
   at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
   at Sandbox.Engine.Platform.Game.RunLoop()
   at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
   at SpaceEngineers.MyProgram.Main(String[] args)
midspace commented 6 years ago

I'm unable to reproduce the issue. Current testing on public Servers and private Lan doesn't show any issues. 20170915073805_1

Unfortunately the information you provided only shows the game code crashing. Not the Mod.

Are you able to provide a copy of your world, and any configuration you are using for mods?

leonexis commented 6 years ago

sedebug.zip

Crash log is in that archive. world-local is the copy I ran locally to recreate the issue in single player. world-server is the world hosted on the server. Storage contains the configuration and MOTD.

Please let me know if you need any more info.

leonexis commented 6 years ago

The fact that you were not able to reproduce the issue led me to believe that it might be a mod conflict. I removed all mods except for the planets and this mod and I did not get a CTD. I will narrow down the mods to see if it is a specific one that is triggering the issue. Sadly, the trace doesn't give any good info as the order of the "Up to date" mods keeps changing before the error occurs. Will post again once I find out more.

leonexis commented 6 years ago

Well, this is not an issue with this mod as best as I can tell. The CTD seems to be random, it just so happened to not crash when I disabled this mod and re-enabled, but removed the MOTD.

At this point, I would say there is not enough evidence to say this is a Admin mod issue. Please close if you agree.

midspace commented 6 years ago

I agree, however I'll leave it open for the time been as other players and Admins are sure to have similar issues until it is resolved. They may have further insight.

midspace commented 6 years ago

It looks like there may have been a general stuff up in regards to how dialogs and messages are displayed in game, which affects any mod. I can only leave it in Keen's hands.

midspace commented 6 years ago

The latest hotfix release of the game should have fixed the issue now.

https://forum.keenswh.com/threads/7397142/

Hotfixes 1.184.005:
...
fixed crash when loading a world with mods

If it has fixed it, please close the issue.

midspace commented 6 years ago

No response back. Issue should be fixed now.