can someone test this?

BlitzMax Forums/BlitzMax Beginners Area/can someone test this?

Jesse(Posted 2007) [#1]
I am working on a tile editor. Everything had been working fine for me until it started crashing. it run for about 10 to 15 minutes then it crashes. it crashes in a line after repeatedly executing it hundreds of times and it doesn't allways crashes in the same place. I am assuming is a compiler bug. it gives me a memory exception error. it doesn't write outside of the array, I don't believe but I could be wrong.
this is the code:

I am using the image below:


the tiles image is a modified version of the Ardi Feldman graphics library found here:
http://www.flyingyogi.com/fun/spritelib.html


grable(Posted 2007) [#2]
Ive been running your code for about 30 minutes now, still havent hung yet.
Looking over it i cant find anything that would make it hang either.


Jesse(Posted 2007) [#3]
it crashes on me almost all the time. it might be the graphics card or the drivers. can you tell me what are the specs on your computer?


grable(Posted 2007) [#4]
Windows XP SP2 - ATI 9800 (with latest drivers)
P4 3.4GHZ - 1GB RAM
BlitzMax 1.26


Jesse(Posted 2007) [#5]
thanks grable for taking the time.
I want to make shure it is only on my computer. so is there someone else that can run the code on the computer for about 30 minutes and let me know if anything happes.
one more thing, move the window about the middle of the map. and leave it there for the whole time.


Derron(Posted 2007) [#6]
Without really reading your code I assume you attempt to access a NULL object in some cases:

When starting with 0 (zero based) you can't go from 0 to array.count - you will have to go from 0 to array.count-1.

Count returns the amount of "rows" and when starting with 0 the first row is the 0 not the 1, so if you count 6 rows, the last row is the row number 5.


bye
MB


grable(Posted 2007) [#7]
Thats why he is using Until instead of To ;)


Jesse(Posted 2007) [#8]
Yes MichaelB as grable said, I am very much aware of that and I have adjusted the code acordingly. that is not a problem. but it keeps on crashing to the point that it resets my pc. and the problem is it crashes half way down x and half way down y.
I just tried it on my nephews laptop and it doesn't crash at all.
I guess is about time to upgrade the motherboard processor, memory and video card.
I am considering giving me this for christmas:
http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=3163514&Sku=MCM-M2NE-5400A
and this:
http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=3128203&Sku=G458-1008
anybody has a better sugestion for a $350.00 us budget.
I know is not top of the line but it'll do for a year or two.


Derron(Posted 2007) [#9]
Sorry, didnt read the "until", just saw "for" and no "-1".

To which part of the code does the debugger lead?

Did you try to check everything for "NULL" before accessing it (just for testing purposes).

So when accessing a field in your tmap, check wether its NULL before assigning the value to a variable.


bye
MB


Dreamora(Posted 2007) [#10]
Straight crashes very much sounds like a driver or hardware problem.
either a component that is dieing, energy shortage (PSU problem), termal problems, hardware component interferences or a driver that causes a similar effect.


Jesse(Posted 2007) [#11]
the error varies between lines. it usually happens within this code:
				If array[x,y,Self.Layer] > -1 
					cR = Self.array[x,y,Self.Layer]
					cG = cR
					cB = 0
					SetColor(cR,cG,cB) 
					Plot(sx+x,sy+y)
				EndIf


I just don't know, is possible my ram could be messing up or my video card even my mother board.

if I run it once it crashes then if I run it again it resets the computer. but it only happens with bmax programs. My son has been running "Universe at War- Earth Assault" and it works fine with it. That is strange.

also yesterday I was trying Gray Alian's "Holiday Bonus" and the computer reset itself while switching between window and full screen mode.

I am seriously considering the upgrade but if its a Bmax fault I might just be doing an unnecessary expence(not really, I been meaning to do the upgrade anyway).