?
Solved

out of memory

Posted on 2003-03-06
12
Medium Priority
?
226 Views
Last Modified: 2010-04-01
Ive been working on a program for the last year working fine. I jsut made a change to it and now when I try to run it in debug mode i get an error saying 'Out of memory'. if i fix where it crashes it will just happen further on in execution. I have restarted the computer and only have vc6.0 running. no other programs. need help urgently
0
Comment
Question by:_versamps_
[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
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 6

Expert Comment

by:PlanetCpp
ID: 8084870
and whats the change you just made??
0
 

Author Comment

by:_versamps_
ID: 8084886
i added a cstatic and a cedit to the dialog and removed a button.
0
 
LVL 6

Expert Comment

by:PlanetCpp
ID: 8085717
i don't know its really just not enough information. i don't use dialogs either which makes it harder to think of what it can be.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:_versamps_
ID: 8085736
ye problem is that it happens within different sections(dlls) within my main project. i fixed it from one area where i try to anchor a edit box then once i fixed the 'out of memory' there it crashed on a CArchive.Serialize call in a totally different dll. Im beginning to think my compiler has gone up the creek.
0
 

Accepted Solution

by:
WaffleSouffle earned 900 total points
ID: 8087116
What compiler are you using ?

What is the precise wording of the error - are you out of memory on the stack (which probably means a recursive problem) or the heap (which would be difficult), or are you out of memory bounds in which case you're messing with an invalid pointer, or something else ?

Check the ids of your new resources - make sure there's no resource number clash because then you'll be casting one type of window to another type which is, well, bad.

What's the structure of the program. Who owns what - how is the archive related to the dialog, the edit control and the static ?

Have you tried recompiling all the portions of your program afresh ?

More info needed...
0
 
LVL 3

Expert Comment

by:cmaryus
ID: 8087650
Basically you get Out of Memory when you allocate to much resources and you don't release them.
for example if you keep allocating a pointer and you don't release it you will end up with this error:
while(true)
{
     int *p = new int(1);
}

So check those nasty pointers.
0
 

Expert Comment

by:daknight2000
ID: 8088740
in my view, could be many reasons..
1. are u using the debug mode dlls?
2. any recursion without an end condition?
???

dunnooooo
0
 

Author Comment

by:_versamps_
ID: 8099696
nah no recursion... the error message says only "Out Of Memory". thats it. i thought it maybe something to do with ID's but not so sure if its now crashing on a Serialize call. im using it in Debug.. if i try release mode i just get an exception instead of the Out Of Memory message
0
 

Author Comment

by:_versamps_
ID: 8099823
had something to do with the ID's. thanks
0
 

Expert Comment

by:WaffleSouffle
ID: 8101834
Great - who gets the points nudge nudge
0
 

Expert Comment

by:WaffleSouffle
ID: 8104740
Great - who gets the points nudge nudge
0
 

Author Comment

by:_versamps_
ID: 8107888
oops thort i did that already. it happens still every now and again which i believe a file must be corrupt sumwhere. neways thanks
0

Featured Post

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!

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

752 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