libertyernie / brawltools

BrawlBox and BrawlLib
http://forums.kc-mm.com/index.php?topic=67847.0
142 stars 31 forks source link

Importing the Object in the Model #179

Open P0W3 opened 6 years ago

P0W3 commented 6 years ago

I was replacing the object with another object in the model, but Brawlbox had the unexpected error.

Object reference not set to an instance of an object. at BrawlLib.SSBB.ResourceNodes.MDL0ObjectNode.OnInitialize() at BrawlLib.SSBB.ResourceNodes.ResourceNode.ReplaceRaw(FileMap map) at BrawlLib.SSBB.ResourceNodes.ResourceNode.Replace(String fileName, FileMapProtect prot, FileOptions options) at BrawlLib.SSBB.ResourceNodes.ResourceNode.Replace(String fileName) at BrawlBox.NodeWrappers.GenericWrapper.OnReplace(String inStream, Int32 filterIndex) at BrawlBox.NodeWrappers.GenericWrapper.Replace() at BrawlBox.NodeWrappers.GenericWrapper.ReplaceAction(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

I use BrawlBox (v0.78) (Hotfix 1) in Windows 10 Home Insider Preview (x64).

Ebola16 commented 4 years ago

I probably came across the same issue so I'll post my steps to reproduce the problem here using these files: Palutena Brawlbox Error.zip

  1. In Brawlbox v0.78, open FitPalutena01.pac and look at FitPalutena00.mdl0
  2. Import Existing object Gates.mdl0 with the following settings: Capture
  3. Observe: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Collections.Generic.List1.Enumerator.MoveNext() at System.Windows.Forms.ObjectImporter.btnOkay_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.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)

This issue does not occur in Brawlbox v0.68b