* Make the ode simulation update loop print out the stack if an exception occurs (at least, this is what will happen on linux)

0.6.0-stable
Justin Clarke Casey 2008-09-18 18:54:42 +00:00
parent 6cfe4784cb
commit 8ff1bc5b03
4 changed files with 8 additions and 11 deletions

View File

@ -74,7 +74,6 @@ namespace OpenSim.Region.Physics.Meshing
return result; return result;
} }
public void Add(Triangle triangle) public void Add(Triangle triangle)
{ {
int i; int i;
@ -135,7 +134,6 @@ namespace OpenSim.Region.Physics.Meshing
} }
} }
public void Add(List<Vertex> lv) public void Add(List<Vertex> lv)
{ {
foreach (Vertex v in lv) foreach (Vertex v in lv)
@ -243,7 +241,6 @@ namespace OpenSim.Region.Physics.Meshing
{ {
pinnedVirtexes.Free(); pinnedVirtexes.Free();
pinnedIndex.Free(); pinnedIndex.Free();
} }
/// <summary> /// <summary>
@ -256,7 +253,6 @@ namespace OpenSim.Region.Physics.Meshing
primMesh = null; primMesh = null;
} }
public void Append(Mesh newMesh) public void Append(Mesh newMesh)
{ {
foreach (Vertex v in newMesh.vertices) foreach (Vertex v in newMesh.vertices)

View File

@ -466,10 +466,10 @@ namespace OpenSim.Region.Physics.Meshing
// Deal with cuts now // Deal with cuts now
if ((profileBegin != 0) || (profileEnd != 0)) if ((profileBegin != 0) || (profileEnd != 0))
{ {
double fProfileBeginAngle = profileBegin/50000.0*360.0; double fProfileBeginAngle = profileBegin / 50000.0*360.0;
// In degree, for easier debugging and understanding // In degree, for easier debugging and understanding
fProfileBeginAngle -= (90.0 + 45.0); // for some reasons, the SL client counts from the corner -X/-Y fProfileBeginAngle -= (90.0 + 45.0); // for some reasons, the SL client counts from the corner -X/-Y
double fProfileEndAngle = 360.0 - profileEnd/50000.0*360.0; // Pathend comes as complement to 1.0 double fProfileEndAngle = 360.0 - profileEnd / 50000.0*360.0; // Pathend comes as complement to 1.0
fProfileEndAngle -= (90.0 + 45.0); fProfileEndAngle -= (90.0 + 45.0);
// avoid some problem angles until the hull subtraction routine is fixed // avoid some problem angles until the hull subtraction routine is fixed
@ -2024,7 +2024,6 @@ namespace OpenSim.Region.Physics.Meshing
if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0) if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0)
{ {
SculptMesh smesh = CreateSculptMesh(primName, primShape, size, lod); SculptMesh smesh = CreateSculptMesh(primName, primShape, size, lod);
mesh = (Mesh)smesh; mesh = (Mesh)smesh;
//CalcNormals(mesh); //CalcNormals(mesh);

View File

@ -81,9 +81,8 @@ namespace OpenSim.Region.Physics.Meshing
idata.Dispose(); idata.Dispose();
} }
} }
} }
private Vertex ColorToVertex(Color input) private Vertex ColorToVertex(Color input)
{ {
return new Vertex( return new Vertex(
@ -91,6 +90,7 @@ namespace OpenSim.Region.Physics.Meshing
((float)input.G - 128) / RANGE, ((float)input.G - 128) / RANGE,
((float)input.B - 128) / RANGE); ((float)input.B - 128) / RANGE);
} }
private void LoadPoles() private void LoadPoles()
{ {
northpole = new Vertex(0, 0, 0); northpole = new Vertex(0, 0, 0);
@ -144,6 +144,7 @@ namespace OpenSim.Region.Physics.Meshing
return lod; return lod;
} }
} }
private void DoLOD() private void DoLOD()
{ {
int x_max = Math.Min(Scale, bBitmap.Width); int x_max = Math.Min(Scale, bBitmap.Width);
@ -199,13 +200,14 @@ namespace OpenSim.Region.Physics.Meshing
} }
} }
public void clearStuff() public void clearStuff()
{ {
this.triangles.Clear(); this.triangles.Clear();
this.vertices.Clear(); this.vertices.Clear();
//normals = new float[0]; //normals = new float[0];
} }
public void processSculptTexture() public void processSculptTexture()
{ {
int x_max = Math.Min(Scale, bBitmap.Width); int x_max = Math.Min(Scale, bBitmap.Width);

View File

@ -1732,7 +1732,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[PHYSICS]: " + e.Message.ToString() + e.TargetSite.ToString()); m_log.ErrorFormat("[PHYSICS]: {0}, {1}, {2}", e.Message, e.TargetSite, e);
ode.dunlock(world); ode.dunlock(world);
} }