BUG: River crashes dedicated server (fix inside)
by Matt Kronyak · in Torque 3D Professional · 04/06/2010 (5:06 pm) · 2 replies
When running a dedicated server a mission with a River object will cause the server to immediately crash in:
The problem ends up being in:
which is called by:
The exception occurs around the allocation of the VertexBuffer.
A simple solution to this is simply to check if the river is a server object prior to calling _generateSlices().
You could do this right in River::_generateSlices()itself or, as I chose to do, add this line to the end of void River::_generateSegments()
change
River::onAdd()
The problem ends up being in:
void River::_generateSegments()
which is called by:
void River::_generateSlices()
The exception occurs around the allocation of the VertexBuffer.
A simple solution to this is simply to check if the river is a server object prior to calling _generateSlices().
You could do this right in River::_generateSlices()itself or, as I chose to do, add this line to the end of void River::_generateSegments()
change
_generateVerts();to
if(!isServerObject()) _generateVerts();
About the author
#2
**edit - MeshRoad already checks that it's client side before generating vert buffer
04/29/2010 (4:20 am)
Just out of interest, MeshRoad appears to use very similar code to the river. Not tried it myself, but there's a potential crash there too I think.**edit - MeshRoad already checks that it's client side before generating vert buffer
Torque Owner Guy Allard
Default Studio Name
Keep us updated with any others like this that you find.