06-28-2017, 03:43 PM
21/06/2017: 00:07 System.NullReferenceException: Object reference not set to an instance of an object.
at TheAirlineProjectV2.Infrastructure.Model.GeneralModel.SetupNewGameAirline.<>c__DisplayClass1_0.<SetupAirline>b__0(AirlinePrefered`1 a) in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Infrastructure\Model\GeneralModel\SetupNewGameAirline.cs:line 24
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at TheAirlineProjectV2.Infrastructure.Model.GeneralModel.SetupNewGameAirline.SetupAirline(Airline airline, Int32 startyear, Boolean isHuman) in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Infrastructure\Model\GeneralModel\SetupNewGameAirline.cs:line 24
at TheAirlineProjectV2.Infrastructure.Model.GeneralModel.SetupNewGame.StartNewGame(Airline human, Int32 startyear, Int32 opponents, List`1 airlines, Boolean useMajorAirlines, Boolean useMajorAirports, List`1 regions, Boolean useContinentOpponents) in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Infrastructure\Model\GeneralModel\SetupNewGame.cs:line 52
at TheAirlineProjectV2.Modules.MainMenu.ViewModels.MainMenuWindowViewModel.startGame() in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Modules.MainMenu\ViewModels\MainMenuWindowViewModel.cs:line 292
at TheAirlineProjectV2.Modules.MainMenu.ViewModels.MainMenuWindowViewModel.StartGameNext() in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Modules.MainMenu\ViewModels\MainMenuWindowViewModel.cs:line 277
at Prism.Commands.DelegateCommandBase.<>c__DisplayClass6_0.<.ctor>b__0(Object arg)
at Prism.Commands.DelegateCommandBase.<Execute>d__15.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 Prism.Commands.DelegateCommandBase.<System-Windows-Input-ICommand-Execute>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
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 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.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at TheAirlineProjectV2.App.Main()
at TheAirlineProjectV2.Infrastructure.Model.GeneralModel.SetupNewGameAirline.<>c__DisplayClass1_0.<SetupAirline>b__0(AirlinePrefered`1 a) in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Infrastructure\Model\GeneralModel\SetupNewGameAirline.cs:line 24
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at TheAirlineProjectV2.Infrastructure.Model.GeneralModel.SetupNewGameAirline.SetupAirline(Airline airline, Int32 startyear, Boolean isHuman) in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Infrastructure\Model\GeneralModel\SetupNewGameAirline.cs:line 24
at TheAirlineProjectV2.Infrastructure.Model.GeneralModel.SetupNewGame.StartNewGame(Airline human, Int32 startyear, Int32 opponents, List`1 airlines, Boolean useMajorAirlines, Boolean useMajorAirports, List`1 regions, Boolean useContinentOpponents) in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Infrastructure\Model\GeneralModel\SetupNewGame.cs:line 52
at TheAirlineProjectV2.Modules.MainMenu.ViewModels.MainMenuWindowViewModel.startGame() in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Modules.MainMenu\ViewModels\MainMenuWindowViewModel.cs:line 292
at TheAirlineProjectV2.Modules.MainMenu.ViewModels.MainMenuWindowViewModel.StartGameNext() in C:\Users\Christian\Documents\Visual Studio 2017\Projects\TheAirlineProjectV2\TheAirlineProjectV2.Modules.MainMenu\ViewModels\MainMenuWindowViewModel.cs:line 277
at Prism.Commands.DelegateCommandBase.<>c__DisplayClass6_0.<.ctor>b__0(Object arg)
at Prism.Commands.DelegateCommandBase.<Execute>d__15.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 Prism.Commands.DelegateCommandBase.<System-Windows-Input-ICommand-Execute>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
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 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.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at TheAirlineProjectV2.App.Main()