Results 1 to 23 of 23

Thread: Out of Memory error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Out of Memory error

    I am getting an "Out of Memory" error when I try to write the exe file for my program. The total size of the program with all the forms, classes, etc is about 6MB. I tried moving the program to a bigger computer that has over 204GB of free space. Does anyone know what can be done about this error?

  2. #2
    Hyperactive Member
    Join Date
    Aug 2004
    Location
    Itasca, IL USA
    Posts
    279

    Re: Out of Memory error

    While you have your project open, try closing all the forms, modules and classes first. Then try making the executable. I think you may not have enough RAM.

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Out of Memory error

    Are you using Crystal Reports in your app?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Re: Out of Memory error

    I have tried closing everything and still get the same error. It is not using Crystal reports.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Out of Memory error

    Do you have VB6 on another machine that you could try compiling it on?

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Re: Out of Memory error

    I have tried two different machines and get the same error.

  7. #7
    Hyperactive Member
    Join Date
    Aug 2004
    Location
    Itasca, IL USA
    Posts
    279

    Re: Out of Memory error

    Have you every been able to make a successfull exe file?

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Re: Out of Memory error

    With smaller programs I can write EXE files

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Out of Memory error

    Sounds as if the linker is running out of memory. That usually indicates some very deep nesting - deeper than the linker can handle in the amount of memory available. Make your program less complex. (Not necessarily smaller - I've compliled programs that ran over a million lines of code - just less deeply nested.)
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Out of Memory error

    Could you zip and upload the project?

  11. #11
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: Out of Memory error

    Firstly it isnt hard disk space its your RAM space in memory that is out so a larger hard disk wouldnt help.

    Secondly check your array sizes. Sometimes you may over compensate for fixed size arrays and cause an out of memory issue.

    How much RAM does your system have? Close down any extra programs when compiling and also close forms and modules in your project. If you close down your antivirus remember to restart it after compiling =)
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  12. #12
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Out of Memory error

    If any Segment of your program goes beyond 64K you will get this error. So having a large fixed array could cause this problem as BodwadUK states.

  13. #13
    Hyperactive Member BillGeek's Avatar
    Join Date
    Jun 2006
    Location
    Canada
    Posts
    440

    Re: Out of Memory error

    I had exactly the same problem on my machine. Compiled an EXE that's about 24MB. Are you running Windows 98? I was, had 512MB Ram, but got the error. Formatted the machine, loaded XP, tried the compile... Bob's your uncle! It worked!

  14. #14
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: Out of Memory error

    If nothing helps, you can try the compilation options on the Project -> Properties dialog box on the compile tab.

    Try if you can create an exe if you check the 'no optimization' option.

    If this doesn't work, try compiling to p-code.

    I know these choices are not really preferred, but if it is the only thing that works, you don't have much choice.
    Frans

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Re: Out of Memory error

    I am running windows XP with 1GB of RAM. How much RAM should it take?

  16. #16
    Hyperactive Member BillGeek's Avatar
    Join Date
    Jun 2006
    Location
    Canada
    Posts
    440

    Re: Out of Memory error

    Sheesh... No idea. Searched for it on MSDN's site. Found the following link. (Not very useful, I might tell you)
    http://msdn2.microsoft.com/en-us/s93kfbkz.aspx

  17. #17
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: Out of Memory error

    Is it a major work app or a hobby app? Can you send me the project so I can take a look?
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  18. #18
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Out of Memory error

    vlntine82,

    Does anyone read anymore... You have several post you never read or answered. How do you expect to find the problem or solution by ignoring the possible solutions????

  19. #19
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Out of Memory error

    Quote Originally Posted by BillGeek
    Sheesh... No idea. Searched for it on MSDN's site. Found the following link. (Not very useful, I might tell you)
    http://msdn2.microsoft.com/en-us/s93kfbkz.aspx
    I guess the reason you didn't bother to rate the page is that the lowest you can give it is PLUS 1.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  20. #20

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    90

    Re: Out of Memory error

    I have added another half gig and tried closing unneeded programs. Do you mean that the individual forms or classes can't be more than 64K? The program uses very few arrays and they are all small. I have tried uploading the program but it keeps timing out.

  21. #21
    Addicted Member
    Join Date
    Nov 2005
    Posts
    145

    Re: Out of Memory error

    I got the same problem

    when i open the same mdi child form (with have alot of control on it, xpsuite control adn codejock extreme suite among there) for more than 10 to 15 it will came up with out of memory error. When i remove all xpsuite control on form it will last for 40 to 50 open form. When i remove codejock extreme suite and xpsuite adn replace the control from native vb it last 100 or more and not yet came up with out of memory. So what you guys stand fro my problem? should i limit the possibilities open form? should i stick with vb native control? or what?

    Thanks guys...

  22. #22
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Out of Memory error

    I give up...

  23. #23
    New Member
    Join Date
    Jun 2006
    Location
    Bethlehem, PA
    Posts
    1

    Re: Out of Memory error

    You have a corrupt file in your application directory. It will be a little difficult to find if you do not have a backup from when you could compile and write the .exe. This problem is not machine dependent as well. Copying the application directory to another machine should give the same out of memory error. You need to find the corrupt file (usually a .frm or .ctl ...... ) and replace it. A restore point may help. Be sure to back up the dir. so you can ref. any changes you might have made so you can edit them in...... Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width