By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,742 Members | 1,044 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,742 IT Pros & Developers. It's quick & easy.

OutOfMemory creating a form object

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.