Microsoft .NET Framework error


G

Guest

Hi there,

I have a problem. I am running a program that used to work when
suddenly...it stop working.
I got this message:

"Index was outside the bounds of the array"

Is there anyone who knows how I can solve this problem?

Thanks
 
Ad

Advertisements

M

Morten Wennevik

Hi Andrea,

Have you made any changes at all to the program?
Does it now crash where previously it ran fine?
Where/when exactly does it crash, when you load the program?

The error is simple enough, something is reading from an array at an index outside the bounds of that array. Typically this can be a regular array or list in the code or collection from Controls like ListBox/ListView in the user interface.

It would help if you can provide as much detail as you can.
 
G

Guest

Andrew,

You check the array.count before using the index.
Tip. Indexes usually start with zero and go to the array.count -1.

Good Luck
DWS
 
G

Guest

Hi,

Thanks for the reply.

Here some answers:
The error has appeared after I updated MS Windows - I haven't changed the
program at all as far as I know.

A more detailed explainations of the error is:

I'm getting a Microsoft .NET Framework error :

"Index was outside the bounds of the array"

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 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 System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Does the error look like it comes from the VB interface ? Do I need to try
reinstalling any VB parts ?

Does this make any sense to you?

Thanks for help,

Andrea
 
M

Morten Wennevik

Well, it looks like the error happens inside the Load event.

If you upgraded to BizTalk Server 2004 SP1, see this page

http://support.microsoft.com/?scid=kb;en-us;903874&spid=1444&sid=global

If not, then I'm afraid I'm out of ideas as this was the only relevant topic I could find. If so, try posting a new thread with as much detail about the error as you can like Windows version, what kind of application, if you wrote it yourself/have access to the source code.

If you have access to the source code/wrote the application yourself, try disabling some controls. It may be related to a control that is databound or otherwise filled with information at startup, and for some reason or other it isn't ready to be used.

Good Luck!
 
Ad

Advertisements

Joined
Aug 7, 2013
Messages
1
Reaction score
0
any help please:

got this error when running an application on windosw server 2008.

the error message occured on microsoft.net Framework.

error message: index was outside the bounds of the array

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 SAPInvoices.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\GBENGA\Documents\Projects\Sweet Sensation\POS\PBM-4000 MACHINE\InvoiceSAP\SAPInvoices\Form1.vb:line 27
at System.EventHandler.Invoke(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.Form.WmShowWindow(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: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
SAPInvoices
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Visor2SAP-WORKING-FINAL/SAPInvoices.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 11.0.50131.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17379 built by: FXBETAREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top