[cgma-dev] [MOAB-dev] Problems with ReadCGM

Steve Jackson sjackson at cae.wisc.edu
Tue Oct 27 11:51:59 CDT 2009


The backtrace is suspicious.  The error message comes from the  
following context:

(gdb) bt
#0  0x00007f776266b54b in AcisQueryEngine::get_BODY ()
    from /home/cnerg/opt/cubit10.2/64/bin/libcubiti19.so
#1  0x00007f77626757dc in AcisQueryEngine::rotate ()
    from /home/cnerg/opt/cubit10.2/64/bin/libcubiti19.so
#2  0x0000000000510a21 in ReadCGM::load_file (this=0x1191790,
     cgm_file_name=0x57335c "out.sat", opts=@0x7fff6bdce050,  
subset_list=0x0,
     subset_list_length=0, file_id_tag=0x0) at ../../code/ReadCGM.cpp: 
393
#3  0x000000000041c74c in MBCore::serial_load_file (this=0x118f2d0,
     file_name=0x57335c "out.sat", file_set=@0x7fff6bdce0e8,
     opts=@0x7fff6bdce050, subsets=0x0, num_sets=0, id_tag=0x0)
     at ../../code/MBCore.cpp:442
#4  0x000000000041cb88 in MBCore::load_file (this=0x118f2d0,
     file_name=0x57335c "out.sat", file_set=@0x7fff6bdce0e8,
     options=0x57335b "", set_tag_name=0x0, set_tag_vals=0x0,
     num_set_tag_vals=0) at ../../code/MBCore.cpp:411
#5  0x0000000000410b51 in main () at test.cpp:18

Stack frame #2 is the get_graphics call:
393	    CubitStatus s = gqe->get_graphics( curve, count, &data,  
faceting_tol);

So it seems like AcisQueryEngine::rotate() is being called instead of  
AcisQueryEngine::get_graphics().  These are both virtual functions  
within GeometryQueryEngine, so it's possible that there's some vtable  
corruption, but I'm not sure how to deal with that.

For what it's worth, I'm compiling on a 64-bit host using gcc 4.3.2.   
Cubit is 64-bit version 10.2.  Could this be related to the MOAB-CGM  
coupling issues being discussed on the cgm mailing list right now?
~S


On Oct 26, 2009, at 10:07 PM, Tim Tautges wrote:

> This might be related to calling the wrong overloaded function in  
> CGM, for get_graphics or something related to it.
>
> Could you run the cubit-based code under gdb, stop in  
> GeometryQueryEngine::get_graphics (all instances, if multiple), and  
> print a stack trace?  That would help determine which variants are  
> being called on the way down to the function.
>
> - tim
>
> Steve Jackson wrote:
>> I have an issue with ReadCGM that's been puzzling me for a couple  
>> of days.  Perhaps someone on this list can help me determine the  
>> problem.
>> Below is a simple program that loads an acis .sat geometry into  
>> MOAB.  When MOAB is compiled with an acis-based CGM, the code below  
>> works fine.  However, when MOAB is compiled against a cubit-based  
>> CGM, the code below fails.
>>> #include "MBCore.hpp"
>>> #include <iostream>
>>>
>>> int main(){
>>>
>>>  MBErrorCode rval;
>>>  MBEntityHandle file_set;
>>>  MBCore* MBI = new MBCore();
>>>
>>>  rval = MBI->load_file("geom.sat", file_set, "", NULL, 0, 0);
>>>  if (MB_SUCCESS != rval) {
>>>    std::cerr << "Couldn't read file. " << std::endl;
>>>    return rval;
>>>  }
>>>
>>>  return 0;
>>> }
>> The initial failure occurs in ReadCGM::load_file, at line 393 of  
>> ReadCGM.cpp.  The first call to gqe->get_graphics() produces an  
>> error message (below) and returns failure.  This in turn causes  
>> ReadCGM::load_file() to fail.
>> The error message produced within the get_graphics() call is:
>>> ERROR: In AcisQueryEngine::get_Body
>>>       Body is not a BodyACIS.
>> Note that get_graphics() is being called with a Curve object, not a  
>> Body.
>> The error happens predictably and seems to occur with any .sat file  
>> I provide.  My CGM is built against Cubit 10.22, and MOAB is the  
>> latest revision from SVN.  I also tried compiling MOAB with svn  
>> revision 3005, just before the last major revision to ReadCGM.cpp,  
>> but got the same error.
>> Has anyone encountered this issue before?
>> Thanks,
>> ~S
>
> -- 
> ================================================================
> "You will keep in perfect peace him whose mind is
>  steadfast, because he trusts in you."               Isaiah 26:3
>
>             Tim Tautges            Argonne National Laboratory
>         (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
>         phone: (608) 263-8485      1500 Engineering Dr.
>           fax: (608) 263-4499      Madison, WI 53706
>



More information about the cgma-dev mailing list