Ticket #236 (closed defect: fixed)
Crash/Assert when loading 3ds model
| Reported by: | pjakobs@… | Owned by: | admin |
|---|---|---|---|
| Priority: | major | Milestone: | Version 1.0.1 |
| Component: | other plugins | Version: | V1.0 |
| Keywords: | 3ds | Cc: |
Description (last modified by res) (diff)
When loading the attached world with walktest, the application crashes while loading the embedded 3ds model.
Windows XP, Visual Studio 8.0, CS 1.0 (Debug build), Intel 82915G Express
It think the size of the index buffer in the code below is too small. Multiplying its size by 3 seems to do the trick. I don't have time to have a good look at it. Somebody more familiar with the code might have a look at it.
gmesh3ds.cpp, line: 388
csRef<iRenderBuffer> indexBuffer = csRenderBuffer::CreateIndexRenderBuffer (
materials_and_tris[j].tris.GetSize(), CS_BUF_STATIC,
CS_BUFCOMP_UNSIGNED_INT, 0, gmstate->GetVertexCount() - 1);
{
csRenderBufferLock<uint> indices (indexBuffer);
csTriangle* tris = gmstate->GetTriangles();
for (size_t i = 0; i < materials_and_tris[j].tris.GetSize(); i++)
{
uint tri = materials_and_tris[j].tris[i];
*indices++ = tris[tri].a;
*indices++ = tris[tri].b;
*indices++ = tris[tri].c;
}
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

