joshuamahan Posted June 1, 2023 Posted June 1, 2023 In some games when trying to make a living dex I run into this error. I found it strange that it works for Black and White but not Diamond or Peral. Exception Details: System.AggregateException: One or more errors occurred. (Exception of type 'System.ArgumentOutOfRangeException' was thrown. (Parameter 'gameSource') Actual value was DP.) ---> System.ArgumentOutOfRangeException: Exception of type 'System.ArgumentOutOfRangeException' was thrown. (Parameter 'gameSource') Actual value was DP. at PKHeX.Core.EncounterGenerator4.GetStatic(GameVersion gameSource) at PKHeX.Core.EncounterGenerator4.GetPossible(PKM _, EvoCriteria[] chain, GameVersion game, EncounterTypeGroup groups)+MoveNext() at PKHeX.Core.EncounterMovesetGenerator.GetStatic(PKM pk, UInt16[] needs, EvoCriteria[] chain, GameVersion version, IEncounterGenerator generator)+MoveNext() at PKHeX.Core.EncounterMovesetGenerator.GenerateVersionEncounters(PKM pk, UInt16[] moves, GameVersion version)+MoveNext() at PKHeX.Core.EncounterMovesetGenerator.GenerateEncounters(PKM pk, UInt16[] moves, IReadOnlyList`1 vers)+MoveNext() at PKHeX.Core.EncounterMovesetGenerator.GenerateEncounters(PKM pk, UInt16[] moves, GameVersion[] versions)+MoveNext() at PKHeX.Core.AutoMod.APILegality.GetLegalFromTemplate(ITrainerInfo dest, PKM template, IBattleTemplate set, LegalizationResult& satisfied, Boolean nativeOnly) in D:\a\1\s\PKHeX.Core.AutoMod\AutoMod\APILegality.cs:line 84 at PKHeX.Core.AutoMod.APILegality.<>c__DisplayClass100_0.<GetLegalFromTemplateTimeout>g__GetLegal|0() in D:\a\1\s\PKHeX.Core.AutoMod\AutoMod\APILegality.cs:line 1437 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.Core.AutoMod.APILegality.TimeoutAfter(Task`1 task, TimeSpan timeout) in D:\a\1\s\PKHeX.Core.AutoMod\AutoMod\APILegality.cs:line 1482 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at PKHeX.Core.AutoMod.APILegality.GetLegalFromTemplateTimeout(ITrainerInfo dest, PKM template, IBattleTemplate set, LegalizationResult& satisfied, Boolean nativeOnly) in D:\a\1\s\PKHeX.Core.AutoMod\AutoMod\APILegality.cs:line 1447 at PKHeX.Core.AutoMod.Legalizer.TryAPIConvert(ITrainerInfo tr, IBattleTemplate set, PKM template, PKM& pkm, Boolean nativeOnly) in D:\a\1\s\PKHeX.Core.AutoMod\AutoMod\Legalization\Legalizer.cs:line 200 at PKHeX.Core.AutoMod.ModLogic.GetRandomEncounter(PKM blank, ITrainerInfo tr, UInt16 species, Byte form, Boolean shiny, Boolean alpha, Boolean nativeOnly) in D:\a\1\s\PKHeX.Core.AutoMod\Enhancements\ModLogic.cs:line 176 at PKHeX.Core.AutoMod.ModLogic.GetRandomEncounter(ITrainerInfo tr, UInt16 species, Byte form, Boolean shiny, Boolean alpha, Boolean nativeOnly, PKM& pk) in D:\a\1\s\PKHeX.Core.AutoMod\Enhancements\ModLogic.cs:line 126 at PKHeX.Core.AutoMod.ModLogic.AddPKM(SaveFile sav, ITrainerInfo tr, UInt16 species, Byte form, Boolean shiny, Boolean alpha, Boolean nativeOnly) in D:\a\1\s\PKHeX.Core.AutoMod\Enhancements\ModLogic.cs:line 89 at PKHeX.Core.AutoMod.ModLogic.GenerateLivingDex(SaveFile sav, Boolean includeforms, Boolean shiny, Boolean alpha, Boolean nativeOnly) in D:\a\1\s\PKHeX.Core.AutoMod\Enhancements\ModLogic.cs:line 75 at PKHeX.Core.AutoMod.ModLogic.GenerateLivingDex(SaveFile sav) in D:\a\1\s\PKHeX.Core.AutoMod\Enhancements\ModLogic.cs:line 45 at AutoModPlugins.LivingDex.GenLivingDex(Object sender, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) Loaded Assemblies: -------------------- System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Private.CoreLib.dll PKHeX, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null C:\Users\joshu\AppData\Local\Temp\.net\PKHeX\Nd7w9hWR1IBIjfbZnE8u2Zg1Oi_DQ9U=\PKHeX.dll System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\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.5\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.5\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.5\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.5\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.5\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.5\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.5\System.Collections.dll System.Threading, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\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.5\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.5\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.5\System.ComponentModel.EventBasedAsync.dll Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.5\Accessibility.dll System.Resources.Extensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.5\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.5\System.Memory.dll System.Drawing, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.5\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.5\System.Numerics.Vectors.dll PKHeX.Core, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null C:\Users\joshu\AppData\Local\Temp\.net\PKHeX\Nd7w9hWR1IBIjfbZnE8u2Zg1Oi_DQ9U=\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.5\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.5\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.5\System.Collections.NonGeneric.dll System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Text.Json.dll System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Text.Encodings.Web.dll System.Text.Encoding.Extensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Text.Encoding.Extensions.dll System.Runtime.Intrinsics, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Runtime.Intrinsics.dll System.Collections.Concurrent, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Collections.Concurrent.dll System.ComponentModel.TypeConverter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.ComponentModel.TypeConverter.dll PKHeX.Drawing.PokeSprite, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null C:\Users\joshu\AppData\Local\Temp\.net\PKHeX\Nd7w9hWR1IBIjfbZnE8u2Zg1Oi_DQ9U=\PKHeX.Drawing.PokeSprite.dll System.ComponentModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.ComponentModel.dll System.ObjectModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.ObjectModel.dll System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Runtime.Loader.dll System.Private.Uri, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\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.5\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.5\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.5\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.5\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.5\System.Security.Cryptography.dll PKHeX.Drawing, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null C:\Users\joshu\AppData\Local\Temp\.net\PKHeX\Nd7w9hWR1IBIjfbZnE8u2Zg1Oi_DQ9U=\PKHeX.Drawing.dll System.Net.Quic, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\Microsoft.Win32.Registry.dll PKHeX.Drawing.Misc, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null C:\Users\joshu\AppData\Local\Temp\.net\PKHeX\Nd7w9hWR1IBIjfbZnE8u2Zg1Oi_DQ9U=\PKHeX.Drawing.Misc.dll System.Threading.ThreadPool, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\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.5\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.5\System.Net.NameResolution.dll System.Security.Principal.Windows, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\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.5\System.Text.RegularExpressions.dll System.Windows.Extensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\7.0.5\System.Windows.Extensions.dll AutoModPlugins, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null C:\Users\joshu\OneDrive\Documents\Video Games\Switch\PKHeX\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.5\System.IO.Compression.dll PKHeX.Core.Injection, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null PKHeX.Core.AutoMod, Version=23.5.11.0, Culture=neutral, PublicKeyToken=null System.Console, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Console.dll System.Runtime.Serialization.Formatters, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\System.Runtime.Serialization.Formatters.dll System.Diagnostics.StackTrace, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.5\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.5\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.5\System.Collections.Immutable.dll -------------------- User Message: An unhandled exception has occurred. You can continue running PKHeX, but please report this error.
Kaphotics Posted June 1, 2023 Posted June 1, 2023 >PKHeX.Core.AutoMod.APILegality.TimeoutAfter Plugin errors should be directed at the plugin author, not the main PKHeX forum. I'm not responsible for fixing other people's code, or advising what they're doing wrong.
Recommended Posts