ClearTextureFilters() + alpha flag = MAV on Vista

Archives Forums/Blitz3D Bug Reports/ClearTextureFilters() + alpha flag = MAV on Vista

Doiron(Posted 2008) [#1]
The following code produces a Memory Access Violation with B3D v1.98 on Vista.

Graphics3D 800,600,0,2

ClearTextureFilters()
Cursor = LoadTexture("texture.png" ,2)

End


It only occours when you use ClearTextureFilters among with LoadTexture using the alpha flag. I was very surprised when I noticed it, since it's an extremely common situation.

I tested it with B3D 1.89 as well and it runs fine instead of crashing. It doesn't seem to affect Windows XP, since it ran fine with either versions of B3D.

I don't have other Vista PC's to test the bug with... could anyone with Vista kindly test it and post the results?


Test machine: AMD X2 5200, ATI 1950 Pro (latest Catalyst), 2gb RAM, Vista Ultimate (all updates installed, UAC disabled), DirectX 9.0c (latest distribution).


Doiron(Posted 2008) [#2]
I am referring to the latest update, v1.99, not v1.98... it states the wrong version number in the IDE. :)


Abrexxes(Posted 2008) [#3]
I have no Vista, but works fine on XP. Welcome in the new world of b3d textur issus. ;)

(Really cool, lots of problems here with textures with new drivers and cards and not "one" statement from brl.....)


Doiron(Posted 2008) [#4]
It works fine indeed on XP, it seems to be a Vista only issue (at least on my machine).

lots of problems here with textures with new drivers and cards

This looks like the mother of all texture issues, since it only need a cleartexturefilters and an alpha texture to crash. :)

Anyway, I am wondering if this bug is present with any video card and thus it is a OS issue or not.


SabataRH(Posted 2008) [#5]
Confirmed, clearing textures filters and loading any texture with the ,2 flag results in meltdown. Noticed this awhile back but was hoping it was a driver issuse. 4 sets of drivers later - it still presists.


Doiron(Posted 2008) [#6]
I'm curious... what chipset are you using, ati or nvidia? I don't think the bug is driver related.

Anyway, this bug MUST be solved as B3D becames quite useless without a way to clear texture filters (and it also causes havoc with a lot of already written source code), and since it didn't exist with older versions there should be a solution.


SabataRH(Posted 2008) [#7]
Nvidia chipset, i tested with the 7000 series and the 8000 series, same MAV.

Haven't tested on ATi though.


John Blackledge(Posted 2008) [#8]
This is very bad news.
I hope Mark is reading this.


jfk EO-11110(Posted 2008) [#9]
Do I get this right, you get the MAV as soon as you try to use a texture that was created or loaded after the ClearTextureFIlters?

If so, there may be a solution. Try it this way instead:

ClearTextureFilters()
Cursor = LoadTexture("texture.png" ,2 or 1)

Setting the flag 1 may save the day. (?) See also this thread:
http://www.blitzbasic.com/Community/posts.php?topic=71111

It may be the same probem, although in my case it was on XP.


Doiron(Posted 2008) [#10]
Setting the LoadTexture to 3 (2+1) works... thanks JFK, you saved the day. :)


Cursor = LoadTexture("texture.png", 3)



Hey Swampdonkey, could you test if it works on your pc too?

Weird bug, though (on the other hand it could just be a bad habit covered in the older versions, since as JFK pointed out in the other thread ClearTextureFilters removes the flag 'color').