VB6 crashing & "Out of Memory" compile errors

TakedownCA

Senior member
Dec 18, 2000
305
0
0
I've got an app that has two main formst with ~30 controls on each, mainly just buttons and textboxes with a couple listviews thrown in. Half the time when I run the program in the IDE it runs fine. The other half I get "Compile Error - Out of Memory" and the VB6 IDE freezes until I end process. I've got 2GB of memory, so I don't think memory is the problem. Also when I run the compiled program (and it compiles fine) I always get a "The instruction at 0x77fcc887 referenced memory at 0x0010a08d. The memory could not be read". If anyone has any ideas, I'd be very thankful. I spent a week developing this for work, and I doubt the boss would be too happy if it was time wasted. Thanks again for any help provided.
 

KB

Diamond Member
Nov 8, 1999
5,399
386
126
30 controls on a form isn't alot so thats not it. Are you using any special form controls from third party vendors? If so remove them. Create a new form and copy the controls to that the new form and see if that form is being affected. What looping code are you using in the form? Are you looping through something to fill in the List controls? If so check your looping code to make sure it isn't looping too much.
 

TakedownCA

Senior member
Dec 18, 2000
305
0
0
Nope, no third party anything. Closest thing I have is a wrapper for some registry manipulation functions. I have 4 control arrays of 5 instances each that I loop through to populate. But from what I've seen it doesn't do anything odd there. Even when the iteration parameters were off (forgot whether using base 0 or 1) it just gave me the usual corrective error. No crashing of the IDE.
 

TakedownCA

Senior member
Dec 18, 2000
305
0
0
Yes, I use loops to populate the listview controls. But again, nothing special there. If there was an actual programmatic error I would think it would show up every time I ran the program, but that's not the case. I've been using VB for 2 years now (I know, not that long) and have never seen anything this odd.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
it sounds like some kind of memory leak. i would either look into a tool to help track down memory leaks or isolate the various components you're using.