Same model, different OCAF file generated by Debug & Release Version?

Hi, everybody:

I have build the Debug version and Release version of my application. But there is a strange problem about the file format.
First I use debug version and release version to create a model file each, the two models in two files are totally same,
i.e. kind, size, etc. But I couldn't open file created with release version in a running debug version, and vice verse!

After adding some tracing statements, I find out that debug version application failed on TFunction_DriverTable::Get()->FindDriver(theDriverID, TFD) when it loads a file created by release version, but it can load the file created by debug version(i.e. itself) with the same model, and vice verse.

I have compared two files of five models created by debug version and release version with WinDiff and Cygwin diff tools, they both show as following:

diff Box.Debug Box.Release
> #10%10 11 0 0 0 0 10 14 11 0 0 0

diff Cone.Debug Cone.Release
> #10%10 12 12 0 0 0 0 14 0 0 0 0

diff Cylinder.Debug Cylinder.Release
> #10%10 12 12 0 0 0 0 0 65502 0 0 0

but Torus & Sphere model don't show any difference, so there is no problem on Torus/Sphere model files.

I don't know the meaning of OCAF text format, but their differences all occur on 10%10 may imply some clues.
Because I will program an application with bootstrap, i.e. the created model file will be an integral part of final application, so keep file format compiler-options indepent is very very important. Help me!


fhchina's picture

No one could answer it?

fhchina's picture


I have got the solution. In Debug & Release version, different compiler option may cause different data layout. And use Standard_GUID("MyDriver") as SampleOCAF may cause incorrect data to be included into it.

So different version will generate different Standard_GUID for same string.