Elusive RenderWorld() Crash
Blitz3D Forums/Blitz3D Programming/Elusive RenderWorld() Crash
| ||
I'm having problems with an elusive bug in my code. It's far too huge to post here, but basicly I'm trying to move the player, camera, and a good chunk of the world simultaneously a few units when the player moves from room to room. Sometimes when this is attempted, about once out of 20 times, the program will crash. If the debugger is up, it gives me the generic "Memory Access Violation" error during my call to RenderWorld(). Anyone have any ideas as to what might cause such a thing? |
| ||
Assuming you have debug on, writing outside of banks or outside graphic buffers with writepixelfast, can cause this. Fredborg |
| ||
I'm not doing anything with banks or mixing 3D and 2D or anything "dangerous" like that. Just moving objects around. Just wondering if anyone has encountered something similar, and how (if?) they solved it. |
| ||
Are you able to try it on another PC? I'm wondering if it's a driver issue -- you might want to try upgrading/downgrading the drivers...? |
| ||
I can't remember what it was but I distinctly recall a thread a while ago (around a month ago) describing a memory access violation at RenderWorld. I'm sorry I can't remember what it was but it was entirely 3D and had nothing to do with drivers. It was some subtle thing in the code, like a pointer to a deleted entity or something. |
| ||
If you are doing some messing with surfaces, you need to make sure if it's a mesh. Strangely lights do return a zero when using countsurfaces, while pivots, cameras, and terrains report a Memory Access Violation. I think that's one of the only circumstances where Blitz does not report a logical error...Could be wrong though...Graphics3D 640,480,16,0 camera = CreateCamera() light = CreateLight() pivot = CreatePivot() mesh = CreateMesh() terrain = CreateTerrain(2) DebugLog "CountSurfaces on a mesh = "+CountSurfaces(mesh) DebugLog "CountSurfaces on a light = "+CountSurfaces(light) DebugLog "CountSurfaces on a pivot = "+CountSurfaces(pivot) DebugLog "CountSurfaces on a camera = "+CountSurfaces(camera) DebugLog "CountSurfaces on a terrain = "+CountSurfaces(terrain) EndPut it in the 'Blitz3D Bug Reports' forum as well.. Fredborg |
| ||
Yeah, like Joe said, I remember a similar prob someone had back along. Because the error gets thrown in renderWorld, I think the prob was with a 'bad' mesh - a dynamically constructed mesh that was exceeding the vert limit, or something. I can't remember exactly - damn my failing OAP memory! :( |
| ||
If it comes down to this you should start looking in older threads. It'll take awhile searching manually (especially since I'm not even sure which forum section it is in!) but there is definitely an older thread about a RenderWorld error. See, this is why the forum needs a better Search function. |