DX9 driver crash

BlitzMax Forums/BlitzMax Programming/DX9 driver crash

GW(Posted 2009) [#1]
I've moved to Bmax 1.33 and started using the DX9 driver.
My game runs fine under DX7 and OGL, but under DX9 the game will run for a few seconds and then crash, bringing up the visual studio debugger. The debugger brings me into D3D9.dll but i'm not sure of the cause. I've tried my game on a few other computers and some receive the crash and other not. all of them have the lastest DX installed.
I've narrowed the offending code down to the following example.

Can i get some of you who have the dbs.d3d9max2d driver to test this and see it also crashes?

SuperStrict

Framework Brl.basic
Import dbs.d3d9max2d

SetGraphicsDriver d3d9max2ddriver()
Graphics 800,600,0

While Not KeyHit(KEY_ESCAPE)
	Cls
		For Local I% = 1 To 500
			SetColor(Rand(128)+127,Rand(128)+127,Rand(128)+127)
			DrawOval(Rand(0,700),Rand(0,700),16,16)	'// this seem to be the culprit
		Next
	Flip 0
Wend


My specs are
Intel dual cpu 32bit
4gb ram
nvidia gtx 280/1gb
winxp pro
DX 9.0c


Arowx(Posted 2009) [#2]
Works fine here on:

Windows Vista 32bit
Nvidia 9300M Driver Version 178.24
DirectX 10

BlitzMax 1.33rc5
MinGW 5.1.4

@GW What are your system specs?


DStastny(Posted 2009) [#3]
I don't see anything special unless the compiler has changed in someway with regards to playing with pointers and accessing elements of array. Now looking at the routine, I don't think my trianglefan is quite right its looks like I am drawing and extra segment but the memory is allocated to the correct size. Looking at it I don't like that it allocates the array over and over. That kinda takes a hit in threaded mode.

I have running with Direct X diagnostics turned on and it does not seem to be reporting any problems or bad calls.

Does this only happen with DrawOval?

Doug


DStastny(Posted 2009) [#4]
Well I finally downloaded 1.33, I still don't have a problem with your example, I am on Vista 32 Laptop with a old nv 7300Go.

I do see some changes that I need to make as the Unicode changes most likely have me creating the graphics window non-unicode but the message pump that Max uses is Unicode... don't know what the heck happens mixing those two but probably not too good as dx hooks the message queue.

As for the DrawOval implementation its for most part exact same algorithm that Dx7 driver uses except I made boo boo and added extra vertex. Not that it mattered as it was not used in drawing the fan.

Not sure, need to see if other hardware is having problems with 1.33 and your sample.