Solved

Out of Memory Error while writing EXE

Posted on 2000-05-08
10
792 Views
Last Modified: 2008-02-01
We are currently developing a (fairly large) VB6 App which has developed a major problem.

The problem we have is that whenever we try and compile now we get an "Out of Memory" error WHILE WRITING THE EXE (NOT while compiling).

As stated above - there is no problem running the entire program in design mode - it just won't compile.

Tried using native code and p-code options and turning off all optimisations to no avail.

The program used to compile fine - at some point recently it has stopped working (only things added to it are a couple of modules and references to a couple of ActiveX Dlls).


We're using VB6 SP3 and see the same problem on both NT and 9x machines.

Can anybody shed any light on this.

0
Comment
Question by:paulstamp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 1

Expert Comment

by:ofirg
ID: 2787633
Try re-installing VB ,SP3 and all other
component u r using?
0
 
LVL 3

Author Comment

by:paulstamp
ID: 2787645
I've tried on a completely fresh machine - no joy unfortunately.
0
 
LVL 2

Accepted Solution

by:
BobbyOwens earned 250 total points
ID: 2787658
I've had a problem before with opening files and getting out of memory errors. It was due to Source Safe corrupting one of the files. The only way round it was by manually editing the file involved. Try opening every module in your project to see if any are corrupted.

Are you using Source Safe?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:paulstamp
ID: 2787666
We are using SourceSafe but none of the files have been corrupted. As mentioned before - it does run fine in design mode.
0
 

Expert Comment

by:syedAliF
ID: 2787681
This is what msdn says just check these could be some of the problems.
Good luck

Out of Memory
More memory was required than is available.  

There are too many applications, documents, or source files open.Close any unnecessary applications, documents, or source files that are open.


There is a module or procedure that is too large.Break extremely large modules or procedures into smaller ones.


There are terminate-and-stay resident programs running.Eliminate terminate-and-stay resident programs.


There are too many device drivers loaded.Eliminate unnecessary device drivers.

0
 
LVL 3

Author Comment

by:paulstamp
ID: 2787713
Unlikely to be a problem with TSRs or device drivers as my own machine is brand new and hence fairly clean.

Its certainly not anything to do with the number of other apps running or memory available. I have 128mb of RAM and about 3Gb free for swap file !

The large procedure is an ouside possibility but I would expect that to fall during design time, or at least at compile time, rather than while writing the executable.

Note - this is not a run-time-error - there is not even an error number returned : just a dialog pops up when trying to write the executable.

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2787749
Hm, maybe you have UserControls in your project?
If yes, check your Initialize and Terminate Events or them, if any generates errors because not in runtime.
0
 
LVL 3

Author Comment

by:paulstamp
ID: 2787768
Nope.. no user controls in project.

Does anyone know the mechanics of what VB does during the compile / exe build process. Is it possible that graphics get added into the EXE after the "compilation" phase? If so there could be a corrupt image file that causes the problem.
0
 
LVL 3

Author Comment

by:paulstamp
ID: 2787962
Actually... on further inspection one of the files does appear corrupted. I'm quite surprised that running with full compile doesnt spot it.

The curse of SourceSafe strikes again !

Cheers.
0
 

Expert Comment

by:gupta_ashish
ID: 2788177

Break your project into Active-X Exe's or Active-X Dll's and complied them individually.
you won't get this problem

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 73
VB6 - Convert HH:MM into Decimal 8 75
clicking a shape in a frame array vb6 3 54
SQL Server 2012 to SQL Server 2016 24 53
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question