I bet that there's a reference problem on one of the sub-objects in the
object you created in your importer.    If, for example, you DXNewArray to
create an Array object, then DXAddComponentValue to stick it into a field
as, say, a positions component, and then DXDelete the array, the field will
contain a hanging reference to the array.  Everything will look fine until
you try to traverse the field - and then it'll crash with a segfault when
the positions component of the field is extracted and used as an address.
The thing to keep in mind that objects are created with a ref count of
zero, and deleted when the decremented refcount is <= 0.  In the above
example, the caller should not have deleted the Array.  Its ownership of
the Array was handed to the field. I find this counterintuitive; I'd prefer
that we'd opted to create with a ref count of 1 and have to explicitly
delete after sticking it into the field, but this was deemed to be likely
to result in memory leaks.

I'd compile debuggable and run it; it ought to be fairly obvious what the
offending object is.

Greg


                                                                                
                                                         
                      Randall Hopper                                            
                                                         
                      <[EMAIL PROTECTED]>              To:       
[email protected]                                  
                      Sent by:                             cc:                  
                                                         
                      [EMAIL PROTECTED]        Subject:  [opendx-users] Re: 
SIG11's in Modules                               
                      son.ibm.com                                               
                                                         
                                                                                
                                                         
                                                                                
                                                         
                      07/29/2002 01:26 PM                                       
                                                         
                      Please respond to                                         
                                                         
                      opendx-users                                              
                                                         
                                                                                
                                                         
                                                                                
                                                         



Mike H. Miller:
 |I'm having trouble with one of my modules crashing with a signal 11
 |whenever data that it imports is used. It seems to read it just fine,
 |but if I try and PRINT it, or process it in any other way, the module
 |crashes. The addition of some DXMessage statements shows that it appears
 |to be running just fine. The other odd thing is that a print with just
 |an "o" option works, but "rd" fails. Any ideas?

Sounds like one of your members or components could be invalid.  If this is
a field, try specifying component names as the third argument to Print
(with "rd" or rD" as the second arg) to limit printing data for just one
component at a time.  Change the component name until it blows up.  Are you
calling DXEndField in your module, and checking for errors from DX API
calls?

Randy

--
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA N127-01; RTP, NC 27711




Reply via email to