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!