PDA

Click to See Complete Forum and Search --> : Out of Memory


christophe
Nov 2nd, 1999, 06:58 PM
Hi,

I've got about 12 forms in my project. Whenever I open my project in VB as it loads I get an 'Out of Memory' error. Then it continues to load, when I click 'OK'. Then when I run my project in design time, it works until I click a command button that brings up this one form in particular - I then get the 'Out of Memory' error.

I only started getting this error yesterday. Could someone tell me how to solve this problem? It's ruining my project. The form in which the error ocurrs only started happening when I added two text box control arrays, each with 10 elements. Each element has about 4kb of text in the text property, but I've heard of Apps with much more material than this and they work fine.

Also, whenever I try to compile my project, VB crashes. Any help at all would be greatly appreciated!

I have a 450 PIII with 64 mgs RAM, and Windows 98.

HeSaidJoe
Nov 2nd, 1999, 09:18 PM
Check the form to see it it has a loop in it's code....or if you have vriables declared as integers when they should be doubles.

jimdalby
Nov 2nd, 1999, 09:45 PM
ALso, make sure u havent got any never ending loops, cos they use up memory summat awful. And does your prog save anything, and have you got hard drive space left?
No hard drive space would probably explain the crashing when compiling 2.

------------------
jimmy
ICQ:35813919
mail:jim@rdalby.f9.co.uk

christophe
Nov 3rd, 1999, 12:37 AM
No, I don't have any loops, vriables declared as integers, and I've got 126 mb free space. What's more, Vb only let's me see the code of the form. When I want to look at the object, to see what happens if I change my textboxes, I can't even get that far - I get that 'Out of Memory error'. What the ****? Is this normal? Any help or tips would be very helpful!

MartinLiss
Nov 3rd, 1999, 03:29 AM
What version of VB are you running? I can only speak for versions 3, 4 and 5 and it is definately not normal for what you describe to have happen. I have some very large forms in my project (one of which scrolls a picturebox that has a height of 32000 and is the container object for about 200 objects) and I have no such problem. If you are using VB6 then perhaps it is some bug that you should report to the Mother Ship. One thing you could try is to create a new project that contains your problem form and see what happens when that project loads.

------------------
Marty

prestodsi
Nov 3rd, 1999, 03:45 AM
I agree with the comemnt concerning VB version. In the VB6 readme file there are some concerns about "Out-of-Memory", a bug which seems to be resolved with a patch released by MS. I have ordered mine but it had not arrived yet.

If you are using VB6, please inform whether you have the Learning or other editions.

------------------
Paul Stermann
DSI-Houston

christophe
Nov 3rd, 1999, 06:29 AM
I have version VB5, Enterprise Edition. MartinLiss, I tried doing what you suggested many times, but I still keep getting that 'Out of Memory' error whenever I go near the form.

E.G: I create a new project. I add the form in question. It adds it to the projeect but when I run it I get the error. And whenever I want to view the object (as opposed to the code), it doesn't let me - 'cause I get the error. So I can't edit it.

Has anybody ever experienced this? I have a form, 10 labels, 2 control arrays with text boxes - each with ten elements. And about 4/5 kb of text in each box. Any help or suggestions would be much appreciated.

SteveS
Nov 3rd, 1999, 03:49 PM
I had a similar problem before, in VB5 Professional Edition.

What I had to do was to Create a new project and import all the forms, from the old project except the problem one.

Then I rebuilt the form from scratch and pasted in the code from the old form.

It worked fine after that, I have no idea why, but I worked.

Steve.

Marc G
Nov 5th, 1999, 12:38 AM
Hi Christophe,
I have had the same problem. I am using Windows 98 and VB 5 Professional on a Pentium Pro 200 with 64 MB of RAM. I have a project with a very large number of controls (389). There is a limit of 256 controls on any form so this is probably my problem. I have heard there is a 64K limit on any procedure of module and passing this returns an "out of memory" error. If you know of a way to check for this I would like to know. Good luck