Page 1 of 1

Are Tank models broken in 221?

Posted: Sat Jun 04, 2016 1:43 pm
by Ormand
I am now 99% convinced that the answer to this question is YES.

As I have reported, I have been struggling with creating models for the past two weeks, with rather sporadic and unpredictable success. And, I have to say that in principle, creating models is not that difficult (probably the hardest part is the events, and functiondescript, which Vic written and you can use).

The problem that I have experienced is that after you edit a scenario for a single model, when I start a random game and try to create the model, the game crashes with an error message that a subscript is out of bounds. This happens to me if I create a single model, say Light Tanks in an attempt to convert Anewdawn to Anewdawn2.

This got me to thinking and I decided to "time-travel". I uninstalled ATG, reinstalled based on v200c, and upgraded to v220beta and later v220c. I then started to convert Anewdawn to Anewdawn2 starting with Light Tanks. And it worked. That is there was no error in the creation of the model after starting a random game. I could create other models, and no crashes occurred when I added new models.

I then continued to upgrade to 221d, at which point the problem reappeared. This happens both when I start over and generate a new scenario file or use one of the scenario files I created previously with v200.

This leads me to conclude that something has happened with models between v200 and v221. Although, strangely, Anewdawn2 continues to work. But, I was also able to get models to work with v221, but only when I created all the models ranging from Light Tank to Assault Gun. In addition, I found sometimes, this worked as well: create a model, and it would crash. Follow this up with a new SFT and assign it to a new item, and the model would work.

Lastly, even in v200 I was never able to get model upgrades (when researching I -> II) to work as they do in Anewdawn2. I set the research levels as they are set in Anewdawn2, and it never worked. I basically did the following. I created a Light Tank model by copying the Std. Light Tank SFT, set all the boxes on the Models 1 tab. For research, I first set SMG to zero (since by default all SFTs have it set to 1), then set Light Tank research to zero. This now sets the research button to Light Tanks. Then go to Light Tank II, III, and IV, and set the research level to 1,2,3, respectively. Since the SFT is a copy, its upgrade still points to the Light Tank II SFT. When, I start a random game, models created this way do not show that they can be upgraded after I research Light Tank II.


RE: Are Tank models broken in 221?

Posted: Sun Jun 05, 2016 6:37 am
by Vic
Hi Ormand,

Could you post the full error text (details button & then copy and paste)?

Also if you like I can take a look at your scenario to see why it crashes when you create a model. Please send it to vic@vrdesigns.net

best wishes,
Vic

RE: Are Tank models broken in 221?

Posted: Sun Jun 05, 2016 5:10 pm
by Ormand
Vic,
Thanks for looking into this.

Here's the error message in total:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WindowsApplication1.DataClass.AddSFType()
at WindowsApplication1.ProcessingClass.MakeNewSFTypeModel(Int32 sftypenr)
at WindowsApplication1.SFDesignWindowClass.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.ContainerControl.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)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8689 (QFE.050727-8600)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assembly Version: 1.0.5987.14580
Win32 Version: 1.0.5987.14580
CodeBase: file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/AdvancedTacticsGold.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8690 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8681 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
ICSharpCode.SharpZipLib
Assembly Version: 0.84.0.0
Win32 Version: 0.84.0.0
CodeBase: file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/ICSharpCode.SharpZipLib.DLL
----------------------------------------
irrKlang.NET
Assembly Version: 1.3.0.0
Win32 Version: 1, 1, 0, 0
CodeBase: file:///C:/Matrix%20Games/Advanced%20Tactics%20Gold/irrKlang.NET.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

RE: Are Tank models broken in 221?

Posted: Mon Jun 06, 2016 8:23 am
by Vic
Hi Ormand,

Thanks for sharing these files and documenting exactly what was causing problems.

There was a small glitch that caused the crash if there where more itemTypes than SfTypes .

And there was a button missing in the editor allowing you to set a SFType Model to UPGRADEABLE.

Making a new ATG build and uploading it asap. Its version 2.21q.

Best wishes,

Vic

RE: Are Tank models broken in 221?

Posted: Mon Jun 06, 2016 1:22 pm
by Ormand
Hi Vic,

Great. Thanks a lot. I have to say, it was making me crazy trying to understand why it would CTD and then sometimes work. Thanks for still supporting this great game.