Page 1 of 2
Out of memory errors
Posted: Tue Jan 08, 2013 5:34 am
by Fangbeast
Windows 7 x64, Purebasic 5.0 X64.
I'm getting a random "Out of memory" error in one out of 40 starts in any program I have and can't figure out the logic.
Never happened in the 32 bit environment at all.
Anyone ever had this error in the 64 bit windows / 64 bit purebasic setup?
Re: Out of memory errors
Posted: Tue Jan 08, 2013 12:56 pm
by charvista
On the computer that has Windows 8 Pro 64-bit installed, I also get often the "Out of Memory" message when I want to lauch a program (F5 through the editor). I was thinking it was a Windows problem as I never had this before. My computer has 4GB RAM, which is not huge, but there is no anti-virus installed by myself, so I first thought that the problem arose from the Windows Defender which is now a real active anti-virus program...
But now you are saying that you have this problem with Windows 7... so could this be a Windows update that does not a FreeMemory() somewhere????
But what is common between us, is that we have this problem while using PureBasic 5.00.
Re: Out of memory errors
Posted: Tue Jan 08, 2013 1:18 pm
by Fangbeast
Would not be surprised with win 7. I had the exact same setup under win 7 32 bit with pb 5.00 32 bit some weeks ago and this never happened.
64 bit windows 7 has done some strange things to me sometimes, this is just the latest.
Re: Out of memory errors
Posted: Fri Sep 27, 2013 2:26 pm
by yrreti
Any more info on this issue? I've changed my .l to .i etc but still occasionally get this error.
I find that it is definitely related to Win 7 64bit. But I did find one possible cause. Windows 7 Resource Memory!
I use a dual display with several commonly used icon links on it for quick access. I find that if my program
is large, I can get this error to stop only by temporarily removing some of these links. Then it work fine with
no more out of memory errors. So it is related to a Windows 7 Resource Memory problem!
Any other ideas on how to fix this?
yrreti
Re: Out of memory errors
Posted: Mon Oct 07, 2013 11:13 am
by doctorized
Every now and then I have problems like this and then I enable Purifier (I change all settings to check every line) and Purifier finds the cause of the problem for me instantly.
Re: Out of memory errors
Posted: Tue Oct 08, 2013 1:32 am
by yrreti
Thanks for your input doctorized, which is also good advice.
But I found though that in my case it is definitely related to Windows 7 Resource Memory!
I have those setting set just as you have said in your post. But I can always create the issue by just
adding any link on my display screen above what appears to be a threshold for things added to the
display. When I remove that link, which could be any link, the problem goes away.
I put it back, and the problem re-occurs. I remove it, and problems is gone.
I'm using an AMD 64 x2 Dual Core Proc and win 7 64-bit with 4GB memory
But I am using the 32 bit version of PB5.20 LTS because too many of my clients can't use 64 bit
programs. I also have to admit that my program is quite large.
Does any one know if it is possible to change the amount of memory set aside for resource memory?
I've read about some having this problem with the linux version, and that you can fix it by changing
the amount of memory that fasm uses. But I didn't find any way to change that with fasm for windows,
if that could help? An alternate way is to create a separate login with minimal links on the display for
use when programming. But that would really be a pain in the butt having to log out and log in all the
time when you need to access those needed links etc..
Thanks for your reply.
Re: Out of memory errors
Posted: Fri Nov 22, 2013 2:54 pm
by yrreti
I've been occasionally getting the following ever since PB5.2
PureBasic - Assembler error
X error: out of memory.
Is no one else having this problem? I've been having it since upgrading to PB version 5.20 and beyond.
I don't recall it occurring before that version, but it is really getting irritating to accomplish any programming.
I have followed various suggestion found in different posts which some have improved it a little.
But it still persists. The only thing that seems to help for awhile is some times restarting the compiler.
And if that doesn't work, then deleting a file or two placed on my desktop. The desktop solution indicates a
possible windows resource problem. Also if I don't use the Debugger, I seldom get the error, but of course, I
need to use the debugger. The size of the programs code doesn't seem to make any difference.
Window resource Monitor doesn't really show any thing strange. I'm having the error right now, and it shows
4G mem 1.1G in use 60m Modified 1.2G standby 1.8G free Available 3G Cashed 1.2G
If it is a windows resource problem, maybe some one could recommend a program that handles windows resources
better than windows 7 64bit does. The other clue though is, why didn't I have this problem before version PB5.00?
But it is really getting irritating and very frustrating to accomplish any programming.
Does any one have any code that they could share that could display what is happening to my resourses when ever
this error occurs?
Please Please and Thank anyone for any help.
Re: Out of memory errors
Posted: Fri Nov 22, 2013 4:05 pm
by IdeasVacuum
Have you ever considered that it might be a physical fault - an unreliable ram stick? It sounds like you only get the error when the PC has some real work to do - it might be on those occasions that Windows tries to access an area of ram that is faulty. Imperfect ram is far more common than most people realise, but you could have a stick that simply isn't seated properly or has a slight tarnish along the connector strip. Worth removing, cleaning (with a soft pencil eraser) and re-seating the ram to see if that makes a difference. You can also run a test, but to be meaningful it has to run uninterrupted by anything else for some time.
MemTest86+
Microsoft Memory Diagnostic
Re: Out of memory errors
Posted: Fri Nov 22, 2013 4:32 pm
by einander
I have the out of memory error on 2 computers, both with windows 7-64, PB 5.20 LTS.
After running another program without main loop (for example a PBI file) , usually the error is temporarily gone.
Sometimes the error appears running a program with Debugger On, and disappears with Debugger Off.
Re: Out of memory errors
Posted: Fri Nov 22, 2013 4:36 pm
by charvista
As I previously stated, I also had often this out-of-memory problem. My guess is that it is related to Windows 7 (and you are all speaking about Win7 as well), because I am now running Windows 8.1 and I don't remember it ever happened again... So, it is not a faulty RAM, because it is the SAME computer with the same RAM on which I ran Windows 7 before!
Edit: yrreti himself underlined on his post of 2013-10-08 that it is a specific Windows 7 problem (64-bits). I might confirm that.
Re: Out of memory errors
Posted: Fri Nov 22, 2013 8:55 pm
by yrreti
Thanks IdeasVacuum, eilander, and charvista
Those are good suggestions, and I have already used MemTest86+ several times to be sure my memory is okay.
I guess as charvista posted and I posted earlier. It's got to be a problem with window 7 64bit!, and others apparently are
having the same problems such as einander above. charvista. Thanks for posting your results via window 8.1 on the
same hardware. That definitely implicates win 7 64bit.
Why it didn't happen with versions before PB5.20, I don't know? But it looks like my choices at this point are to
just put up with it, or dump win 7 64bit and go back to 32bit. It's a shame. Unless some one could suggest a
decent memory manager etc? I don't think I can get much help from Msoft on this issue, as they are only interested in
pushing windows 8. Unfortunately I'm a Desktop type of person, and will never be a windows 8 or 8.1 type person.
Not unless they bring back a decent desktop again.
Thanks for your input.
Re: Out of memory errors
Posted: Fri Nov 22, 2013 9:41 pm
by charvista
Well Yrreti, technologies never stop, and I like Win 8.1 for some points, and i dislike Win 8.1 for other points. But globally seen, Win 8.1 is excellent and stable. Allright, it has become now more a marketing product rather than a real operating system, but it is not possible to stay forever with Win7 either, it is saying the same as "I prefer MS-DOS".
Please keep in mind that the out-of-memory occurred only when running a PureBasic program from the Editor by pressing the F5-key, and not always, only sometimes. I have no idea why that Out-of-memory occurs, but pressing again on the F5 key lets your program run. I know that it is a bit irritating, but nothing is 100% perfect. The consolation is that when you compile your program in EXE format, the out-of-memory problem never occurs, so your end-users who use the EXE program will never have the problem on Win7 64-bits.
It is possible that Win7 64-bits has some bugs and Microsoft prefers to correct those minor bugs in Win 8.1 only, in order to force the users to use their last version of Windows, who knows? Because my Win 8.1 is 64-bits as well.
yrreti wrote:Unfortunately I'm a Desktop type of person, and will never be a windows 8 or 8.1 type person.
Not unless they bring back a decent desktop again.
You are not alone with this opinion. Win 8.1 has done a half step backwards: you can boot your PC and have directly your good old desktop. But unfortunately, that new start button still goes to the modern tiles, yes.
So, why not create your own Windows system in PureBasic?

I did

Re: Out of memory errors
Posted: Fri Nov 22, 2013 10:51 pm
by yrreti
Thanks charvista for your informative reply.
What you said is really the truth about the whole matter.
But one thing you said really intrigues me?
So, why not create your own Windows system in PureBasic?

I did

You boot win 8.1 and run your own windows system?
That sound really interesting. Do you have any links to look at it?
WoW
Re: Out of memory errors
Posted: Fri Nov 22, 2013 11:18 pm
by charvista
yrreti wrote:You boot win 8.1 and run your own windows system?
Yes, something like that.
All what you need to do is to put your own EXE program in the directory C:\Users\<YourName>\AppData\Roaming\Microsoft\Windows\Start Menu\Startup\
It will inevitably first show the desktop for a little while (because Windows cannot be put completely away, a pity

), and after some seconds, your program will be launched automatically, giving the appearance that your program is the main one.
But you can minimize vizualizing the real Windows desktop by giving it an uniform color as background, and no icons on it, even hiding the trash icon. Welcome to the PB/OS

I think it is even possible with Windows 7, you only need to find the Startup directory.
Re: Out of memory errors
Posted: Sat Nov 23, 2013 12:51 am
by yrreti
Ah, I see
Thanks for the interesting idea Charvista.