prom3theu5 / ConanExilesServerUpdater

Dedicated Server Updater For Conan Exiles
Apache License 2.0
11 stars 2 forks source link

[1.9] ServerUpdater crash on update #11

Closed Aoxmodeus closed 7 years ago

Aoxmodeus commented 7 years ago

I had this on 1.8 as well. ServerUpdater saw an update available. It closed the ConanServer no problem.

Then after a couple of minutes, this (From Updater Log):

2017-02-10 18:05:22.307 -08:00 [Information] Installed Version is the same or greater than the steam version. No Update Needed! 2017-02-10 18:10:26.875 -08:00 [Information] Detected SteamVersion as: 1623976. Your version is: "1622966" An Update is required. 2017-02-10 18:10:26.880 -08:00 [Information] Monitor Service has been stopped successfully 2017-02-10 18:16:00.926 -08:00 [Fatal] The service threw an unhandled exception System.InvalidOperationException: Cannot process request because the process (3896) has exited. at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.Kill() at ConanExilesUpdater.Services.Updater.d15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ConanExilesUpdater.Services.Updater.<b14_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ConanExilesUpdater.Services.Updater.d14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b5(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) 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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 2017-02-10 18:16:00.926 -08:00 [Information] Stopping the "ConanExilesUpdater$ConanExilesUpdater" service 2017-02-10 18:16:01.035 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service has stopped.

prom3theu5 commented 7 years ago

hey bud Is this on 1.92?

Aoxmodeus commented 7 years ago

Just saw 1.92 was release, pulling down now.

Oh hi there :D

prom3theu5 commented 7 years ago

There was a bit of an issue with the cleanup method on the earlier release - should be fixed (hopefully) in the later one :)

Aoxmodeus commented 7 years ago

Hmm, I just had 1.92 crash twice on updating then starting the server. This was when setting the version number lower than expected and forcing an update at start. Everything's running now, going to let it sit and see how it goes.

prom3theu5 commented 7 years ago

Uhoh Could you add the log here please man

Aoxmodeus commented 7 years ago

Here ya go:

2017-02-10 18:22:23.720 -08:00 [Information] Loaded settings from file: "config.json" 2017-02-10 18:22:23.751 -08:00 [Information] Loaded Messages from file: "messages.json" 2017-02-10 18:22:23.798 -08:00 [Information] Configuration Result: "[Success] Name ConanExilesUpdater [Success] DisplayName ConanExilesUpdater (Instance: ConanExilesUpdater) [Success] Description Conan Exiles Server Updater [Success] InstanceName ConanExilesUpdater [Success] ServiceName ConanExilesUpdater$ConanExilesUpdater" 2017-02-10 18:22:23.798 -08:00 [Information] "Topshelf" v"4.0.0.0", .NET Framework v"4.0.30319.36373" 2017-02-10 18:22:23.814 -08:00 [Debug] Running as a console application, creating the console host. 2017-02-10 18:22:23.814 -08:00 [Debug] Starting up as a console application 2017-02-10 18:22:23.814 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service is now running, press Control+C to exit. 2017-02-10 18:22:23.861 -08:00 [Information] ConanExilesUpdater Started Running 02/11/2017 02:22:23 2017-02-10 18:22:29.120 -08:00 [Information] Installed Version is the same or greater than the steam version. No Update Needed! 2017-02-10 18:22:29.151 -08:00 [Information] Starting To Monitor Server is Running 2017-02-10 18:22:29.880 -08:00 [Information] Discord Connected! 2017-02-10 18:22:53.084 -08:00 [Information] Control+C detected, attempting to stop service. 2017-02-10 18:22:53.209 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service has stopped. 2017-02-10 18:23:10.715 -08:00 [Information] Loaded settings from file: "config.json" 2017-02-10 18:23:10.747 -08:00 [Information] Loaded Messages from file: "messages.json" 2017-02-10 18:23:10.793 -08:00 [Information] Configuration Result: "[Success] Name ConanExilesUpdater [Success] DisplayName ConanExilesUpdater (Instance: ConanExilesUpdater) [Success] Description Conan Exiles Server Updater [Success] InstanceName ConanExilesUpdater [Success] ServiceName ConanExilesUpdater$ConanExilesUpdater" 2017-02-10 18:23:10.793 -08:00 [Information] "Topshelf" v"4.0.0.0", .NET Framework v"4.0.30319.36373" 2017-02-10 18:23:10.809 -08:00 [Debug] Running as a console application, creating the console host. 2017-02-10 18:23:10.809 -08:00 [Debug] Starting up as a console application 2017-02-10 18:23:10.825 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service is now running, press Control+C to exit. 2017-02-10 18:23:10.856 -08:00 [Information] ConanExilesUpdater Started Running 02/11/2017 02:23:10 2017-02-10 18:23:16.243 -08:00 [Information] Detected SteamVersion as: 1623976. Your version is: "1620976" An Update is required. 2017-02-10 18:23:25.144 -08:00 [Fatal] The service threw an unhandled exception System.NullReferenceException: Object reference not set to an instance of an object. at ConanExilesUpdater.Services.Updater.StartConan() at ConanExilesUpdater.Services.Updater.b9_0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ConanExilesUpdater.Services.Updater.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ConanExilesUpdater.Program.<>c.<

b2_3>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b5(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) 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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 2017-02-10 18:23:25.160 -08:00 [Information] Stopping the "ConanExilesUpdater$ConanExilesUpdater" service 2017-02-10 18:23:25.175 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service has stopped. 2017-02-10 18:24:03.677 -08:00 [Information] Loaded settings from file: "config.json" 2017-02-10 18:24:03.708 -08:00 [Information] Loaded Messages from file: "messages.json" 2017-02-10 18:24:03.755 -08:00 [Information] Configuration Result: "[Success] Name ConanExilesUpdater [Success] DisplayName ConanExilesUpdater (Instance: ConanExilesUpdater) [Success] Description Conan Exiles Server Updater [Success] InstanceName ConanExilesUpdater [Success] ServiceName ConanExilesUpdater$ConanExilesUpdater" 2017-02-10 18:24:03.755 -08:00 [Information] "Topshelf" v"4.0.0.0", .NET Framework v"4.0.30319.36373" 2017-02-10 18:24:03.771 -08:00 [Debug] Running as a console application, creating the console host. 2017-02-10 18:24:03.771 -08:00 [Debug] Starting up as a console application 2017-02-10 18:24:03.786 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service is now running, press Control+C to exit. 2017-02-10 18:24:03.818 -08:00 [Information] ConanExilesUpdater Started Running 02/11/2017 02:24:03 2017-02-10 18:24:08.546 -08:00 [Information] Installed Version is the same or greater than the steam version. No Update Needed! 2017-02-10 18:24:08.578 -08:00 [Information] Starting To Monitor Server is Running 2017-02-10 18:24:09.296 -08:00 [Information] Discord Connected! 2017-02-10 18:24:11.216 -08:00 [Information] Control+C detected, attempting to stop service. 2017-02-10 18:24:11.326 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service has stopped. 2017-02-10 18:24:31.883 -08:00 [Information] Loaded settings from file: "config.json" 2017-02-10 18:24:31.906 -08:00 [Information] Loaded Messages from file: "messages.json" 2017-02-10 18:24:31.962 -08:00 [Information] Configuration Result: "[Success] Name ConanExilesUpdater [Success] DisplayName ConanExilesUpdater (Instance: ConanExilesUpdater) [Success] Description Conan Exiles Server Updater [Success] InstanceName ConanExilesUpdater [Success] ServiceName ConanExilesUpdater$ConanExilesUpdater" 2017-02-10 18:24:31.965 -08:00 [Information] "Topshelf" v"4.0.0.0", .NET Framework v"4.0.30319.36373" 2017-02-10 18:24:31.976 -08:00 [Debug] Running as a console application, creating the console host. 2017-02-10 18:24:31.980 -08:00 [Debug] Starting up as a console application 2017-02-10 18:24:31.985 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service is now running, press Control+C to exit. 2017-02-10 18:24:32.020 -08:00 [Information] ConanExilesUpdater Started Running 02/11/2017 02:24:32 2017-02-10 18:24:37.052 -08:00 [Information] Detected SteamVersion as: 1623976. Your version is: "1620976" An Update is required. 2017-02-10 18:24:40.267 -08:00 [Fatal] The service threw an unhandled exception System.NullReferenceException: Object reference not set to an instance of an object. at ConanExilesUpdater.Services.Updater.StartConan() at ConanExilesUpdater.Services.Updater.b9_0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ConanExilesUpdater.Services.Updater.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ConanExilesUpdater.Program.<>c.<
b2_3>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b5(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) 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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 2017-02-10 18:24:40.283 -08:00 [Information] Stopping the "ConanExilesUpdater$ConanExilesUpdater" service 2017-02-10 18:24:40.283 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service has stopped. 2017-02-10 18:24:57.278 -08:00 [Information] Loaded settings from file: "config.json" 2017-02-10 18:24:57.293 -08:00 [Information] Loaded Messages from file: "messages.json" 2017-02-10 18:24:57.356 -08:00 [Information] Configuration Result: "[Success] Name ConanExilesUpdater [Success] DisplayName ConanExilesUpdater (Instance: ConanExilesUpdater) [Success] Description Conan Exiles Server Updater [Success] InstanceName ConanExilesUpdater [Success] ServiceName ConanExilesUpdater$ConanExilesUpdater" 2017-02-10 18:24:57.356 -08:00 [Information] "Topshelf" v"4.0.0.0", .NET Framework v"4.0.30319.36373" 2017-02-10 18:24:57.371 -08:00 [Debug] Running as a console application, creating the console host. 2017-02-10 18:24:57.371 -08:00 [Debug] Starting up as a console application 2017-02-10 18:24:57.371 -08:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service is now running, press Control+C to exit. 2017-02-10 18:24:57.402 -08:00 [Information] ConanExilesUpdater Started Running 02/11/2017 02:24:57 2017-02-10 18:25:02.771 -08:00 [Information] Installed Version is the same or greater than the steam version. No Update Needed! 2017-02-10 18:25:02.802 -08:00 [Information] Starting To Monitor Server is Running 2017-02-10 18:25:03.676 -08:00 [Information] Discord Connected! 2017-02-10 18:25:32.809 -08:00 [Information] Conan Server Not Detected - Launching Now

prom3theu5 commented 7 years ago

I see the issue, I'll pull it down and fix now before bed Basically at the end of StartConan() - it tries to restart the monitoring. Unfortunately the generalServices service isn't actually created until after the update check, so the null reference exception occurs.

prom3theu5 commented 7 years ago

Sorted :) https://github.com/prom3theu5/ConanExilesServerUpdater/releases/download/1.93/1.93.zip

Aoxmodeus commented 7 years ago

Lookin good so far! The messages were a nice addition, too, btw.

prom3theu5 commented 7 years ago

Thanks man :) Aye makes it a little more personal, allows you to do @everyone and @here etc on discord