Sign in to follow this  
Krohm

Messed up compiles, different sub-field offsets

Recommended Posts

Krohm    5030

I don't really know where to look to fix this. Perhaps I should set a higher verbosity level?

So I checked project settings... they seem compatible. But maybe I've missed something. I guess so.

Or maybe I'm compiling against the wrong runtime in different packages? It seems not...

 

Ok, first thing first. While in the process of a bug hunt I have (I admit it has been a terrible idea) integrated AssImp in VC2012 build toolchain. Now I cannot get a correct executable. It compiles and it runs up to a certain point but then runs utterly amok.

Sometimes it seems to work with a full rebuild, but more often than not, it doesn't.

 

Problem is as follows. In the AssImp package,

[attachment=13068:AssImp_ok.png]

So my understanding is the following. Structure dstMesh begins at SOME_ADDRESS. The pointer mFaces is stored at SOME_ADDRESS+124.

AssImp works as intended. The shaded lines of code were added by me.

The size of an aiMesh structure is 1176 bytes.

Seems legit.

 

Now let's get to my code. So there could be anything going on as it's a different project.

[attachment=13069:Filter_wrong.png]

So sure I have messed up packing settings somehow.

I'm not even sure I've looked at them correctly. Perhaps I should look for pragmas.

Pointer size appears coherent.

I'm thinking about dumping offsets for all sub-fields and check the first difference in the hope to gain some insight on what's going on. I thought it might be a pointer-size difference but it's both 4 bytes.

 

Sure it's a project setting to double check. Or a defined macro? Where would you look?

Share this post


Link to post
Share on other sites
Krohm    5030

Ok, for future reference in case anyone has similar problems.

It turns out that the project being built was still using the previous library version. Besides some minimal difference, the libraries were source-compatible and apparently link-compatible as well.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this