What's going on here?
BlitzMax Forums/MiniB3D Module/What's going on here?
| ||
I'm having some trouble with a MiniB3d game i'm working on, but only on Win7/vista 64bit machines with an ATI graphics card. Basically, the game exits, crashing to the desktop with an EXCEPTION_ACCESS_VIOLATION error. I've got some testers to run a debug build, and do a stack tracce when it crashes. So far, it's always crashing on Linked Lists from MiniB3d (surf_list being turned into an array, line 1547 in TMesh.bmx, and looping through ent_p.child_list in the UpdateChildren method of TEntity.bmx, line 1561). I've added the important bits of the stack traces below, maybe someone know what's going on here, and why it only seems to affect 64bit ATI machines? Driver bug maybe? It does seem strange that it's always a linked list causing the crash. I'm hoping it's nothing too sinister! Any help gratefully appreciated! Cheers Charlie Last edited 2011 Last edited 2011 Last edited 2011 |
| ||
It's hard to give any kind of suggestion, without any code reproducing the problem... |
| ||
Are you using threading, or compiling with threading enabled even if you aren't using threads? Shot in the dark but the MT GC has caused some weird problems before... |
| ||
No, no threads. I've been using BASS for audio, which i've discovered may be the problem (it runs in it's own thread, and the regular GC doesn't like it), but i'm not totally convinced yet, mostly because the common factor for crashing is ATI video cards. It's also peculiar that it always seems to crash with null things in lists that are part of MiniB3d. Very strange, and probably shouldn't be happening. Cheers Charlie |
| ||
Gc problems are a huuuuge pain, mix in another thread and it gets exponentially worse... If possible try a build without the audio and using the standard gc, see what happens on those ati systems. If it works you've got a gremlin in the gc/threading/ati driver mix... |
| ||
I've sent a soundless version out already, but haven't heard back from any testers yet. I suppose it would be better if it was BASS causing the issue, as i could switch sound libraries for Windows, or provide an alternative sound library maybe. The only issue i'd have is that because i'm streaming a lot of music, whatever i replace it with would need to do the same, else load times would become a big problem. Cheers Charlie |
| ||
If soundless fixes it, I would still say "Causing" is too strong a word... I think it's one of those perfect storm conditions rather than something explicitly faulty (rather a stack of tiny faults that cause a nice big boom). However it would still be the "simple" solution... Don't know how BASS works (never used it myself), or how you're using it exactly but you might be able to consider working in a time allotment on the main thread for handling your network stream? Each pass you check for data, if there is some you read say 1kb at a time until you use up your alloted time (say 0.01 of a second) then continue on with your normal render loop... depends how much extra time you have between frames on your main thread obviously, and how your streaming is handled etc. just a thought |
| ||
Soundless doesn't fix it :( Anyway, i've got a screengrab from a tester. It looks like certain textures are being corrupted. The lines in the background should be an image of a space scene, drawn onto a sphere which is flipmeshed. I guess if certain textures are not being loaded properly, this may possible cause a crash, right? ![]() Cheers Charlie |
| ||
I wonder if it's a data access problem with the VBOs being updated. In UpdateChildren, the matricies are being updated, right? |
| ||
Actually, I think i've fixed it. I was BASS crashing, and i've found a different (and non-crashy) way round it. The texture issue is resolved with a preference change in the catalyst control center. Still, you could be right. I still need to do some checking. Cheers Charlie |