KTManager / Legacy-KTManagerApp

The Legacy multi-platform mobile application for Kill Team Manager
GNU General Public License v3.0
12 stars 4 forks source link

[BUG] Hitting the Back button with no teams causes the app to crash #128

Closed sklarsa closed 4 years ago

sklarsa commented 4 years ago

Branch: develop Steps to reproduce:

  1. Load the app on a newly created device
  2. Make a new team
  3. Click Delete
  4. See the "Back" button in the top left and click it
    System.InvalidOperationException
    Source sequence doesn't contain any elements.
    at System.Linq.AsyncEnumerable.First_[TSource] (System.Collections.Generic.IAsyncEnumerable`1[T] source, System.Threading.CancellationToken cancellationToken) [0x000ed] in <d1ebabcf73114b24a6a9e78fbf5969ab>:0 
    at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider+TaskResultAsyncEnumerable`1+Enumerator[T].MoveNext (System.Threading.CancellationToken cancellationToken) [0x00075] in <905e41ddd9a149f0936da7d5ab99e38e>:0 
    at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider+ExceptionInterceptor`1+EnumeratorExceptionInterceptor[T].MoveNext (System.Threading.CancellationToken cancellationToken) [0x00143] in <905e41ddd9a149f0936da7d5ab99e38e>:0 
    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteSingletonAsyncQuery[TResult] (Microsoft.EntityFrameworkCore.Query.QueryContext queryContext, System.Func`2[T,TResult] compiledQuery, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1[TLoggerCategory] logger, System.Type contextType) [0x000d6] in <905e41ddd9a149f0936da7d5ab99e38e>:0 
    at KillTeam.Controllers.TeamController.UpdateItem () [0x004f1] in /Users/steven/source/KTManager/KTManagerApp/KillTeam/Controllers/TeamController.cs:122 
    at KillTeam.Controllers.TeamController.Refresh () [0x00020] in /Users/steven/source/KTManager/KTManagerApp/KillTeam/Controllers/TeamController.cs:117 
    at KillTeam.Views.TeamView.OnAppearing () [0x00046] in /Users/steven/source/KTManager/KTManagerApp/KillTeam/Views/TeamView.xaml.cs:34 
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 
    at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <eaa205f580954a64824b74a79fa87c62>:0 
    at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <eaa205f580954a64824b74a79fa87c62>:0 
    at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <eaa205f580954a64824b74a79fa87c62>:0 
    at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.34(intptr,intptr)