dcsimg
Results 1 to 8 of 8

Thread: Error at compiling: Not enough memory

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2017
    Posts
    126

    Question 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.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    18,550

    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
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2017
    Posts
    126

    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.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    447

    Re: Error at compiling: Not enough memory

    See if you exceeded these limits.

  5. #5
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,495

    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.



  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2017
    Posts
    126

    Re: Error at compiling: Not enough memory

    Quote Originally Posted by some1uk03 View Post
    Take a look at this Topic here. I had a similar issue a while ago. http://www.vbforums.com/showthread.p...=1#post5279149
    Thanks, I will try that.

  7. #7
    Frenzied Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    1,614

    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>

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jul 2017
    Posts
    126

    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.

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
  •  



Featured


Click Here to Expand Forum to Full Width