Page 1 of 1

Crash/JIT Debugging

Posted: Sat Dec 01, 2007 3:12 pm
by jakobrogert
Hi!

I'm getting an unhandled exception in my masterfile during Unit editing, or more specifically when I click the Combat Details for the very first Unit. I've tried several solutions, such as making more Units and checking sfgroups for strange values etc.
Below is a screenshot and a debug message.

I am editing a stripped copy of the generic masterfile as a pt2-document and this thing with editing combat details has worked before on the same machine. I am using the 1.02b and XP SP2.
Oh. And the error says "Argument must be greater than or equal to Zero", but since I don't know which function is bothered by getting a bad argument data type or number I'm at a loss here.

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

************** Exception Text **************
System.ArgumentException: Argument 'Number' must be greater or equal to zero.
at Microsoft.VisualBasic.Strings.Space(Int32 Number)
at WindowsApplication1.SFTypeWindowClass.tabsheet3()
at WindowsApplication1.SFTypeWindowClass.Tabsheet()
at WindowsApplication1.SFTypeWindowClass.MakeSFtypeTypeItemGUI()
at WindowsApplication1.SFTypeWindowClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
at WindowsApplication1.MainEditScreenClass.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 WindowsApplication1.ImmoveableForm.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.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assembly Version: 1.0.2872.17755
Win32 Version: 1.0.2872.17755
CodeBase: file:///F:/games/Advanced%20Tactics/bin/AdvancedTactics.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
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.832 (QFE.050727-8300)
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.832 (QFE.050727-8300)
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.42 (RTM.050727-4200)
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:///F:/games/Advanced%20Tactics/bin/ICSharpCode.SharpZipLib.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.




Image

RE: Crash/JIT Debugging

Posted: Sat Dec 01, 2007 4:35 pm
by Vic
Will be fixed in v1.1. thanks for reporting.
&nbsp;
You should be able to work around it by keeping the length of your SFType&nbsp;GROUP names ( in general settings tab) shorter then 25 characters.
&nbsp;
let me know it that works.
&nbsp;
kind regards,
vic
&nbsp;

RE: Crash/JIT Debugging

Posted: Sat Dec 01, 2007 5:00 pm
by jakobrogert
Thank you lots! That worked!

RE: Crash/JIT Debugging

Posted: Sat Dec 01, 2007 9:29 pm
by PeterLorre86
Hello, i just bought the game, and i get a similar error when clicking play from the menu.

Any help would be appreciated.

First i get this
VVVVV

************** Exception Text **************
System.ArgumentException: Font 'Arial' does not support style 'Regular'.
at System.Drawing.Font.CreateNativeFont()
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
at WindowsApplication1.GameClass..ctor()
at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
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.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at WindowsApplication1.ImmoveableForm.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.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assembly Version: 1.0.2872.17755
Win32 Version: 1.0.2872.17755
CodeBase: file:///G:/Matrix%20Games/Advanced%20Tactics/bin/AdvancedTactics.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
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.1433 (REDBITS.050727-1400)
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.1433 (REDBITS.050727-1400)
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.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------

************** JIT Debugging **************


After clicking continue i get this-
VVVVVVVVVVVVVVVVVVVVVVVV


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
  at WindowsApplication1.Form1.Form1_MouseMove(Object sender, MouseEventArgs e)
  at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
  at System.Windows.Forms.Control.WmMouseMove(Message& m)
  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 WindowsApplication1.ImmoveableForm.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.832 (QFE.050727-8300)
   CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
   Assembly Version: 1.0.2872.17755
   Win32 Version: 1.0.2872.17755
   CodeBase: file:///G:/Matrix%20Games/Advanced%20Tactics/bin/AdvancedTactics.exe
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version: 2.0.50727.832 (QFE.050727-8300)
   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.832 (QFE.050727-8300)
   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.832 (QFE.050727-8300)
   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.42 (RTM.050727-4200)
   CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------




RE: Crash/JIT Debugging

Posted: Sun Dec 02, 2007 10:04 am
by Vic
@petelorre,
&nbsp;
actually that is very different bug.
and very unique!
&nbsp;
do you have your fonts properly installed?
the game cannot find Arial (regular)...
&nbsp;
could you give me your Operating System and System specs?
&nbsp;
kind regards,
vic

RE: Crash/JIT Debugging

Posted: Sun Dec 02, 2007 4:35 pm
by rickier65
ORIGINAL: Vic

@petelorre,

actually that is very different bug.
and very unique!

do you have your fonts properly installed?
the game cannot find Arial (regular)...

could you give me your Operating System and System specs?

kind regards,
vic

Peter, (and Vic)

This bug has cropped up on a couple of two or three games over the last year. It hasn't happened to me, but it has to others. Unfortunately, I can't recall the fix. Jaamian or Erik might recall, seems he does some troubleshooting for another game.

a dxdiag might help - see the trhead on how to get dxdiag.

Rick

RE: Crash/JIT Debugging

Posted: Sun Dec 02, 2007 5:15 pm
by PeterLorre86
Hello, and thanks for both your replies.

I have no idea if my fonts are installed properly, how do i check? I see alot of fonts named arial-something in the font folder, including one called 'arial' which i would assume is the original/regular version. Would it be possible to send me a copy of the correct font, and i could try putting that in my fonts directory and see what that does.

Operating system is XP, service pack 2. I have included the dxdiag results for system specs.

The basics are

3.0 ghz pentium 4 processor
radeon x850 pro videocard
3 gigs ram

RE: Crash/JIT Debugging

Posted: Sun Dec 02, 2007 5:28 pm
by Vic
does this thread make any sense:
&nbsp;
http://www.matrixgames.com/forums/tm.asp?m=1600016&mpage=1&key=System%2EDrawing%2EFont%2ECreateNativeFont&#1600016
&nbsp;
also check this MS article about how to re-install fonts:
http://www.styopkin.com/articles/install_fonts.html
&nbsp;
kind regards,
Vic

RE: Crash/JIT Debugging

Posted: Sun Dec 02, 2007 5:35 pm
by PeterLorre86
That thread was my exact problem, and the re-installing fonts worked perfectly!

Thanks alot!