Ignore:
Timestamp:
09/30/16 15:28:05 (5 years ago)
Author:
rlacroix
Message:

Fix a possible crash caused by an infinite recursion.

The way virtual groups were handled could cause id clashes which lead to have groups containing themselves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/grid.cpp

    r943 r957  
    3636      , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_() 
    3737   { 
    38      setVirtualDomainGroup(); 
    39      setVirtualAxisGroup(); 
    40      setVirtualScalarGroup(); 
     38     setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group")); 
     39     setVirtualAxisGroup(CAxisGroup::create(getId() + "_virtual_axis_group")); 
     40     setVirtualScalarGroup(CScalarGroup::create(getId() + "_virtual_scalar_group")); 
    4141   } 
    4242 
     
    5454      , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_() 
    5555   { 
    56      setVirtualDomainGroup(); 
    57      setVirtualAxisGroup(); 
    58      setVirtualScalarGroup(); 
     56     setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group")); 
     57     setVirtualAxisGroup(CAxisGroup::create(getId() + "_virtual_axis_group")); 
     58     setVirtualScalarGroup(CScalarGroup::create(getId() + "_virtual_scalar_group")); 
    5959   } 
    6060 
     
    14821482   } 
    14831483 
    1484    //---------------------------------------------------------------- 
    1485    //! Create virtual field group, which is done normally on initializing file 
    1486    void CGrid::setVirtualDomainGroup(void) 
    1487    { 
    1488       this->setVirtualDomainGroup(CDomainGroup::create()); 
    1489    } 
    1490  
    1491    //! Create virtual variable group, which is done normally on initializing file 
    1492    void CGrid::setVirtualAxisGroup(void) 
    1493    { 
    1494       this->setVirtualAxisGroup(CAxisGroup::create()); 
    1495    } 
    1496  
    1497    //! Create virtual variable group, which is done normally on initializing file 
    1498    void CGrid::setVirtualScalarGroup(void) 
    1499    { 
    1500       this->setVirtualScalarGroup(CScalarGroup::create()); 
    1501    } 
    1502  
    15031484   /*! 
    15041485   \brief Send a message to create a domain on server side 
Note: See TracChangeset for help on using the changeset viewer.