|
-
August 20th, 2004, 12:34 PM
#1
Out of Memory, Why?
When Running my VB6 app, the users oftne get Out of Memory errors, mostly on W98, even with > 200MB of ram installed.
This typically happens when they run the app with Outlook, and/or Powerpoint open at the same time, often with several full screen images pasted into powerpoint. I usually tell the users to close Outlook and Powerpoint, when running the VB app, but they need powerpoint open to create reports from the screenshots they have taken from my program.
It's well-known that Microsoft apps are memory hogs, and are often leaky, not to mention VB itself.
But I don't understand why W98's VM doesn't kick in, and prevent the out of memory errors. Is the Vm in W98 broken ?
-
August 20th, 2004, 01:30 PM
#2
It depends on what you are doing...
I have applications that store very large amounts of data in VB6 in memory at one time...and very rarely have out of memory issues.
Where there are problems is when loading controls with data (such as tree views, list boxes, etc). There are certain memory constraints on the amount of memory that can fit into some controls. In the old days, (VB4), there were controls that could not store more than 64K of data in them. I am not sure how many more of those types of controls still exist.
I'm not sure that is your problem here...but I haven't noticed any memory-specific issues between 98 and XP using VB6.
Hope that helps.
-
August 20th, 2004, 06:02 PM
#3
 Originally Posted by Vince Martinez
...In the old days, (VB4), there were controls that could not store more than 64K of data in them. I am not sure how many more of those types of controls still exist...
The vb textbox is one example of a control limited to 64k (actual tests seem to indicate a bit less than 64k).
Anyway, this does not sound like the problem at hand. Are you certain that you are releasing all memory when no longer needed? For instance, setting objects to Nothing when you are done with them. Of course, screenshots are bitmaps, and thus can use a lot of memory if several are held in memory at one time.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
August 20th, 2004, 10:20 PM
#4
All I know is that my Win98 machine cannot even handle being on the internet more than 30 minutes anymore so I just dis-connected it and threw it in the closet.
My version of Win98 was on an HP Machine.
Back when I bought it , it was top of the line and costed me around $1,700 , now it's not worth more than $100.00 .
Win98 does have a bad memory leak problem, Like Wiz suggested ( In a way )
Make absolutely , positively sure that you're doing all that you can as the programmer to deal with the memory problem.
Believe it or not , but alot of memory leakage comes from ..........
DUST ?
And the fact that alot of people have their computer to where it goes into either Stand-By or Hibernate mode.
Dust causes memory leakage by simply cross-shorting the RAM chips . Electrical charges constantly pass from 1 chip to the next through the dust . Sounds weird and stupid , but it's true , ask any electronics engineer.
Solution ; Take side-cover off and blow dust out with an air-hose @ 5p.s.i.
( I do it every year on all my computers )
Do this at least once a year.
Suggest to your users to allow their computer's to shut down for at least 15 minute's a day.
It takes at least 15 minutes for an RAM chip to fully disburse all electrical charges.
Suggest to your Win98 users to either think about upgrading to XP or at least checking in to updating their RAM chips.
Because 9 out of 10 says theres been more dust on those chips than dust in an 100 year old cob-web. 
I hope you found this useful in some way.
But truthfully , Win98 is no longer even supported by Microshank , so your users might consider updating.
Theres to many security breaches on the Win98 platform and the whole world knows it
How can anyone sell information when all the information that they sell is free at the library ?
How come Doctors keep getting smarter yet they cannot cure the common cold ?
If Scientist are right and man evolved from monkey then where did the monkeys' come from ?
Man I love this little dude that waves =>  <= He just doesn't stop 
-
August 21st, 2004, 01:39 AM
#5
 Originally Posted by V.B.For Dummie's
...Dust causes memory leakage by simply cross-shorting the RAM chips . Electrical charges constantly pass from 1 chip to the next through the dust . Sounds weird and stupid , but it's true , ask any electronics engineer...
...Suggest to your users to allow their computer's to shut down for at least 15 minute's a day...
Suggest to your Win98 users to either think about upgrading to XP or at least checking in to updating their RAM chips.
Because 9 out of 10 says theres been more dust on those chips than dust in an 100 year old cob-web...
But truthfully , Win98 is no longer even supported by Microshank , so your users might consider updating.
Theres to many security breaches on the Win98 platform and the whole world knows it 
Firstly, since I am an electronics engineer, I can address this.
Dust won't do quite as suggested above, but if there were enough moisture, it could theoretically cause signals to cross and cause system wide erratic behavior, likely inhibiting operation altogether. However, this is unlikely since there is generally air flow and heat inside the case, keeping things rather dry. It would really take a lot of dust and moisture for this to be a problem, as it is in high voltage systems such as television and radio transmitters. Updating chips just because of dust on them is silly. Simply blow it or vacuum it off (properly of course).
Shutting down a system has no effect on this, because while the chips are being powered, residual charges don't occur. It's only once the system is off that it is suggested waiting at least 10 seconds before powering back up. I run my system 24/7, and servers around the world are run continuously also.
Last I knew, win98 is still supported. It is win95 that is supposedly no longer supported. Although, this doesn't mean a lot to me, since any patches and such they planned have been issued already.
Every windows OS has security issues. However, what they don't say is that many security problems are actually not the fault of the OS, but the darn m$ browser. That is another discussion altogether, and has no bearing here.
In short, an out of memory issue is a software problem, or the system may actually be out of memory. If the app is causing memory leaks, the problem would escalate as the app runs.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
August 21st, 2004, 02:35 AM
#6
 Originally Posted by WizBang
Updating chips just because of dust on them is silly. Simply blow it or vacuum it off (properly of course).
Thats funny......... The reason to update the chips was suggested due to years of dust collecting and plainly put............. out of date , factory installed crappy chips in the first place !
For instance , most computer packages ship with the generic , cheap Chips !
When good chips cost 3-4 times the amount , which means better quality & reliability of performance !
Most households CANNOT afford to go to the on-line Dell store and buy good quality Computers , nor' do most households have the intelligence of the inside of a computer to know what to request of there new computers' components , so most households have actually bought what was on sale , which naturally means Low-Quality PARTS !
 Originally Posted by WizBang
Shutting down a system has no effect on this, because while the chips are being powered, residual charges don't occur. It's only once the system is off that it is suggested waiting at least 10 seconds before powering back up. I run my system 24/7, and servers around the world are run continuously also.
Extremely funny there..........The main idea to shutting down the system is to release any electrical charges , just as suggested by Tech support
By the way , Tech support will tell you to TURN your computer off in order to release any electrical charges in your R.A.M. and then re-boot .
Microsoft :::: The only way to recover all R.A.M. is to re-boot despite what some software programs proclaim.
 Originally Posted by WizBang
Last I knew, win98 is still supported. It is win95 that is supposedly no longer supported. Although, this doesn't mean a lot to me, since any patches and such they planned have been issued already.
If there were still patches out then why did'nt microsoft have any for me ? Thats why I just threw my Win98 in the closet
 Originally Posted by WizBang
Every windows OS has security issues. However, what they don't say is that many security problems are actually not the fault of the OS, but the darn m$ browser. That is another discussion altogether, and has no bearing here.
True , however , how many 12 year old kids have been cracking and hacking XP lately ? Compare that to the amount of 12 year olds that cracked Win98 over and over
 Originally Posted by WizBang
In short, an out of memory issue is a software problem, or the system may actually be out of memory. If the app is causing memory leaks, the problem would escalate as the app runs.
Contradictary ?
Not all true . The blame can be several things contributing to the factor .
Dust does allow electricity to pass . Dust can be used as a condutor .
Most people do NOT blow the dust out of there computer , thus leading to excessive dust collection which can become enough to create a conductor . Despite the fans blowing, which mean absolutely NOTHING to the matter !
And after years and years of poor housecleaning.......................... the RAM chips , as well as other resistors , capacitors , diodes , etc......... can be shorted out
Wiz , if you're into electronics then I'd expect you to realize this.
How can anyone sell information when all the information that they sell is free at the library ?
How come Doctors keep getting smarter yet they cannot cure the common cold ?
If Scientist are right and man evolved from monkey then where did the monkeys' come from ?
Man I love this little dude that waves =>  <= He just doesn't stop 
-
August 21st, 2004, 06:00 AM
#7
Well, this thread is about an out of memory problem, so let's try to keep that in mind, ok?
 Originally Posted by V.B.For Dummie's
 Thats funny......... The reason to update the chips was suggested due to years of dust collecting and plainly put............. out of date , factory installed crappy chips in the first place !...
Out of memory and bad memory are different things entirely.
 Originally Posted by V.B.For Dummie's
Extremely funny there..........The main idea to shutting down the system is to release any electrical charges , just as suggested by Tech support
Shutting down releases memory which was allocated by software. Stray charges are another matter, which don't allocate memory and cause the condition in question. Stray electrical charges can of course corrupt data in memory, leading to crashes and such, but again nothing to do with the out of memory problem.
 Originally Posted by V.B.For Dummie's
By the way , Tech support will tell you to TURN your computer off in order to release any electrical charges in your R.A.M. and then re-boot .Microsoft :::: The only way to recover all R.A.M. is to re-boot despite what some software programs proclaim.
Exactly. However, do not confuse the electrical charges purposely stored in memory with static electricity.
 Originally Posted by V.B.For Dummie's
Dust does allow electricity to pass . Dust can be used as a condutor . Most people do NOT blow the dust out of there computer , thus leading to excessive dust collection which can become enough to create a conductor . Despite the fans blowing, which mean absolutely NOTHING to the matter ! And after years and years of poor housecleaning.......................... the RAM chips , as well as other resistors , capacitors , diodes , etc......... can be shorted out...
Just to be clear here, dust can become a conductor IF the voltage is sufficiently high enough, though it usually occurs because the dust holds moisture. The components themselves aren't what get shorted out, but rather the electrical conductors leading to them. That is, the circuit traces and component leads. The voltages used in memory circuits is so low, that dust alone isn't going to be an issue. Add enough moisture, and there could be overall system stability problems (note that this would require a lot more moisture than what can reasonably be found inside a computer case). Again, this has absolutely nothing to do with an out of memory condition.
Plainly stated, dust will not cause memory leaks, nor an out of memory error.
Sticking to the subject of this thread shall require abandoning discussion of dust, defective or low quality components, security issues, and the various other wanderings which have occurred.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
August 21st, 2004, 06:12 AM
#8
Please stay on topic.
This discussion should be revolving around tools that the OP can use to determine the memory conditions at the point of failure and the code they are using in the application.
Thanks
-
August 21st, 2004, 07:27 AM
#9
Please stay on topic.
In all actuality , I am staying directly on topic !
Beleive it or not all the topics within this forum thread are very , very relevant and should be brought to attention , especially for future reference .
So , if a user doesn't have a faulty chip due to all the reasons I listed above that somehow seem to NOT be on topic ; then they won't experience any memory leaks............ i n t e r e s t i n g .
Last edited by V.B.For Dummie's; August 21st, 2004 at 07:31 AM.
How can anyone sell information when all the information that they sell is free at the library ?
How come Doctors keep getting smarter yet they cannot cure the common cold ?
If Scientist are right and man evolved from monkey then where did the monkeys' come from ?
Man I love this little dude that waves =>  <= He just doesn't stop 
-
August 21st, 2004, 07:38 AM
#10
 Originally Posted by V.B.For Dummie's
In all actuality , I am staying directly on topic !
No. You are far from being on topic.
Beleive it or not all the topics within this forum thread are very , very relevant and should be brought to attention , especially for future reference .
So , if a user doesn't have a faulty chip due to all the reasons I listed above that somehow seem to NOT be on topic ; then they won't experience any memory leaks............ i n t e r e s t i n g  .
Take it to the general discussion forum.
-
August 21st, 2004, 10:02 PM
#11
I have memory problems in my windows ME, I´m developing my first VB6 project and I´ve been very careful releasing the memory in my program (setting everything to nothing).
But I am still curious if there´s a way to determine the amount of memory available in the system perhaps using some API calls?
If there´s a way to do so, then I think we could run some test in our applications in order to determine if it is leaving something "hanging" in memory or perhaps we could also calculate an aproximation of the amount of memory that our application will consume so that we can inform the user that there´s not enough memory to run the application (or to open a new form) BEFORE any error comes from the OS.
I don´t know.... I hope I´m not hallucinating.
-
August 22nd, 2004, 12:02 AM
#12
Yes, there are a few API calls that can be used to find out how much resources are available, such as GlobalMemoryStatus and GetFreeSystemResources.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
August 26th, 2004, 03:42 AM
#13
Re: Out of Memory, Why?
Bear in mind that windows 9x and ME primitives are still subject to the DOS limitation of the first 640K of memory being exhausted. It doesnt matter if you have a million gigabytes of ram, once that first 640K is gone, youre shot.. WIndows 9x/ME do some clever thingsto keep it free, but they are still dogged by it, and it is in relation to this why there are a few counters that keep track of how many system resources, gdi, user resources there are left. Every time you (or the system) use a pen to draw on the display (i.e. render graphics), it uses up some resources.. pens are released, of course, but not if you have 5000 windows open..
The simple answer to the problem would be to upgrade to an NT class OS like NT, 2K or XP
These were completely re-designed and are not subject to the 640K limitation of DOS based windows platforms.. if you have a gig of ram, then you can do a lot with it..
VBDummie: your closeted HP would have benefited from a quick installation of 2K, and you wouldnt have had half the problems you report, but dont blame a faulty modem or call waiting knocking you off the internet after 30 minutes, on windows 98 (junk as though it is). I dont go along with your argument that dust causes a huge problem - condensing humidity does. A mate of mine runs several PCs 24/7 in his workshop.. each one is dusty to the point that you cannot see the components on the motherboard (apart from large ones like the CPU), and that is the way they have been for 3 years now.. Im not saying this is a rule, nor am i saying it's an exception, but the horror stories you purport, dont hold much water..
-
August 26th, 2004, 01:30 PM
#14
Re: Out of Memory, Why?
[QUOTE=cjard]Bear in mind that windows 9x and ME primitives are still subject to the DOS limitation of the first 640K of memory being exhausted. It doesnt matter if you have a million gigabytes of ram, once that first 640K is gone, youre shot.. WIndows 9x/ME do some clever thingsto keep it free, but they are still dogged by it, and it is in relation to this why there are a few counters that keep track of how many system resources, gdi, user resources there are left. Every time you (or the system) use a pen to draw on the display (i.e. render graphics), it uses up some resources.. pens are released, of course, but not if you have 5000 windows open..
>>The simple answer to the problem would be to upgrade to an NT class OS like >>NT, 2K or XP
We are in process to migrate the app to 2K/XP.
I don't believe we are restricted by the 640K limitation, for the simple fact the application is 32bit, the application size is just under 2 megabytes, and it acquires 20-50MB images that are held in memory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|