Swapfile error

Archives Forums/Blitz3D Bug Reports/Swapfile error

Fernhout(Posted 2006) [#1]
I get a memormy violation when i use the following code in a program.

Set screen (Say 640,480)
Set backbuffer (First part goes ok. Nothing wrong)
repeat
Draw something on the screen
check for something
Repeat
Draw something else on the screen ( Here the swapfile filled up And eventualy give the error)
flip
Cls
until Situation demand it
flip
cls
untile first situation demand it


The outer loop works ok. Nothin happens. But when the inner loop starts the swapfile slowly filled up. Its take about 5 minutes when the wornig is comming.

Why is it working on the outer loop and the program can run unlimmeted.

This error goes on all versions.


big10p(Posted 2006) [#2]
Post some code.


Beaker(Posted 2006) [#3]
You probably have a memory leak. But, yes, post some real code.


Fernhout(Posted 2006) [#4]
Here is the example code:
Graphics 800,600,16
Setbuffer BackBuffer()
Repeat
If KeyHit(57) Then
Repeat
For x = 1 To 10
Color 128,x*10,128
Rect 25,25,400,400,True
Flip True
Cls
Next
Until KeyHit(1)
End If
For x = 1 To 10
Color 128,x*10,128
Rect 25,25,200,200,True
Flip True
Cls
Next
Until False

As long as the IF THEN is not executeded nothing is happening. As soon as the space key is hit and the IF THEN is executeded the swapfile is used and filled up ferry fast. Afther 5 minutes the error come up.
If the escape key is hit the use of the swapfile stays the same. Its not going down. Only if the program is terminated before the swap file is filled up memory is freed up again.


Mikele(Posted 2006) [#5]
Hmmm... Your example working here without problems. (blitz3d 1.96)


Fernhout(Posted 2006) [#6]
When you look at the windows taskmanager you wil see the cpu use and the swapfile. Whel i start the program i see the CPU use going up to 100% and when the IF THEN is executed the swapfile increased. I have a Centrino 3.2 Mhz 512 Mb intern memory a intel extreme graphics2 video card shared mem. 80 Gb hd free space on it 24 Gb. Swapfile size is as large as the harddisk allowed.
It take on my computer 5 minutes when the acces violation comes.