Page 1 of 1

Weird exception error

Posted: Fri Sep 25, 2020 12:51 am
by gossard267
So, played many hours of this game, never seen this. I am using a custom scenario file with my own SFTypes. They all seem to be working so far, but now when I click my Supreme HQ and choose the R-OUT (or R-IN), I get the following error:

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WindowsApplication1.PlayExtraWindowClass.dostuff()
at WindowsApplication1.PlayExtraWindowClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
at WindowsApplication1.PlayScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
at WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(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.Form.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)


Any idea why this is happening? I tend to think (without any evidence) that this has something to do with my custom scenario/units somehow (maybe HQ R-out or R-out screen somehow can't display them), but it's weird because the units themselves seem to function fine! I can manually transfer them out of HQ. Auto-reinforce based on TOE works fine. The units with my own SFTypes move normally.

Any help much appreciated!

RE: Weird exception error

Posted: Fri Sep 25, 2020 1:40 am
by gossard267
Confirmed it seems to have to do with my custom scenario. When I load new map with standard anewdawn3.at2, problem is gone. When I use my own, problem exists. Weird in that I haven't done anything advanced at all...

RE: Weird exception error

Posted: Fri Sep 25, 2020 5:57 am
by ernieschwitz
Have you set the TO&E rulevars up correctly?

RE: Weird exception error

Posted: Fri Sep 25, 2020 6:00 am
by ernieschwitz
Also, feel free to send me a link to where I can download it to look at it. A PM on this forum should be enough :) If you cannot put it up some place (like dropbox), then I can, I guess give you my email address, in a PM too.

RE: Weird exception error

Posted: Fri Sep 25, 2020 2:01 pm
by gossard267
Appreciate the response! Not sure on TO&E rulevars. I don't think I changed them. Does 331 Unique Units need to be on? I did share a link to the file on dropbox - many thanks for taking a look. I was so excited to try all my new units (mountain troops, Panthers, T-34s, etc.), but this issue suddenly put a stop to it!

RE: Weird exception error

Posted: Fri Sep 25, 2020 5:09 pm
by ernieschwitz
I know that feeling. When a bug hits, you just want it to go away, to squash it. The imperfection is not satisfying.

I did have a look. I will send you some comments in a PM, although I haven't been able to find the bug. I could repeat it however :P