[cgma-dev] cgm-cubit on 32 bit machine
Iulian Grindeanu
iulian at mcs.anl.gov
Fri Jul 1 09:49:43 CDT 2011
Hi Jane,
I am trying to use cgm, cubit version on my laptop, and there is a crash when running
testgeom tridata1.cub.
This affects other tests in meshkit, which use cubit files as geometry sources.
The memory becomes corrupted (in the debugger) right when CCubitFile is instantiated
( NCubitFile::CCubitFile ccf;) , line 6360.
A variable that holds the string values for file types is defined above.
const char *model_type_str[6] = {"", "ACIS_SAT", "", "FACET", "", "GRANITE"};
After passing over ( NCubitFile::CCubitFile ccf;) in the debugger, model_type_str is corrupted.
Maybe tmpnam use is what causes the problem (some say that tmpnam should never be used on linux) I tried something else (like a hard-coded tmp file name) and it did not fix it. So I think we can rule out tmpnam.
Anyway, if I just declare a "buffer" after the file definition, like in
NCubitFile::CCubitFile ccf;
int buff[10]= {0};buff[1] =0;
the memory does not get corrupted, and testgeom tridata1.cub finishes fine.
So I am wondering if it is something wrong in CCubitFile object/constructor that corrupts the memory.
This does not show up on a 64 bit machine;
Any suggestions?
Iulian
More information about the cgma-dev
mailing list