473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

OutOfMemory creating a form object

Hi,

My name is Roby Eisenbraun Martins, I am a C++, VB and NET developer.
I am working with a NET 2002 project right now and I am receiving this
uncommon "OutOfMemory" error message when I try to load a form object ( new
frmMain() ).
In debug mode, the "Load" form method is executed but it crashes when it
tries to set a DataTable from a DataSet in a local variable. Actually the
object value in debug mode is equal to nothing.

dvEmailList = New DataView()
dvEmailList.Table = dsCandidate.S_CandidateEmails \\( dataset object )

Sometimes I got an item in the development task list window saying that
the dataset should have set to a higher priority. Is this the solution for my
problem? How can I change this priority flag?

Thank you,
Roby Eisenbraun Martins

//
// Error Trace
//

Operating System: Win32NT
Operating System Version: 5.1.2600.0; Version1.0.2118.20288 Error Message:
Error creating window handle.
Inner Error Message: Object reference not set to an instance of an object.
Extra Info:
Error Type: System.OutOfMemoryException
Error Link:
Error Source: System.Windows.Forms
Inner Error Source: Ecruit
at Ecruit.frmCandidates.frmCandidates_Load(Object sender, EventArgs e) in
C:\ecruittest\frmCandidates.vb:line 8374
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(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& 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(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreate WindowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x,
Int32 y, Int32 width, Int32 height, IntPtr hWndParent, IntPtr hMenu, IntPtr
hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWin dowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x,
Int32 y, Int32 width, Int32 height, IntPtr hWndParent, IntPtr hMenu, IntPtr
hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(Cre ateParams cp)Stack
Trace: at System.Windows.Forms.NativeWindow.CreateHandle(Cre ateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Control.Show()
at Ecruit.clsMDIChildren.add(FormType typeID, Int32 j, Int32 loadID) in
C:\ecruittest\clsMDIChildren.vb:line 236
Oct 19 '05 #1
2 2375
Roby,

I don't know if this is the reason of your crash however this is in my
opinon a very unconventional method to set the get an extra defaultview for
a datatable.
dvEmailList = New DataView()
dvEmailList.Table = dsCandidate.S_CandidateEmails \\( dataset
object )

More common is in VBNet
dim dvEmailList as New DataView(dvEmailList.Table)
or C#
DataView dvEmailList = new DataView(dvEmailList.Table);

Maybe you can try one of those.

Cor
Oct 19 '05 #2
Hi Cor,

Thank you for your help.
Actually the problem is the "dsCandidate.S_CandidateEmails" object. It is
= nothing and trying to use it in any sutiation will cause the crash.
And what about the priority thing? Maybe I have to force it to load ?

Thank you again,
Roby Eisenbraun Martins

"Cor Ligthert [MVP]" wrote:
Roby,

I don't know if this is the reason of your crash however this is in my
opinon a very unconventional method to set the get an extra defaultview for
a datatable.
dvEmailList = New DataView()
dvEmailList.Table = dsCandidate.S_CandidateEmails \\( dataset
object )

More common is in VBNet
dim dvEmailList as New DataView(dvEmailList.Table)
or C#
DataView dvEmailList = new DataView(dvEmailList.Table);

Maybe you can try one of those.

Cor

Oct 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ccwork | last post by:
Hi, I get an interesting question. I program an MDI that each JInternalFrame will show an image of 1700x1500. I limit that 2 JInteralFrames (and thus 2 images) can be opened at most. When users...
3
by: Mike Schilling | last post by:
Instances of SystemOutOfMemoryException do not contain a stack trace. Easy test to verify this: class OOM { public static void Main() { try { Object arr = new Object; } catch...
0
by: Dave | last post by:
Hi, I'm creating a process in C# that will parse a very large XML file using the XMLTextReader. This process uses several custom classes that handle all the data access. However, well into...
1
by: Ricky Chan | last post by:
In the production environment, it always occurs and the worker process did not recycle automatically. Therefore, it make the system service break to client. In development environment, we write...
5
by: LP | last post by:
Hello, We running VB.NET application which gets massive amounts of data from SQL Server, loads data into DataTables, then re-arranges data into tabular structure and outputs it to a flat file....
2
by: Roby Eisenbraun Martins | last post by:
Hi, My name is Roby Eisenbraun Martins, I am a C++, VB and NET developer. I am working with a NET 2002 project right now and I am receiving this uncommon "OutOfMemory" error message when I try...
6
by: Lenny Wintfeld | last post by:
Hi I'm attempting additions/changes to a Java program that (among other things) uses XSLT to transform a large (96 Mb) XML file. It runs fine on small XML files but generates OutOfMemory...
0
by: Neil Stephens | last post by:
We have an ASP.NET (VB) process that is creating a stringbuilder object which is failing under a particular set of circumstances. It runs fine on a few dozen servers except for one where an OOM...
2
by: elaine | last post by:
I'm working on a .net web application. The architect of this web application is quite different than other web applications i worked before. Since we use a set of tools to generate most of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.