Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004704opensim[REGION] Physics Enginespublic2010-05-10 18:212012-05-25 18:57
Reportergreg0254 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0004704: Sculpted Prim ODE Physics Meshing error message flooding
DescriptionAfter updating from GIT 9ecebcdf13dd to 739b5e2c08a7, when I bring up several of my regions, it begins spitting out the following error message over and over again after region startup is complete, flooding the console and the opensim.log file:

2010-05-10 20:30:45,903 ERROR - OpenSim.Region.Physics.OdePlugin.OdeScene.Tara [PHYSICS]: Caught exception processing byte arrays in SculptMap(): e: System.ArgumentOutOfRangeException: Parameter must be positive and < Width.
Parameter name: x
   at System.Drawing.Bitmap.GetPixel(Int32 x, Int32 y)
   at PrimMesher.SculptMap..ctor(Bitmap bm, Int32 lod), Void .ctor(System.Drawing.Bitmap, Int32), System.Exception: Caught exception processing byte arrays in SculptMap(): e: System.ArgumentOutOfRangeException: Parameter must be positive and < Width.
Parameter name: x
   at System.Drawing.Bitmap.GetPixel(Int32 x, Int32 y)
   at PrimMesher.SculptMap..ctor(Bitmap bm, Int32 lod)
   at PrimMesher.SculptMap..ctor(Bitmap bm, Int32 lod)
   at PrimMesher.SculptMesh._SculptMesh(Bitmap sculptBitmap, SculptType sculptType, Int32 lod, Boolean viewerMode, Boolean mirror, Boolean invert)
   at OpenSim.Region.Physics.Meshing.Meshmerizer.CreateMeshFromPrimMesher(String primName, PrimitiveBaseShape primShape, Vector3 size, Single lod)
   at OpenSim.Region.Physics.Meshing.Meshmerizer.CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, Single lod, Boolean isPhysical)
   at OpenSim.Region.Physics.OdePlugin.OdePrim.changeadd(Single timestep)
   at OpenSim.Region.Physics.OdePlugin.OdePrim.ProcessTaints(Single timestep)
   at OpenSim.Region.Physics.OdePlugin.OdeScene.Simulate(Single timeStep)

After it appeared, this message continued to repeat itself ad infinitum, coming so fast that I was barely able to type a quit command to shut down the region.

Nothing has changed in any of my regions since I had been running the previous GIT release (739b5e2c08a7), and I was not getting this error previously when starting the regions. A few of my other regions started up successfully with the latest GIT.

Not sure what I should be looking for to determine what is causing this. I know that the asset table was revised since the previous GIT that I was running. Let me know what other info I can provide to help diagnose the problem.
TagsNo tags attached.
Git Revision or version number739b5e2c08a7
Run Mode Grid (1 Region per Sim)
Physics EngineODE
Script Engine
Environment.NET / Windows32
Mono VersionNone
Viewer
Attached Files

- Relationships
parent of 0005094closedkenvc 0.7.1 Continual spewing of exception processing byte arrays in SculptMap() System.ArgumentOutOfRangeException 

-  Notes
(0015446)
greg0254 (reporter)
2010-05-10 19:47

It looks like the message is coming from SculptMap.cs, based on changes made in GIT release 5d1e9947ed43 on 5/7 (Sculpt meshing refactoring - improves mesh accuracy and UV mapping)
(0015447)
greg0254 (reporter)
2010-05-12 01:08

After restoring my database and backtracking versions, I have confirmed that this starts happening with eb6d63ab8ee1 (tag 12723, "improve handling of undersize sculpt textures").

I am running opensim on a Windows platform with a MySQL database.
(0015449)
greg0254 (reporter)
2010-05-12 14:37

I upgraded to GIT 739b5e2c08a7 (tag 12740), backed out the changes to SculptMap.cs introduced by GIT eb6d63ab8ee1 (tag 12723), and recompiled. I am no longer getting the error message, and all regions start up normally.

Obviously this is a workaround and not a fix. The problem may be the result of a malformed sculpty texture in my asset table, but regardless it should only produce a single error message, not an endless barrage of messages.
(0015456)
greg0254 (reporter)
2010-05-13 11:26

In an attempt to provide some useful information about this error, I restored the current SculptMap.cs file and modified the error message to show the values of key variables, then recompiled. Here is the modified error message:

Exception: System.Exception: Caught exception processing byte arrays in SculptMap(): x=16 bmX=32 bmY=0 width=32 e: System.ArgumentOutOfRangeException: Parameter must be positive and < Width.
Parameter name: x
   at System.Drawing.Bitmap.GetPixel(Int32 x, Int32 y)
   ...

The error occurs within a "try" block around line 105 of SculptMap.cs, in which x is looped from 0 to width, and y is looped from 0 to height. The if statement around line 112 uses a conditional operator to calculate the value of bmX:
    int bmX = x < width ? x * 2 : x * 2 - 1;
The modified error message shows that x=16, so bmX will evaluate to 32, which equals the width, hence the error. Any subsequent values of x from 17 to 32 would also result in the same error.

I'm not sure how to interpret this, whether it is a coding logic error or a problem with my database, but I wanted to provide the info.
(0015458)
Teravus (administrator)
2010-05-13 16:09

(Updated title, looks like this is meshing related)
(0017855)
kenvc (reporter)
2011-01-14 15:27

Too bad this can't be fixed in the dev master as long as the issue has been around.
(0021546)
justincc (administrator)
2012-05-25 18:57

Is this still occurring?

- Issue History
Date Modified Username Field Change
2010-05-10 18:21 greg0254 New Issue
2010-05-10 18:21 greg0254 Git Revision => 739b5e2c08a7
2010-05-10 18:21 greg0254 SVN Revision => 0
2010-05-10 18:21 greg0254 Run Mode => Grid (1 Region per Sim)
2010-05-10 18:21 greg0254 Physics Engine => ODE
2010-05-10 18:21 greg0254 Environment => .NET / Windows32
2010-05-10 18:21 greg0254 Mono Version => None
2010-05-10 19:47 greg0254 Note Added: 0015446
2010-05-12 01:08 greg0254 Note Added: 0015447
2010-05-12 14:37 greg0254 Note Added: 0015449
2010-05-13 11:26 greg0254 Note Added: 0015456
2010-05-13 15:55 greg0254 Severity minor => major
2010-05-13 15:55 greg0254 Reproducibility have not tried => always
2010-05-13 15:55 greg0254 Product Version => master (dev code)
2010-05-13 16:09 Teravus Note Added: 0015458
2010-05-13 16:09 Teravus Summary ODE Physics error message flooding => Sculpted Prim ODE Physics Meshing error message flooding
2011-01-05 15:28 kenvc Relationship added parent of 0005094
2011-01-14 15:27 kenvc Note Added: 0017855
2012-05-25 18:57 justincc Note Added: 0021546


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker