VB.Net Form Crashes

PTNL

Supreme [H]ardness
Joined
Jan 2, 2005
Messages
4,199
A co-worker came to me with this problem, and I am completely stumped. The scenario is this:

- Create a brand new VB.Net Windows Application
- Drag a control (ex: ComboBox) onto the form
- Run the application
- Watch it crash and burn (figuratively speaking, of course)

An "ArithmeticException" error is thrown upon running the application locally. What's odd is that the crash happens in the Visual Studio managed code generation area after the control is dragged onto the form. I cannot reproduce this on my machine (nor am I interested in mucking up my Visual Studio settings to cause this error).

Below is the auto-generated code, and also the text of the message box with the error details:

Code:
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
	'NOTE: The following procedure is required by the Windows Form Designer
	'It can be modified using the Windows Form Designer. 
	'Do not modify it using the code editor.
	Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
	Me.ComboBox1 = New System.Windows.Forms.ComboBox
	Me.SuspendLayout()
	'
	'ComboBox1
	'
	Me.ComboBox1.Location = New System.Drawing.Point(56, 144)
	Me.ComboBox1.Name = "ComboBox1"
	Me.ComboBox1.Size = New System.Drawing.Size(88, 21)
	Me.ComboBox1.TabIndex = 0
	Me.ComboBox1.Text = "ComboBox1"
	'
	'Form1
	'
	Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
	Me.ClientSize = New System.Drawing.Size(292, 273)
	Me.Controls.Add(Me.ComboBox1)
	Me.Name = "Form1"
	Me.Text = "Form1"
	Me.ResumeLayout(False)
    End Sub

#End Region
MessageBox text:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll

Additional information: Overflow or underflow in the arithmetic operation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Which line throws the exception? (turn on first chance exception traping in the debug menu, and if required, remove the debugger attribute or disable "Just my code" from tools->options->debugger)

I assume it's the point or size constructor, but knowing which one might be of use.

Which version of the framework? 1.0, 1.1, 2.0, or some prerelease build? Or, which version of VS: 2002, 2003, or 2005?
Does the issue occur no matter where the button is dropped to?
Does it occur when you run outside the debugger (Ctrl+F5) and within the debugger (F5)?
Does anyone else have admin access to the machine? Just wondering if a file could have been altered.
 
Back
Top