MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029116Community[OCCT] OCCT:Application Frameworkpublic2017-09-15 12:122018-06-23 13:56
ReporterRoman Lygin 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029116: [Regression] OCAF attributes insertion order is violated again
Description7.2.0 has introduced a regression reported as 0024755 and which was fixed in 6.8.0.
The following test case failed when running under 7.2.0:

/*! Regression test for id 24755.*/
void TDF_LabelTest::AddAttribute()
{
    Handle(TDocStd_Application) anApp = new AppStdL_Application;
    Handle(TDocStd_Document) aDoc;
    anApp->NewDocument ("MDTV-Standard", aDoc);
    TDF_Label aLab = aDoc->Main();
    TDataStd_Integer::Set (aLab, 0);
    TDataStd_Name::Set (aLab, "test");

    Standard_Boolean anIsInteger = Standard_True, anIsName = Standard_True;

#if OCC_VERSION_HEX > 0x060701
    TDF_AttributeIterator i (aLab);
    Handle(TDF_Attribute) anAttr = i.Value();
    anIsInteger = anAttr->IsKind (STANDARD_TYPE (TDataStd_Integer));
    i.Next();
    anAttr = i.Value();
    anIsName = anAttr->IsKind (STANDARD_TYPE (TDataStd_Name));
#endif
    //defer check to after close
    anApp->Close (aDoc);
    QVERIFY (anIsInteger);
    QVERIFY (anIsName);
}

Steps To ReproduceSee description
TagsNo tags attached.
Test case numbercaf/basic/B8
Attached Files

- Relationships
related to 0024755closedmpv Community TDF_Label::AddAttribute() reverses the order of added attributes 
related to 0028908closedbugmaster Open CASCADE Improvement on attachment of attributes to the label 
related to 0028946closedbugmaster Open CASCADE Exception on Undo 
related to 0029142closedbugmaster Open CASCADE Exception on Redo 

-  Notes
(0070587)
mpv (developer)
2017-09-15 14:55

Fix of 24755 produced regression 28946, whis is why it was rolled-back.
(0070589)
mpv (developer)
2017-09-15 15:19

"Undo" functionality is based on reversed order of attributes on the label: it adds/removes attributes in the reversed order they were removed/added.

So, this problem has the higher piority than request 24755. Also, changing "undo" algorithm will poduce loss of performance.

Anyway, developer may use the append flag of TDF_Label::AddAttribute to reproduce the needed order. But in this case he must be sure that he does not remove and then add attribute to the same label in the same transactio. Otherwise this may cause crash on "Undo".
(0070593)
mpv (developer)
2017-09-15 15:38

Ok, after some discussions it is decided to think again about this problem. May be the order of attributes may be reverted during open or save of the document to keep the document's content same each time. Perhaps performance become not so bad.
(0071154)
mpv (developer)
2017-10-03 14:44

Due to 29142 probably the order of appended attributes may be restored.
(0076570)
git (administrator)
2018-06-04 10:47

Branch CR29116 has been created by vro.

SHA-1: 2625fc09b4bdb8eb425ec6d0e517dc2145c4fe33


Detailed log of new commits:

Author: vro
Date: Mon Jun 4 10:47:18 2018 +0300

    0029116: [Regression] OCAF attributes insertion order is violated again
(0076588)
vro (developer)
2018-06-04 14:27

Dear Sergey, could you review please?: http://jenkins-test-11.nnov.opencascade.com/view/CR29116-master-vro/view/TESTING/. [^] There is some instability in jenkins in strtod() and reading DXF test-cases, ignore please.
(0076590)
szy (administrator)
2018-06-04 14:50

Reviewed.
(0076598)
bugmaster (administrator)
2018-06-04 18:02

Combination -
OCCT branch : CR29116 SHA - 2625fc09b4bdb8eb425ec6d0e517dc2145c4fe33
Products branch : master SHA - 82570c1f4b0e27eb09789f573087eef089260f59
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 17096.14999999993 / 17011.039999999866 [+0.50%]
Products
Total CPU difference: 7487.140000000035 / 7518.570000000041 [-0.42%]
Windows-64-VC10:
OCCT
Total CPU difference: 16816.970200398548 / 16821.806231398525 [-0.03%]
Products
Total CPU difference: 8228.771948199888 / 8176.012409999883 [+0.65%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0076894)
git (administrator)
2018-06-23 13:56

Branch CR29116 has been deleted by kgv.

SHA-1: 2625fc09b4bdb8eb425ec6d0e517dc2145c4fe33

- Related Changesets
occt: master bd6f0d2f
Timestamp: 2018-06-04 07:47:18
Author: vro
Committer: bugmaster
Details ] Diff ]
0029116: [Regression] OCAF attributes insertion order is violated again
mod - src/QABugs/QABugs_19.cxx Diff ] File ]
mod - src/TDF/TDF_Label.hxx Diff ] File ]
mod - tests/caf/basic/B8 Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-09-15 12:12 Roman Lygin New Issue
2017-09-15 12:12 Roman Lygin Assigned To => mpv
2017-09-15 12:12 Roman Lygin Relationship added related to 0024755
2017-09-15 14:52 mpv Relationship added related to 0028908
2017-09-15 14:53 mpv Relationship added related to 0028946
2017-09-15 14:55 mpv Note Added: 0070587
2017-09-15 15:13 mpv Status new => resolved
2017-09-15 15:13 mpv Resolution open => won't fix
2017-09-15 15:13 mpv Status resolved => reviewed
2017-09-15 15:19 mpv Note Added: 0070589
2017-09-15 15:38 mpv Note Added: 0070593
2017-09-15 15:38 mpv Status reviewed => assigned
2017-10-03 14:43 mpv Assigned To mpv => vro
2017-10-03 14:44 mpv Note Added: 0071154
2017-10-03 14:45 mpv Relationship added related to 0029142
2018-04-03 12:26 vro Relationship added related to 0029669
2018-06-04 10:47 git Note Added: 0076570
2018-06-04 14:27 vro Note Added: 0076588
2018-06-04 14:27 vro Assigned To vro => szy
2018-06-04 14:27 vro Status assigned => resolved
2018-06-04 14:50 szy Note Added: 0076590
2018-06-04 14:50 szy Assigned To szy => bugmaster
2018-06-04 14:50 szy Status resolved => reviewed
2018-06-04 17:00 bugmaster Test case number => caf/basic/B8
2018-06-04 18:02 bugmaster Note Added: 0076598
2018-06-04 18:02 bugmaster Status reviewed => tested
2018-06-14 18:20 bugmaster Changeset attached => occt master bd6f0d2f
2018-06-14 18:20 bugmaster Status tested => verified
2018-06-14 18:20 bugmaster Resolution won't fix => fixed
2018-06-23 13:56 git Note Added: 0076894


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker