LoadSprite Causes Crash

BlitzMax Forums/MiniB3D Module/LoadSprite Causes Crash

ima747(Posted 2007) [#1]
This is really hard to test out but any thoughts would be much appreciated.

Running v0.42

Everything works fine on my PC (PC desktop nvidia 2 CRT screens) and mac (laptop, ATI built in, 1 crt and laptop widescreen LCD)

however on a friends computer who's testing for me my program crashes at the first call to LoadSprite(). He has a PC laptop standard ratio LCD, I believe built in ATI card.

LoadSprite("Data/Underlay.png")', 1+2, Camera) works fine on all but his system

I changed it to LoadSprite("Data/Underlay.png") thinking the attach or flags might be the problem. it still crashes. I know the file exists as it is loaded in an earlier 2D part of the program.

It's really hard to test since at the moment I'm on the east coast and he is in Japan... so I can't run it in debug or anything, just have the program dump things to a log file for me (which is how I found where it was dieing).

Any thoughts on why LoadSprite might die on a system? the 3D code at that point is basicly set graphics to 3D, create a camera and postion and rotate it, create a pivot I use for an achor, then create the sprite, and it crashes on that.

Any thoughts?


ima747(Posted 2007) [#2]
Gave my friend a new test app that creates a cube into a Tmesh, creates a cube into a TEntity, creates a sphere into a TMesh and Creates a Sphere into a TMesh attached to the camera. None of that crashes but it crashed right after that at the load sprite.


ima747(Posted 2007) [#3]
Gave my friend another test that loads a texture I use elsewhere and puts it to a cube. it crashes when trying to load the texture so it seems on his system loading graphics for texture (sprites being a texture a single face I believe) cause it to crash.

So, the question becomes why would a computer crash when loading textures? It runs BlitzMax in 2D with openGL driver fine (I use that for the menu in the game) it doesn't crash on any system but his so it wouldn't seem to be my code. His system runs commercial 3D games just fine so his card isn't total garbage. could his openGL driver be messed up in a way that would allow Blitz to run 2D through openGL but break on graphics with MiniB3D? Or could there be a glitch in the MiniB3D graphics loading routine?


ima747(Posted 2007) [#4]
I couldn't find MiniB3D 0.41 on my HD anywhere so I tried using Klepto's Extended version 0.41. It still crashes, however I did notice that it is faster using klepto's 0.41 than simon's 0.42 on my system. 0.42 gives me around 117-120 fps on initial load up. I get 128-131 with klepto's 0.41. Not a big difference but interesting. Perhaps klepto did some optimization that could be put back into the standard distribution? or maybe that difference is based on some openGL specific tweaks that can't be put back since I believe the goal is to have it possible to run MiniB3D through direct X some day...

Anywho, should I just chalk this system up as a freak and assume it won't happen again or will be fixed by a driver update some day? or is there some other test tools I can have my friend run to get some more info about his system that could be of use to sorting it out in minib3d?


simonh(Posted 2007) [#5]
Can you try this for me - In LoadAnimTexture, comment out this line:

pixmap=AdjustPixmap(pixmap)


ima747(Posted 2007) [#6]
Commented, rebuilt, runs fine on my PC, got my friend to try it and it works! huza! I haven't done extensive testing but it seems to hurt the frame rate slightly though. maybe it's just my computer though. have to test more.

Should I leave that line commented? or could that cause some other problems?


simonh(Posted 2007) [#7]
No it should be OK.