kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.71k stars 698 forks source link

encounter database #3954

Closed Awetspoon closed 1 year ago

Awetspoon commented 1 year ago

rebuilding the latest version of hex to the latest commit, I still cant use the encounter data base to search for pokemon moves.. example.... open up encounter database search for a move like belly drum then it comes up with a really long error message like this....

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array. at PKHeX.Core.LearnSource7USUM.GetAllMoves(Span1 result, PKM pk, EvoCriteria evo, MoveSourceType types) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\LearnSource\Sources\LearnSource7USUM.cs:line 99 at PKHeX.Core.LearnGroup7.GetAllMoves(Span1 result, PKM pk, EvoCriteria evo, MoveSourceType types, LearnOption option, CheckMode mode) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\LearnSource\Group\LearnGroup7.cs:line 164 at PKHeX.Core.LearnGroup7.GetAllMoves(Span1 result, PKM pk, EvolutionHistory history, IEncounterTemplate enc, MoveSourceType types, LearnOption option) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\LearnSource\Group\LearnGroup7.cs:line 160 at PKHeX.Core.LearnGroupHOME.GetAllMoves(Span1 result, PKM pk, EvolutionHistory history, IEncounterTemplate enc, MoveSourceType types, LearnOption option) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\LearnSource\Group\LearnGroupHOME.cs:line 139 at PKHeX.Core.LearnGroup9.GetAllMoves(Span1 result, PKM pk, EvolutionHistory history, IEncounterTemplate enc, MoveSourceType types, LearnOption option) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\LearnSource\Group\LearnGroup9.cs:line 128 at PKHeX.Core.EncounterMovesetGenerator.GetNeededMoves(PKM pk, ReadOnlySpan1 moves, GameVersion ver, Int32 generation, EntityContext context) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\Encounters\Generator\Moveset\EncounterMovesetGenerator.cs:line 256 at PKHeX.Core.EncounterMovesetGenerator.GenerateVersionEncounters(PKM pk, ReadOnlyMemory1 moves, GameVersion version, Byte generation, EntityContext context)+MoveNext() in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\Encounters\Generator\Moveset\EncounterMovesetGenerator.cs:line 207 at PKHeX.Core.EncounterMovesetGenerator.GenerateVersionEncounters(PKM pk, ReadOnlyMemory1 moves, GameVersion version)+MoveNext() in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\Encounters\Generator\Moveset\EncounterMovesetGenerator.cs:line 190 at PKHeX.Core.EncounterMovesetGenerator.GenerateEncounters(PKM pk, ReadOnlyMemory1 moves, IReadOnlyList1 vers)+MoveNext() in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.Core\Legality\Encounters\Generator\Moveset\EncounterMovesetGenerator.cs:line 165 at PKHeX.WinForms.SAV_Encounters.GetAllSpeciesFormEncounters(IEnumerable1 species, IPersonalTable pt, IReadOnlyList1 versions, UInt16[] moves, PKM pk, CancellationToken token)+MoveNext() in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.WinForms\Subforms\SAV_Encounters.cs:line 324 at System.Linq.Enumerable.DistinctIterator1.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.ToList() at PKHeX.WinForms.SAV_Encounters.<>cDisplayClass28_0.b__0() in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.WinForms\Subforms\SAV_Encounters.cs:line 397 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at PKHeX.WinForms.SAV_Encounters.B_Search_Click(Object sender, EventArgs e) in C:\Users\mratc\Source\Repos\PKHeX\PKHeX.WinForms\Subforms\SAV_Encounters.cs:line 397 at System.Threading.Tasks.Task.<>c.b128_0(Object state) at InvokeStub_SendOrPostCallback.Invoke(Object, Object, IntPtr) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr)

Loaded Assemblies:

System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Private.CoreLib.dll

PKHeX, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null C:\Users\mratc\Desktop\Pokemon\Hex - Copy\PKHeX.dll

System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Runtime.dll

System.Threading.Thread, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Threading.Thread.dll

System.Windows.Forms, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\System.Windows.Forms.dll

System.ComponentModel.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.ComponentModel.Primitives.dll

System.Windows.Forms.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\System.Windows.Forms.Primitives.dll

System.Runtime.InteropServices, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Runtime.InteropServices.dll

System.Drawing.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Drawing.Primitives.dll

System.Collections.Specialized, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Collections.Specialized.dll

System.Collections, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Collections.dll

System.Threading, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Threading.dll

System.Diagnostics.TraceSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Diagnostics.TraceSource.dll

System.Drawing.Common, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\System.Drawing.Common.dll

Microsoft.Win32.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\Microsoft.Win32.Primitives.dll

System.ComponentModel.EventBasedAsync, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.ComponentModel.EventBasedAsync.dll

Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\Accessibility.dll

System.Resources.Extensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\System.Resources.Extensions.dll

System.Memory, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Memory.dll

System.Drawing, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\System.Drawing.dll

System.Numerics.Vectors, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Numerics.Vectors.dll

PKHeX.Core, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null C:\Users\mratc\Desktop\Pokemon\Hex - Copy\PKHeX.Core.dll

Microsoft.Win32.SystemEvents, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\Microsoft.Win32.SystemEvents.dll

System.Linq, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Linq.dll

System.Collections.NonGeneric, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Collections.NonGeneric.dll

System.ComponentModel.TypeConverter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.ComponentModel.TypeConverter.dll

System.ComponentModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.ComponentModel.dll

System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Text.Json.dll

PKHeX.Drawing.PokeSprite, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null C:\Users\mratc\Desktop\Pokemon\Hex - Copy\PKHeX.Drawing.PokeSprite.dll

System.Collections.Concurrent, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Collections.Concurrent.dll

System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Runtime.Loader.dll

System.ObjectModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.ObjectModel.dll

System.Private.Uri, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Private.Uri.dll

System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Net.Http.dll

System.Net.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Net.Primitives.dll

System.Diagnostics.Tracing, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Diagnostics.Tracing.dll

System.Diagnostics.DiagnosticSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Diagnostics.DiagnosticSource.dll

System.Net.Security, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Net.Security.dll

System.Security.Cryptography, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Security.Cryptography.dll

System.Net.Quic, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Net.Quic.dll

Microsoft.Win32.Registry, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\Microsoft.Win32.Registry.dll

System.Windows.Extensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.9\System.Windows.Extensions.dll

System.Threading.ThreadPool, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Threading.ThreadPool.dll

System.Net.Sockets, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Net.Sockets.dll

System.Threading.Overlapped, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Threading.Overlapped.dll

System.Net.NameResolution, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Net.NameResolution.dll

PKHeX.Drawing, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null C:\Users\mratc\Desktop\Pokemon\Hex - Copy\PKHeX.Drawing.dll

PKHeX.Drawing.Misc, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null C:\Users\mratc\Desktop\Pokemon\Hex - Copy\PKHeX.Drawing.Misc.dll

System.Security.Principal.Windows, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Security.Principal.Windows.dll

System.Security.Claims, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Security.Claims.dll

System.Text.RegularExpressions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Text.RegularExpressions.dll

AutoModPlugins, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null C:\Users\mratc\Desktop\Pokemon\Hex - Copy\plugins\AutoModPlugins.dll

System.IO.Compression, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.IO.Compression.dll

PKHeX.Core.Injection, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null

PKHeX.Core.AutoMod, Version=23.7.9.0, Culture=neutral, PublicKeyToken=null

System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Text.Encodings.Web.dll

System.Reflection.Emit.Lightweight, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Reflection.Emit.Lightweight.dll

System.Reflection.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Reflection.Primitives.dll

System.Reflection.Emit.ILGeneration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Reflection.Emit.ILGeneration.dll

System.Runtime.Intrinsics, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Runtime.Intrinsics.dll

System.Text.Encoding.Extensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Text.Encoding.Extensions.dll

System.Diagnostics.Process, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Diagnostics.Process.dll

System.Runtime.Serialization.Formatters, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Runtime.Serialization.Formatters.dll

System.Diagnostics.FileVersionInfo, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Diagnostics.FileVersionInfo.dll

System.Diagnostics.StackTrace, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Diagnostics.StackTrace.dll

System.Reflection.Metadata, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Reflection.Metadata.dll

System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Collections.Immutable.dll

System.IO.MemoryMappedFiles, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.IO.MemoryMappedFiles.dll

System.Text.Encoding.CodePages, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.9\System.Text.Encoding.CodePages.dll


User Message: An unhandled exception has occurred. You can continue running PKHeX, but please report this error.

kwsch commented 1 year ago

To help replicating the error, can you provide detail on what exactly you are searching?

I checked the stack trace you included and don't see the line numbers matching the source code...

Awetspoon commented 1 year ago

so hex live or save file loaded abd here is a picture image

Awetspoon commented 1 year ago

so this is on the latest commit and i rebuild it from release with the repo

kwsch commented 1 year ago

Unable to replicate.

Save File Loaded: Violet EncounterDB search settings: image I tried all permutations of ^ being true/false, nothing.

If you run the program with Visual Studio and debug mode, the program should pause execution and indicate where exactly it is erroring. The stacktrace you've provided with line numbers does not line up with anything.

If you can come up with a more narrow replication setup, please let me know, otherwise I don't think this is an issue with the main repo / latest commits.

Awetspoon commented 1 year ago

so i did run the debug mode and i it dont fail in studio only get it when im using the application and even on debug mode i get image

Awetspoon commented 1 year ago

think it is my end but not to sure what to do to fix it sorry for being a pain

kwsch commented 1 year ago

Be sure you are running the newly built application. Double check the program title bar, which should indicate the date.

If that doesn't work, just wait until the next release sometime this week and try again then.

Awetspoon commented 1 year ago

I'll wait for the new application and I'll see what happens . Everytime you have added a new commit I have rebuilt it to get the lastest commit and didn't have any problems doing it untill the last updated. Plugins also had the same problem on closing it but that has been fixed as now it closes with out aborting. Just pk hex doing it at the moment on the encounter database move select search. Bit I'll wait and see what happens. Thanks you for the response too I really appreciate it ✌️

On Sun, 13 Aug 2023, 11:10 pm Kurt, @.***> wrote:

Be sure you are running the newly built application. Double check the program title bar, which should indicate the date.

If that doesn't work, just wait until the next release sometime this week and try again then.

— Reply to this email directly, view it on GitHub https://github.com/kwsch/PKHeX/issues/3954#issuecomment-1676475902, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5J6LSLMDY62AU4PHVO6WZLXVFGELANCNFSM6AAAAAA3ITGTRA . You are receiving this because you authored the thread.Message ID: @.***>