473,408 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

"Out of memory" error when compiling

1,271 Expert 1GB
I've been fighting this error for 2 days now. I've decompiled and compressed the DB. It's normally about 100MB after compression and grows sometimes to about 150MB.

I've googled this and found a number of suggestions but so far nothing has helped. I've gotten it in both Access 2007 and 2003; I keep the DB in Access 2003 format so I can use either of those versions.

I've deleted forms and modules no longer used; I've changed many Public functions to Private functions, as many as I could.

I read somewhere that a reference to a missing table can do this. Does anybody know about that? I may have deleted some tables or links to tables that I thought were no longer used. (And they're not but maybe some unused code references one).

Any ideas?

Thanks,
Jim
Apr 6 '11 #1

✓ answered by Stewart Ross

Following on from my last reply, I wonder if you have a missing END IF at the end of a sub or function? If I remember correctly, this does not generate the error that you would expect - a missing END for a block IF - but can cause stack space issues which, like endless recursion, result in Out of Memory errors.

-Stewart

5 7781
TheSmileyCoder
2,322 Expert Mod 2GB
I had a similar issue once, and whether or not the cause of it is the same as yours only Access knows.

What I would suggest is to search all your code for SET statements, and make sure that for each SET statement there is a matching SET=nothing statement at the end of the procedure. I believe that access in theory should collect the garbage itself when you exit the function/sub, but I have heard that its still a good idea to do such a cleanup.

At least it worked for me.


EDIT: Sorry, I didn't read your title properly. I didn't notice that you said it was specifically when compiling, so I dont think my posted advice really applies after all.
Apr 6 '11 #2
beacon
579 512MB
Hi Jim,

I've had the same issue before and it was resolved by checking and/or re-adding the references.

When you're in VBA, go to Tools -> References. Make sure that all of the libraries you need for your database are included. Also, look at each of the library references you've already got...it may say (MISSING) next to it if something happened to your database and caused the reference to be removed/deleted.

This is the common list of library references I select in Access 2003. I think it would be identical in Access 2007 except for the first one, which would be 12.0 instead of 11.0:
  • Microsoft Access 11.0 Object Library
  • Visual Basic for Applications
  • OLE Automation
  • Microsoft DAO 3.6 Object Library
  • Microsoft ActiveX Data Objects 2.5 Library

You can always click on Debug and choose Compile...if you're missing a reference you'll likely get an error message that says, "Compile Error: User-defined type not defined".

I should point out that it's always a good idea to explicitly declare all variables if you aren't already doing so. I would add "Option Explicit" to the top of each module underneath "Option Compare Database". This will force you to use a "Dim" statement each time you create a variable and prevent any unnecessary duplication of variables, which could cause conflict problems.

Here's a helpful link from Allen Browne's website: http://allenbrowne.com/ser-38.html

Hope this helps,
beacon
Apr 6 '11 #3
Stewart Ross
2,545 Expert Mod 2GB
In addition to the comments already made, on occasion I've had this error if I've been adapting functions which involve recursive calls and I've accidentally changed the conditions for the end of recursion cases. I've experienced Out of Memory errors at this point as the stack space runs out when the recursion does not unwind. I can't remember this happening on compilation itself, though.

100-150MB is not unusual in Access, and should not be any problem in itself. I have a statistical reporting system which is just under 200MB in size when compacted. It routinely grows to 475MB as new queries etc are added until next compaction, but this in itself does not generate out-of-memory messages. I'd worry if the DB size was around 1.5GB, as it is likely to grow in use to reach the 2GB threshold that Access cannot exceed, but 150MB is well below that level.

-Stewart
Apr 6 '11 #4
Stewart Ross
2,545 Expert Mod 2GB
Following on from my last reply, I wonder if you have a missing END IF at the end of a sub or function? If I remember correctly, this does not generate the error that you would expect - a missing END for a block IF - but can cause stack space issues which, like endless recursion, result in Out of Memory errors.

-Stewart
Apr 7 '11 #5
jimatqsi
1,271 Expert 1GB
Stewart,
Thanks for your reply. It's interesting you should mention recursive routines because I am, in fact, using one of those in this case. But the problem is during compilation, not at runtime, so I think that is not the problem.

The missing END instruction is an interesting idea ... I have seen odd results when I've misplaced or left out one of those.

For now, I worked around my problem by going to a backup a few days old and reinserting nearly all the code I worked on during those few days. Last modified dates on forms and queries were very helpful for that. I sure wish module last modified dates could be used the same way, but they always seem to be the same date for every module.

There is one new form I did not yet insert, maybe that's where the problem is. I'll proceed with caution and look for that missing END.

Thanks again,
Jim
Apr 11 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alexander Skwar | last post by:
Hello! I'm having problems getting PHP 4.3.3RC4 successfully to install on my HP-UX 11.00 server. After a (successfull?) compile, "make install" errors out with this error message: ...
0
by: Andreas Suurkuusk | last post by:
Hi, I just noticed your post in the "C# memory problem: no end for our problem?" thread. In the post you implied that I do not how the garbage collector works and that I mislead people. Since...
9
by: Pierre Senellart | last post by:
The C++ standard states (26.3.2.1), about std::valarray constructors: > explicit valarray(size_t); > > The array created by this constructor has a length equal to the value of > the argument....
5
by: bughunter | last post by:
Very interesting for me Lock Manager Heap is of size 16809984 bytes Database Heap is of size 9273344 bytes Database Monitor Heap is of size 5226496 bytes Other Memory is of size 729202688...
0
by: dalaeth | last post by:
I have searched Google high and low and haven't found anything that works. Here's my problem, hopefully someone will be able to help! I'm using 1.1 Framework, and ODP.NET 9.5.0.7 on a Windows...
4
by: lawrence k | last post by:
I've a jpeg image that is 514k, which doesn't strike me as very large. Yet I'm running out of error when I try to resize it: Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to...
5
by: Frederick Gotham | last post by:
If we have a simple class such as follows: #include <string> struct MyStruct { std::string member; MyStruct(unsigned const i) {
4
by: lostlander | last post by:
In ARMCC, and Microsoft C, when i use a function which is never defined or delared, it gives out a warning, not a compiling error? why? (This leads to a bug to my program since I seldom pay much...
3
by: Atropo | last post by:
Hi, all. As you can see I'm just begining on C. with the tutorial "Sams Teach Yourself C in 24 Hours" as a starter. on aix 5.2 when compiling a helloWorld the gcc throws some warnings the...
0
by: Miles | last post by:
On Mon, Sep 15, 2008 at 6:06 AM, Harish K Vishwanath <harish.shastry@gmail.comwrote: "built-in type" generally means "implemented in C", also sometimes called "extension type". Both the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.