TorchAPI / Torch

An extensible modding framework and improved client/DS for Space Engineers. Still a work in progress!
Apache License 2.0
146 stars 76 forks source link

[Crash] [Torch 1.1.213.390, SE 1.182.204] Crash when the chat history tab is updated. #68

Closed SeeJayEmm closed 7 years ago

SeeJayEmm commented 7 years ago

Expected Behavior

What did you expect to happen? The game would manually save.

Observed Behavior

What actually happened? The server crashed.

Steps to Reproduce

  1. How did this issue get triggered? Type /save in in-game chat.
  2. Write the steps here. Type /save in in-game chat.

Other Information

OS: Windows 7 Ultimate 6.1.7601 .NET 4.6.1 (4.6.01055) Happens with and without Essentials loaded.

12:59:37.6582 [INFO] Chat: SeeJayEmm: /save 12:59:37.7333 [FATAL] Torch: System.InvalidCastException: Unable to cast object of type 'Microsoft.Windows.Themes.ClassicBorderDecorator' to type 'System.Windows.Controls.Border'. at Torch.Server.ChatControl.ChatHistory_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Window.ShowHelper(Object booleanBox) at System.Windows.Window.ShowDialog() at Torch.Server.Program.RunServer(TorchConfig config) at Torch.Server.Program.Main(String[] args) Exiting in 5 seconds.

kamikaze0310 commented 7 years ago

The command is !save but yea there might be an issue if /save is sent, as that shouldn't crash it....

Jimmacle commented 7 years ago

Are you using the Windows Classic theme by any chance?

SeeJayEmm commented 7 years ago

Why yes I am. It's a VM with fairly crappy gfx. I can switch it to test though.

Jimmacle commented 7 years ago

Yeah, try switching to the default theme and see if it crashes when the chat history fills up.

SeeJayEmm commented 7 years ago

Ok... set to default and rebooted. /save does not crash the server. !save works and does not crash the server. Spammed the chat (in-game) until the scroll bar appeared in Torch. Did not crash the server.

Jimmacle commented 7 years ago

Alright, I should be able to fix that soon. The UI framework I'm using has pretty poor "scroll to bottom" functionality and apparently the hack I'm using doesn't work with that theme.

SeeJayEmm commented 7 years ago

Not the end of the world for me. I can leave it as is. Thanks for the assist.

kurazarrh commented 7 years ago

This would explain why mine always crashes when I send text commands (#51)--Server editions of Windows normally only install with the Classic theme. A brief bit of Google-fu shows that it's possible to install the Aero theme to get around this, but I'll wait for a fix. Would rather not weigh my server down with extra gfx it doesn't need.

Jimmacle commented 7 years ago

Fixed 82815f66e5384b8e8427d50720e23aebd3e10da0

kurazarrh commented 7 years ago

Confirmed fixed, on WinServ2008R2, classic theme.