Error at compiling: Not enough memory
Hello!
I have a VB6 project with really many modules and classes and forms.
Some days ago I got a "code too long" (or something like that) error because the compiled code of a module would exceed 64 kb.
That was perfectly understandable.
But now I got a different error very often:
When I type a line, the VB6 IDE tells me "Error at compiling: Not enough memory"
Please not that this is not a runtime error, but a message from the VB6 IDE.
When this happens, I can not type anything else anymore. I need to close VB6 and restart it.
Then I actually need to remove some code in order to be able to type new code. Given the fact that I barely have an redudant code, that's quite a challenge.
Can anybody confirm that is a "valid" error that occurs when a project is really huge, or could there be a different error underneath?
Thank you!
Re: Error at compiling: Not enough memory
If this happens when all forms are closed, it is probably a valid VB-related error due to sizes of your code pages (modules, forms, classes, etc). There are limitations.
Reason why I mentioned closing forms is that an open form with controls on it uses memory to display those controls and whatever other code may be running behind it, as in graphical controls.
Another possibility is memory leaks. Though possible, but since you mentioned a very large project, I'd focus first on the limits imposed by VB and address those if they apply
Re: Error at compiling: Not enough memory
Yes, all forms are closed when the error occurs.
I remove more code than I add, so just removing code isn't the solution unfortunately.
For example, I removed like 100 lines of code, then restarted VB6 and added 5 lines, and the error occured again, so just removing code doesn't help.
Re: Error at compiling: Not enough memory
See if you exceeded these limits.
Re: Error at compiling: Not enough memory
Take a look at this Topic here. I had a similar issue a while ago. http://www.vbforums.com/showthread.p...=1#post5279149
Re: Error at compiling: Not enough memory
Quote:
Originally Posted by
some1uk03
Thanks, I will try that.
Re: Error at compiling: Not enough memory
Try switching off Binary Compatibility to Project Compatibility for instance. This will reduce memory usage and increase compile speed in IDE.
I'm unable to code in IDE w/ Binary Compatibility set on most large projects here.
cheers,
</wqw>
Re: Error at compiling: Not enough memory
Thank you for the hint.
I have been able to narrow the problem down to a single form. When I remove this form, the error is gone. I will report back what the problem was.
Re: Error at compiling: Not enough memory
Re: Error at compiling: Not enough memory
Quote:
Originally Posted by
voxy
What was the problem?
My question too (or can we see the code for that form?)
(old post though!)