Link to home
Start Free TrialLog in
Avatar of MoMarvi
MoMarvi

asked on

Run Time Error 7 Out of memory

I have an app that used to run fine, until I decided to add a Wang Image object.

Now, the app will not run on some machines. I get a Run Time Error 7, Out of Memory.

The suspect machines are generally laptops running win 95, and have 32 meg of memory.

The program runs fine on machines with 64 Meg and up. They were win 98 and WIN NT machines, does that make a difference?

I'm using VB5, and the form that bombs is 136K. Is that too big?

Help.
Avatar of ameba
ameba
Flag of Croatia image

On Win95 there is a limited User and GDI memory. Adding more memory to machine doesn't help.
NT does not have these limitations.

Use any memory monitor to watch User and GDI resources, e.g. in VB, select menu Help, About, SystemInfo.
Avatar of mcrider
mcrider

This is directly from the help pages on Error 7:


More memory was required than is available, or a 64K segment boundary was encountered. This error has the following causes and solutions:

*      You have too many applications, documents, or source files open.

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

*      You have a module or procedure that's too large.

Break large modules or procedures into smaller ones. This doesn't save memory, but it can prevent hitting 64K segment boundaries.

*      You are running Microsoft Windows in standard mode.

Restart Microsoft Windows in enhanced mode.

*      You are running Microsoft Windows in enhanced mode, but have run out of virtual memory.

Increase virtual memory by freeing some disk space, or at least ensure that some space is available.

*      You have terminate-and-stay-resident programs running.

Eliminate terminate-and-stay-resident programs.

*      You have many device drivers loaded.

Eliminate unnecessary device drivers.

*      You have run out of space for Public variables.

Reduce the number of Public variables.



Cheers!
Hi there
   I've gotten this error numerous times when designing apps and there were a couple solutions.
   1) Applications being run of a network drive or floppy
   2) Working with the ADO recordset and not updating properly
   3) Some strange problem with the generated frx files. After deleting all the frx files, the app was fine. This was a pain because I lost all my images but it did solve the problem.

Sicilian
Avatar of MoMarvi

ASKER

mcrider

Stoopid question. but how do I get the user to run in enhanced mode?
Enhanced Mode is for Windows for Workgroups implementations... basically when you start windows, you use the command:

   WIN /3


Cheers!
It's also for Windows 3.11 with the 32-bit extensions added.


Cheers!
Avatar of MoMarvi

ASKER

My users are having the problem in Win95. What do I do then? Do I break the form into two?
Avatar of MoMarvi

ASKER

My users are having the problem in Win95. What do I do then? Do I break the form into two?
Yea, you could try breaking up the form into two... Are you using alot of Public variables?

Most likely, you are hitting the 64K Segment problem... If so, spliting the form may work unless you have an unusually big procedure... then you need to split up the procedure...


Cheers!
Avatar of MoMarvi

ASKER

Sorry mcrider

I found the problem, and still need an answer.

If I compile my app in Win95, I don't get the out of memory error. If I compile in Win98, (my present development machine), Win95 users of the app get the error.

Apparently, the imgedit.ocx has changed between win95 and win98. The out of memory error is a red herring.

What can I do? I can't continue to develop in win98 and compile in win 95. (Telling my users to upgrade to win 98 isn't an option.)

I've upped the points to 200. to reflect the difficulty.
Avatar of MoMarvi

ASKER

Adjusted points to 200
How about this...

Put two builds together. One including the imgedit.ocx from Win95 and one including the imgedit.ocx from Win98...

You still should be able to develop with 98 and just distribute the correct ocx... Make sense?


Cheers!
Avatar of MoMarvi

ASKER

The problem with the imgedit.ocx, is that you don't distribute it. It comes with windows, and is not distributable or registerable.

The Kodak site indicates that apps developed with imgedit in WinNT will not work in win95, though apps built in win95 will work in both 95, and NT. Win98 is not mentioned. Is Win98 closer to NT than 95?

Of course, a pointer to a (preferably free, I'm a cheap b&$t&rd) similar control would help as well.

btw mcrider, I hope you got out at some time today! You were at your machine @ 03:45 PST, and now at 15:47 PST.

It was a nice day here on the east coast.
Avatar of MoMarvi

ASKER

The problem with the imgedit.ocx, is that you don't distribute it. It comes with windows, and is not distributable or registerable.

The Kodak site indicates that apps developed with imgedit in WinNT will not work in win95, though apps built in win95 will work in both 95, and NT. Win98 is not mentioned. Is Win98 closer to NT than 95?

Of course, a pointer to a (preferably free, I'm a cheap b&$t&rd) similar control would help as well.

btw mcrider, I hope you got out at some time today! You were at your machine @ 03:45 PST, and now at 15:47 PST.

It was a nice day here on the east coast.
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MoMarvi

ASKER

imgedit.ocx is NOT distributed. (sorry for yelling). It's not in my setup.lst file (I actually have to remove it from the setup wixard) It's part of the Wang/Kodak setup in the Win95/98/NT package.

terminal insomnia... back in my day, we called em terminals, now they call em monitors.....

i had the same problem when i used a progress bar and make the property RightToLeft true , when i make it false it was solved , i think it MS bug.

No try to use another alternative of that control, or try to change some properties that may cause this error.


the strange thing is that it works on some machines , and on some other machines don't.

Avatar of MoMarvi

ASKER

I can't delete the question. The answer lies in that I can't distribute the imgedit.ocx. The "Out of Memory" error is a Red Herring.

For those searching the Database, you have to compile the program in Win95 for any project that uses the Wang/Kodak image control. Compiling in Win98 will cuase problems. Enjoy the points mcrider! Sorry about the average score.