vatis-project / vatis

Virtual Automated ATIS Generator for VATSIM
https://docs.vatis.clowd.io
GNU General Public License v3.0
36 stars 16 forks source link

Crash on EHEH ATIS #142

Closed Vlooi closed 1 year ago

Vlooi commented 1 year ago

Our VATIS consistently crashed when trying to set an ATIS up for EHEH. This only happens incidentally. I believe it has to do with the 'GRN' in the ATIS. METAR at the time: EHEH 151925Z AUTO 31010KT 220V020 9999 FEW011 SCT014 BKN016 11/09 Q1017 GRN TEMPO SCT010 BKN015 SCT020CB

Error message in the event viewer: Application: vATIS.exe CoreCLR Version: 6.0.1623.17311 .NET Version: 6.0.16 Description: The process was terminated due to an unhandled exception. Exception Info: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. (Parameter 'length') at System.String.Substring(Int32 startIndex, Int32 length) at Vatsim.Vatis.Weather.Objects.WeatherPhenomena..ctor(String[] tokens, List1 errors) in Vatsim.Vatis\Weather\Objects\WeatherPhenomena.cs:line 115 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at Vatsim.Vatis.Weather.Objects.ReportBase.GetDataObjectOrNull[T](String[] groupTokens, List1 errors) in Vatsim.Vatis\Weather\Objects\ReportBase.cs:line 127 at Vatsim.Vatis.Weather.Objects.ReportBase.<>c__DisplayClass43_01.b0(String x) in Vatsim.Vatis\Weather\Objects\ReportBase.cs:line 141 at System.Linq.Enumerable.SelectArrayIterator2.ToArray() at Vatsim.Vatis.Weather.Objects.ReportBase.GetParsedDataArray[T](String[] tokens, List1 errors) in Vatsim.Vatis\Weather\Objects\ReportBase.cs:line 141 at Vatsim.Vatis.Weather.Objects.ReportBase..ctor(Dictionary2 groupedTokens, Month currentMonth) in Vatsim.Vatis\Weather\Objects\ReportBase.cs:line 101 at Vatsim.Vatis.Weather.Objects.Metar..ctor(Dictionary2 groupedTokens, Month currentMonth) in Vatsim.Vatis\Weather\Objects\Metar.cs:line 112 at Vatsim.Vatis.Weather.MetarParser.Parse(String metar) in Vatsim.Vatis\Weather\MetarParser.cs:line 37 at Vatsim.Vatis.UI.MainForm.<>cDisplayClass25_0.<b4>d.MoveNext() in Vatsim.Vatis\UI\MainForm.cs:line 300 --- End of stack trace from previous location --- at System.Threading.Tasks.Task.<>c.b128_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi) at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

justinshannon commented 1 year ago

This should be fixed in beta 14.