Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreadable BSAs may cause the app to crash #63

Closed
focustense opened this issue Jul 22, 2021 · 0 comments
Closed

Unreadable BSAs may cause the app to crash #63

focustense opened this issue Jul 22, 2021 · 0 comments
Labels
bug Something isn't working easynpc Issues/requests relating the EasyNPC app

Comments

@focustense
Copy link
Owner

Report from Nexus user:

2021-07-21 10:57:32.405 -04:00 [INF] Reading NPC records from PA44_Windhelm_NPC.esp...
2021-07-21 10:57:32.416 -04:00 [INF] Reading NPC records from PA44_Winterhold_NPC.esp...
2021-07-21 10:57:32.441 -04:00 [INF] All NPCs loaded.
2021-07-21 11:53:04.997 -04:00 [ERR] Exception was not handled
System.AggregateException: One or more errors occurred. (Did not end all of its strings in null bytes) (Did not end all of its strings in null bytes)
 ---> System.IO.InvalidDataException: Did not end all of its strings in null bytes
   at Mutagen.Bethesda.Archives.Bsa.BsaFileNameBlock.<>c__DisplayClass1_0.<.ctor>b__0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Lazy`1.CreateValue()
   at Mutagen.Bethesda.Archives.Bsa.BsaFileRecord.GetName()
   at System.Lazy`1.PublicationOnlyViaFactory(LazyHelper initializer)
   at System.Lazy`1.CreateValue()
   at Mutagen.Bethesda.Archives.Bsa.BsaFileRecord.get_Path()
   at Focus.Apps.EasyNpc.Mutagen.MutagenArchiveProvider.<>c__DisplayClass5_0.<GetArchiveFileNames>b__0(IArchiveFile f)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at System.Linq.Enumerable.ConcatIterator`1.ToList()
   at Focus.Apps.EasyNpc.GameData.Files.ArchiveFileMap.<>c.<Initialize>b__8_4(<>f__AnonymousType5`2 x)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at Focus.Apps.EasyNpc.GameData.Files.ArchiveFileMap.<>c__DisplayClass8_0.<Initialize>b__1()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks)
   at System.Threading.Tasks.Parallel.Invoke(ParallelOptions parallelOptions, Action[] actions)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
   at System.Threading.Tasks.Parallel.Invoke(ParallelOptions parallelOptions, Action[] actions)
   at System.Threading.Tasks.Parallel.Invoke(Action[] actions)
   at Focus.Apps.EasyNpc.GameData.Files.ArchiveFileMap.Initialize()
   at Focus.Apps.EasyNpc.GameData.Files.ArchiveFileMap.EnsureInitialized()
   at Focus.Apps.EasyNpc.Build.BuildChecker`1.CheckModPluginConsistency(IEnumerable`1 npcs)
   at Focus.Apps.EasyNpc.Build.BuildChecker`1.CheckAll(IReadOnlyList`1 npcs, BuildSettings`1 buildSettings)
   at Focus.Apps.EasyNpc.Build.BuildViewModel`1.<>c__DisplayClass81_0.<CheckForProblems>b__3()

The error doesn't actually show up until something actually tries to read IArchiveFile.Path, which makes it a little less convenient to detect and log, since that property is read from many different inner loops. It just looks like every one of the individual methods will have to catch this exception.

@focustense focustense added bug Something isn't working easynpc Issues/requests relating the EasyNPC app labels Jul 22, 2021
@focustense focustense reopened this Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easynpc Issues/requests relating the EasyNPC app
Projects
None yet
Development

No branches or pull requests

1 participant