Solved

Hanging on frm.show when the business object contains a collection w/ > 5000 objects

Posted on 2004-08-05
3
194 Views
Last Modified: 2010-04-23
The following roughly describes the sequence of events:

- mdi menu click event asks the business tier to populate an object

- parent business object calls the database and populates itself.  This includes a collection of 5000 child objects.  While debugging I can see that this successfully completes

- control returns to the MDI form where it Dims a windows form

- the windows form is successfully given a reference to the business object

- frm.Show is called

Execution in the debugger runs as expected until frm.show is called.  At this point execution hangs, CPU usage redlines, the form never appears, and I eventually stop the debugging (or, if I am running without the debugger, I must kill the program).  I can successfully load the form when I have only 1000 child objects.  Why would 5000 cause this failure... out-of-memory comes to mind, but why would it not fail while the 5000 objects are being created?  Furthermore, 5000 hardly feels like a "scary" number!

Thank you in advance for pointing me into the right direction to uncover my error!
0
Comment
Question by:bmccleskey
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 250 total points
ID: 11731932
what is the form doing on its load with the collection ?
0
 

Author Comment

by:bmccleskey
ID: 11732333
You pointed me into the right direction, and it was a silly mistake on my part.  I had assumed that execution was not making it into the form load event, so I didn't have a breakpoint set within the "being created" form.  Once I set the breakpoint and stepped into the form_load event, the bug in my looping logic was easy to spot.

A million thanks.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11732336
glad you got it.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now