Crash on ClearMeshes()

Tsynique

Addon Developer
Addon Developer
Joined
Jun 6, 2008
Messages
12
Reaction score
0
Points
0
Good day.

I have encountered a serious problem I cannot comprehend. My vessels initial visuals are loaded with AddMesh() function calls (5 meshes). During runtime the vessel has to load another mesh and after some time another one. However they are the same mesh file but must be at different vessel locations.

So, I load the first five meshes at startup. After some time I load the first additional mesh. All goes fine until press the I press the key that triggers the destruction of all previous meshes and attempts to load the second additional mesh along with the five initial meshes. What goes wrong is that I get a crash to desktop right before ClearMeshes() is executed. I have already debugged the case and I am certainly confident that it is ClearMeshes() to blame because if I comment it nothing bad happens except I see too many meshes on the screen.

Any help would be appreciated.

P.S. All the meshes are assign to its own animation. No parent/child animations, just plain linear ones.
P.S.S. I used AddMesh(char, VECTOR3) version all the time.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,642
Reaction score
2,357
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I remember a similar problem, but I don't know how I fixed it. I only remember that ClearMeshes was only the point where the module crashed, but not the cause.
 

no matter

Addon Developer
Addon Developer
Joined
Mar 20, 2008
Messages
61
Reaction score
0
Points
0
Website
pagesperso-orange.fr
May be you can try InsertMesh(MESHHANDLE, UINT index, _VECTOR3 *ofs=0) or
InsertMesh(const char *meshname,, UINT index, _VECTOR3 *ofs=0) and
DelMesh(UINT index, bool retain_anim=false), the problem may be related to a mesh in particular.

I prefer using meshes with index assigned, it is less confusing.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
*sigh* Can an admin remove the spammer bot?
 
Top