Problem with loading .nxs

TheBlindMaster

22-03-2009 22:54:25

Hi,

I've got a little problem loading .nxs files here it is:

when I do the following line :
NxOgre::Resources::ResourceSystem::getSingleton()->addMeshAs("file://Mesh.mesh", "meshtest-convex");

I've traced the entire code, and found out that it stops there :
BETAJAEN_CC_INLINE TypePtr Get(IdentifierType identifier)
{
return _Tree->Find(identifier);
}


because _Tree = ?????? (not defined)

identifier == "file" when the function is called.

It gives me an error that looks like :

Unhandled exception at 0x0083a060 (NxOgre_d.dll) in test.exe : 0xC0000005: Access violation while reading 0x00000018.

(wich is quite "normal" if _Tree isn't defined and this is (this.. as in this->getSomething) 0x00000018)

I'm pretty clueless about the error... and the why is it. thanks for your help

P.S.: (I've made the fixes in NxOgreMesh)

betajaen

22-03-2009 23:15:18

But the file extension is ".mesh", are you sure it's a NXS mesh, and not an Ogre one?

TheBlindMaster

22-03-2009 23:23:04

Well.. that, was a typing error (since I've tried different path.. ) but the Mesh.nxs (wich I've got from using flour) is in the application folder.

thanks.

Edit: but what is exactly _Tree??


Edit2: that's ok.. it just seem that I was loading the file too soon.. but still I've got another error. I'll detail it on a later post.

TheBlindMaster

22-03-2009 23:39:05

So,

now it crashes at
mShapeDescription.meshData = mMesh->mMesh.mConvexMesh;

with mMesh->mMesh.mConvexMesh being undefined

thanks again.

but I think I've seen this somewhere.. I'm gonna look out for this

betajaen

23-03-2009 00:21:50

If your using Bleeding and the "T" versions, make sure you've implemented that mesh bug fix.

TheBlindMaster

23-03-2009 00:29:34

Strange I've added the :

mMesh.zero();

and

mMaterialAlias = 0;

and it gives me the error...quite strange isn't it?

TheBlindMaster

23-03-2009 23:35:13

ok, now it fails differently... I'm getting

Unhandled exception at 0x00887ffb in test.exe : 0xC0000005: Access violation while reading location 0xcdcdcdd1.

the error happens on the line
NxOgre::Actor *body = mNxScene->createActor("convex-test1", new Convex("meshtest-convex"), pos);

when I debug in more detail, I can see that it happens just after all the parametter have been "called", the line where it bug is memcpy(dst, src, count); in memcpy_s.c. but I suppose that the problem happens before that, but VC++ doesn't give me more details about it.

thanks.