Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-05
3
Medium Priority
?
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 750 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

618 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