View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027604 | Open CASCADE | OCCT:Application Framework | public | 2016-06-14 18:28 | 2016-12-09 16:38 |
Reporter | kgv | Assigned To | apn | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.0.0 | ||||
Target Version | 7.1.0 | Fixed in Version | 7.1.0 | ||
Summary | 0027604: Application Framework - memory is not released after closing XBF file | ||||
Description | BinLDrivers_DocumentRetrievalDriver uses BinMNaming_NamedShapeDriver, which creates map of shapes. While reading XBF file this map is filled up, however after reading is done the map is still there and even closing the document does not release the memory. The following code can be found in some applications as a workaround, but it can not be justified: class CustomDriver : public BinXCAFDrivers_DocumentRetrievalDriver { public: virtual void Read (Standard_IStream& theIStream, const Handle(Storage_Data)& theStorageData, const Handle(CDM_Document)& theDoc, const Handle(CDM_Application)& theApplication) { BinLDrivers_DocumentRetrievalDriver::Read (theIStream, theStorageData, theDoc, theApplication); if (!myDrivers.IsNull()) { Handle(BinMDF_ADriver) aDriver; myDrivers->GetDriver (STANDARD_TYPE(TNaming_NamedShape), aDriver); Handle(BinMNaming_NamedShapeDriver) aShapesDriver = Handle(BinMNaming_NamedShapeDriver)::DownCast (aDriver); if (!aShapesDriver.IsNull()) { aShapesDriver->Clear(); } } | ||||
Steps To Reproduce | bugs caf bug27604 | ||||
Tags | No tags attached. | ||||
Test case number | bugs caf bug27604 | ||||
|
Branch CR27604 has been created by mpv. SHA-1: 555868e314dc991061fbfedafb48e94b4ad7ee24 Detailed log of new commits: Author: mpv Date: Wed Oct 12 11:02:02 2016 +0300 Application Framework - memory is not released after closing XBF file |
|
Patch is ready for review. Branch CR27604. |
|
- Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(CDM_MessageDriver)& theMsgDriver) Standard_OVERRIDE; + Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers(const Handle(CDM_MessageDriver)& theMsgDriver) Standard_OVERRIDE; - Standard_EXPORT virtual void ReadShapeSection (BinLDrivers_DocumentSection& theSection, Standard_IStream& theIS, const Standard_Boolean isMess = Standard_False) Standard_OVERRIDE; + Standard_EXPORT virtual void ReadShapeSection(BinLDrivers_DocumentSection& theSection, Standard_IStream& theIS, const Standard_Boolean isMess = Standard_False) Standard_OVERRIDE; - Standard_EXPORT virtual void CheckShapeSection (const Storage_Position& thePos, Standard_IStream& theIS) Standard_OVERRIDE; + Standard_EXPORT virtual void CheckShapeSection(const Storage_Position& thePos, Standard_IStream& theIS) Standard_OVERRIDE; Please avoid mixing cosmetic and functional changes within the same patch. Note that this bracket spacing change contradicts to recommended coding style - see chapter "Separating spaces" and related code samples: https://dev.opencascade.org/doc/overview/html/occt_dev_guides__coding_rules.html#occt_coding_rules_3 |
|
Branch CR27604 has been updated by mpv. SHA-1: d9ab5b14589f85c0af6f0c9522cb40d599f7c787 Detailed log of new commits: Author: mpv Date: Wed Oct 12 14:48:50 2016 +0300 Roll back of cosmetic changes |
|
Reviewed. |
|
Dear mpv, could you please rebase branch CR27604 on current master, there are conflict files. SHA-1: d9ab5b14589f85c0af6f0c9522cb40d599f7c787 |
|
Branch CR27604_1 has been created by mpv. SHA-1: 4ac5e2b9ce5a90539961d4e07cd5ab431051edbd Detailed log of new commits: Author: mpv Date: Wed Oct 12 11:02:02 2016 +0300 Application Framework - memory is not released after closing XBF file Author: mpv Date: Wed Oct 12 14:48:50 2016 +0300 Roll back of cosmetic changes |
|
The rebased branch CR27604_1 is created. |
|
Dear BugMaster, Branch CR27604_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: 4ac5e2b9ce5a90539961d4e07cd5ab431051edbd Number of compiler warnings: occt component : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) products component : Linux: 64 (64 on master) Windows: 0 (0 on master) MacOS : 1136 Regressions/Differences/Improvements: No regressions/differences Testing cases: http://occt-tests/CR27604_1-master-OCCT/Debian70-64/bugs/caf/bug27604.html http://occt-tests/CR27604_1-master-OCCT/Windows-64-VC10/bugs/caf/bug27604.html bugs caf bug27604: OK Testing on Linux: occt component : Total MEMORY difference: 90594299 / 90590165 [+0.00%] Total CPU difference: 19445.61999999991 / 19464.819999999938 [-0.10%] products component : Total MEMORY difference: 30069952 / 30069397 [+0.00%] Total CPU difference: 5301.37999999998 / 5271.849999999968 [+0.56%] Testing on Windows: occt component : Total MEMORY difference: 57228459 / 57250244 [-0.04%] Total CPU difference: 18863.204117198624 / 18101.186032498666 [+4.21%] products component : Total MEMORY difference: 21302935 / 21265221 [+0.18%] Total CPU difference: 5502.560872599972 / 5148.189000999964 [+6.88%] There are no differences in images found by testdiff. |
|
Dear BugMaster, Branch CR27604_1 is TESTED. |
|
Branch CR27604 has been deleted by kgv. SHA-1: d9ab5b14589f85c0af6f0c9522cb40d599f7c787 |
|
Branch CR27604_1 has been deleted by kgv. SHA-1: 4ac5e2b9ce5a90539961d4e07cd5ab431051edbd |
occt: master bf954475 2016-10-20 13:26:25
Committer: apn Details Diff |
0027604: Application Framework - memory is not released after closing XBF file Virtual method *BinLDrivers_DocumentRetrievalDriver::Clear* now allows to Clear a cash data accumulated during a reading. So, in successor class BinDrivers_DocumentRetrievalDriver this allows clearing the BinMNaming_NamedShapeDriver set of stored shapes when it is not needed anymore. |
Affected Issues 0027604 |
|
mod - src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx | Diff File | ||
mod - src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx | Diff File | ||
mod - src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx | Diff File | ||
mod - src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx | Diff File | ||
add - tests/bugs/caf/bug27604 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-06-14 18:28 | kgv | New Issue | |
2016-06-14 18:28 | kgv | Assigned To | => mpv |
2016-10-12 11:02 | git | Note Added: 0058602 | |
2016-10-12 11:11 |
|
Steps to Reproduce Updated | |
2016-10-12 11:12 |
|
Note Added: 0058604 | |
2016-10-12 11:12 |
|
Assigned To | mpv => szy |
2016-10-12 11:12 |
|
Status | new => resolved |
2016-10-12 14:18 | kgv | Note Added: 0058615 | |
2016-10-12 14:55 | git | Note Added: 0058616 | |
2016-10-13 18:17 |
|
Note Added: 0058686 | |
2016-10-13 18:17 |
|
Assigned To | szy => bugmaster |
2016-10-13 18:17 |
|
Status | resolved => reviewed |
2016-10-13 18:41 |
|
Assigned To | bugmaster => mkv |
2016-10-14 15:01 |
|
Note Added: 0058730 | |
2016-10-14 15:01 |
|
Assigned To | mkv => mpv |
2016-10-14 15:01 |
|
Status | reviewed => feedback |
2016-10-14 15:51 | git | Note Added: 0058740 | |
2016-10-14 15:57 |
|
Note Added: 0058741 | |
2016-10-14 15:57 |
|
Assigned To | mpv => mkv |
2016-10-14 15:57 |
|
Status | feedback => reviewed |
2016-10-17 13:02 |
|
Note Added: 0058782 | |
2016-10-17 13:03 |
|
Note Added: 0058783 | |
2016-10-17 13:03 |
|
Assigned To | mkv => bugmaster |
2016-10-17 13:03 |
|
Status | reviewed => tested |
2016-10-17 13:03 |
|
Test case number | => bugs caf bug27604 |
2016-10-21 11:25 | apn | Changeset attached | => occt master bf954475 |
2016-10-21 11:25 | apn | Assigned To | bugmaster => apn |
2016-10-21 11:25 | apn | Status | tested => verified |
2016-10-21 11:25 | apn | Resolution | open => fixed |
2016-10-28 21:41 | git | Note Added: 0059438 | |
2016-10-28 21:41 | git | Note Added: 0059439 | |
2016-12-09 16:30 |
|
Status | verified => closed |
2016-12-09 16:38 |
|
Fixed in Version | => 7.1.0 |