"Out of memory" when making EXE 
Author Message
 "Out of memory" when making EXE

Hey groupers,

I was compiling a project to an EXE, when I got an "Out of Memory"
error. It went through the compiling phase, and about 1/3 of the way
through "making EXE" I got this error. There is no further explanation
in the error message.

I tried compiling on 3 different computers. Any clues as to what might
be wrong. I'm including some of the things that might be problems.

This project was written by young {*filter*}agers (I'm a counselor at a
computer camp). It has about a dozen forms, with quite a few bitmaps. It
subclasses a command button at one point to trap keystrokes, and also
ejects the CD rom drive at another. These are the only two API usages.

All the files (including the bitmaps) come to around 30 mb.
I tried setting the swapfile size to around 1 gig, to no avail. I'm
starting to think it's either an error in code, or a VB bug.

Anyone have any ideas?

-Joachim



Thu, 15 Jan 2004 00:27:31 GMT  
 "Out of memory" when making EXE

Quote:

> Hey groupers,

> I was compiling a project to an EXE, when I got an "Out of Memory"
> error. It went through the compiling phase, and about 1/3 of the way
> through "making EXE" I got this error. There is no further explanation
> in the error message.

> I tried compiling on 3 different computers. Any clues as to what might
> be wrong. I'm including some of the things that might be problems.

> This project was written by young {*filter*}agers (I'm a counselor at a
> computer camp). It has about a dozen forms, with quite a few bitmaps. It
> subclasses a command button at one point to trap keystrokes, and also
> ejects the CD rom drive at another. These are the only two API usages.

> All the files (including the bitmaps) come to around 30 mb.
> I tried setting the swapfile size to around 1 gig, to no avail. I'm
> starting to think it's either an error in code, or a VB bug.

Hi Joachim-

Any forms greater than 64K? That's a possibility. If so, move the code
to another module and simply call it from the form.

Good Luck,

Randy Barrow
--

==============================================
Please remove NOSPAM from address for replies
==============================================



Thu, 15 Jan 2004 01:22:38 GMT  
 "Out of memory" when making EXE
I don't know what your definition of "quite a few" is, but if they added a lot
of bitmaps at design time, this could be causing the size of one or more form
files (or associated .frx files) to be unacceptably large.  I would try
removing at least some of the bitmaps at design time, and loading them on the
forms at run time with the LoadPicture statement.

Lee Weiner
lee DOT weiner AT home DOT com


Quote:

>Hey groupers,

>I was compiling a project to an EXE, when I got an "Out of Memory"
>error. It went through the compiling phase, and about 1/3 of the way
>through "making EXE" I got this error. There is no further explanation
>in the error message.

>I tried compiling on 3 different computers. Any clues as to what might
>be wrong. I'm including some of the things that might be problems.

>This project was written by young {*filter*}agers (I'm a counselor at a
>computer camp). It has about a dozen forms, with quite a few bitmaps. It
>subclasses a command button at one point to trap keystrokes, and also
>ejects the CD rom drive at another. These are the only two API usages.

>All the files (including the bitmaps) come to around 30 mb.
>I tried setting the swapfile size to around 1 gig, to no avail. I'm
>starting to think it's either an error in code, or a VB bug.

>Anyone have any ideas?

>-Joachim



Thu, 15 Jan 2004 02:00:35 GMT  
 "Out of memory" when making EXE
On Sat, 28 Jul 2001 12:27:31 -0400, Joachim Van Brandt

Quote:
>Hey groupers,

>I was compiling a project to an EXE, when I got an "Out of Memory"
>error. It went through the compiling phase, and about 1/3 of the way
>through "making EXE" I got this error. There is no further explanation
>in the error message.

>I tried compiling on 3 different computers. Any clues as to what might
>be wrong. I'm including some of the things that might be problems.

>This project was written by young {*filter*}agers (I'm a counselor at a
>computer camp). It has about a dozen forms, with quite a few bitmaps. It
>subclasses a command button at one point to trap keystrokes, and also
>ejects the CD rom drive at another. These are the only two API usages.

>All the files (including the bitmaps) come to around 30 mb.
>I tried setting the swapfile size to around 1 gig, to no avail. I'm
>starting to think it's either an error in code, or a VB bug.

>Anyone have any ideas?

>-Joachim

Even though you may have enough RAM to hold all the data, that alone
doesn't mean that you can compile the program. I've run into the same
type of problem, although it would compile, it sometimes crashed the
system (BSOD and all).

Are the bitmaps stored as resources in the app itself ? Either by
explicitly being accessed from a resource file, or implicitly by being
loaded into the picture property of a form/control.

If so, I would recommend externalising the bitmap data. The best way I
have found for this would be to create a binary data file containing
the actual bytes of the image, and loading the images from the data
file on demand. There is an instrinsic limit to the maximum allowable
size of an executable that varies from system to system. Externalising
the bitmaps would remove quite a bit of data from the executable. Data
files can be any size you want them to be (within reason), so it's
probably a better method.

Besides, a 30MB executable is a little too large. The largest 'true'
executable I have on my hard drive is only 5MB, and that's Microsoft
Excel. By 'true' executable, I mean an application, not a
self-extracting archive.

        HTH,
        J.
        Jeremiah D. Seitz
        Porch karaoke king and the guy who runs with 8< scissors >8
        Omega Techware
        http://www.*-*-*.com/



Thu, 15 Jan 2004 09:55:45 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB5.EXE memory could not be "read" [or "written"]

2. : VB6 Problem: "The memory could not be "read"/"written""

3. VB6 Problem: "The memory could not be "read"/"written""

4. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

5. Making pivot table "(blank)" items visible

6. Making a "Setup file"?

7. Making a "Setup file"?

8. Making "semi-transparent" user control

9. "Trial Versions" Making them

10. Making a BitBlit "permanent"

11. Making an html application "trusted"?

12. making IE "forget" credentials

 

 
Powered by phpBB® Forum Software