|
-
Jun 5th, 2019, 04:33 PM
#1
Thread Starter
Fanatic Member
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!
Last edited by tmighty2; Jun 5th, 2019 at 04:39 PM.
-
Jun 5th, 2019, 04:40 PM
#2
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
-
Jun 5th, 2019, 04:56 PM
#3
Thread Starter
Fanatic Member
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.
Last edited by tmighty2; Jun 5th, 2019 at 04:59 PM.
-
Jun 5th, 2019, 05:09 PM
#4
Fanatic Member
Re: Error at compiling: Not enough memory
See if you exceeded these limits.
-
Jun 5th, 2019, 06:14 PM
#5
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
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Jun 5th, 2019, 06:17 PM
#6
Thread Starter
Fanatic Member
Re: Error at compiling: Not enough memory
 Originally Posted by some1uk03
Thanks, I will try that.
-
Jun 6th, 2019, 06:42 AM
#7
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>
-
Jun 6th, 2019, 08:30 AM
#8
Thread Starter
Fanatic Member
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.
-
Nov 21st, 2022, 03:00 AM
#9
Member
Re: Error at compiling: Not enough memory
-
Nov 21st, 2022, 06:03 AM
#10
Frenzied Member
Re: Error at compiling: Not enough memory
 Originally Posted by voxy
What was the problem?
My question too (or can we see the code for that form?)
(old post though!)
Thanks all  !
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|