BeyondTheHorizon Posted August 28, 2018 Posted August 28, 2018 (edited) Hi, When I went to import a Gen I moveset from the clipboard, PKHeX gave an unhandled exception. The moveset was as follows: Mew Level: 5 EVs: 1 HP / 1 Atk / 1 Def / 1 SpA / 1 SpD / 1 Spe - Cut - Fly - Surf - Strength The exception was as follows: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. at PKHeX.Core.CommonEdits.ApplySetDetails(PKM pk, ShowdownSet Set) at PKHeX.WinForms.Controls.PKMEditor.LoadShowdownSetDefault(ShowdownSet Set) at PKHeX.WinForms.Main.ClickShowdownImportPKM(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, 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.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) 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.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Loaded Assemblies: -------------------- mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll PKHeX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null D:\Robert's Folder\Games\Hacking Tools\Pokémon\PKHeX\PKHeX.exe System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll PKHeX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null D:\Robert's Folder\Games\Hacking Tools\Pokémon\PKHeX\PKHeX.Core.dll System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll -------------------- User Message: An unhandled exception has occurred. You can continue running PKHeX, but please report this error. Hope this can be fixed. Thank you for reading. EDIT: I rushed this post and didn't explain that the exception occurs when importing the set from within a Gen I save file. I can confirm it imports without an exception within a Gen II save file, as well as when one imports the set before loading a save file. Edited August 29, 2018 by BeyondTheHorizon Added further information
Kaphotics Posted August 28, 2018 Posted August 28, 2018 Not able to replicate on latest commit; I assume this has been fixed since the latest exe you've downloaded's date.
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 Hmm, I'm assuming it's not a PKHeX error then, but I tried the latest commit and I am still getting the exception. Do you know what causes this exception from the message above?
theSLAYER Posted August 29, 2018 Posted August 29, 2018 I too, am unable to replicate the issue. It imports just fine. However a peculiar error appeared
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 I should have explained in the original post that I was attempting to import the set after opening a Yellow save file. I think when I wrote "Gen I moveset", I assumed people would know that I did that. Silly me. It indeed imports without an exception if I import the set immediately after opening PKHeX. It also imports without an exception after opening a Crystal save file.
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 Aha! I think I've found the problem. It raises an exception if I import in Yellow when either the Pokémon's Level is illegal or—in the case of Mew—can't legally be obtained in-game (without the infamous Mew glitch). I have also discovered that Gen 2 tradebacks must also be set to "Yes" for exceptions to occur. For example, this moveset… Mewtwo Level: 70 - Swift - Psychic - Barrier - Recover …imports without an exception. However, this moveset… Mewtwo Level: 69 - Disable - Swift - Psychic - Barrier …raises an exception because it is impossible to obtain a Mewtwo below Level 70 legally in Gen I. It should be able to import and then let you know its Level isn't legal. I hope this helps.
theSLAYER Posted August 29, 2018 Posted August 29, 2018 @BeyondTheHorizon trying to import the both lv 70 and 69 Mewtwo when I had a Yellow save open, also didn't throw the exception for me.. Even with tradeback set to Yes, nothing abnormal happened.
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 Well, there goes my theory. Now I'm completely lost.
theSLAYER Posted August 29, 2018 Posted August 29, 2018 2 minutes ago, BeyondTheHorizon said: Well, there goes my theory. Now I'm completely lost. try re-downloading PKHeX, and test it again
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 3 minutes ago, theSLAYER said: try re-downloading PKHeX, and test it again I did, but it still throws the error. Ugh! Nobody else can reproduce it, so it can't be a PKHeX problem. I wonder if it's a .NET problem. 1
theSLAYER Posted August 29, 2018 Posted August 29, 2018 7 minutes ago, BeyondTheHorizon said: I did, but it still throws the error. Ugh! Nobody else can reproduce it, so it can't be a PKHeX problem. I wonder if it's a .NET problem. I know how frustrating that must be. In the mean time, maybe use a few different older revisions, and see if there's any version that doesn't throw the error for you.
Sabresite Posted August 29, 2018 Posted August 29, 2018 Post your files and maybe even make a quick video?
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 29 minutes ago, theSLAYER said: In the mean time, maybe use a few different older revisions, and see if there's any version that doesn't throw the error for you. Okay, I've cloned PKHeX into a separate folder I called PKHeX-git, and used git --reset hard <commit> to obtain older versions of PKHeX. I have discovered that the 18.06.01 version of PKHeX imports sets without throwing errors, but all later stable versions of PKHeX do. 1
BeyondTheHorizon Posted August 29, 2018 Author Posted August 29, 2018 I've done some trial-and-error going through each commit with git --reset hard <commit> and have deduced that commit ce66772 is when the exceptions start appearing. The Level 69 Mewtwo set above imports successfully before that.
BeyondTheHorizon Posted August 30, 2018 Author Posted August 30, 2018 9 hours ago, Sabresite said: Post your files and maybe even make a quick video? Okay, I'll post my save file. Pokémon Yellow Version.sav
Kaphotics Posted August 30, 2018 Posted August 30, 2018 Thanks, fixed in latest commit. https://github.com/kwsch/PKHeX/commit/c6e4c39bc5dd94d40e07fc445e6162ff95074ce8 @theSLAYER Re: Strength, the line has an unsupported character at the end (which is invisible). Trim() won't remove the invalid character . For whatever reason, 0xFEFF snuck its way into that line? 1
BeyondTheHorizon Posted August 30, 2018 Author Posted August 30, 2018 Yes, it seems to work now without throwing exceptions. I tested the Level 69 Mewtwo and Level 5 Mew sets above and both imported successfully. Thank you so much. I wonder why nobody else could reproduce it, though. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now