View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0028946 | Open CASCADE | OCCT:Application Framework | public | 2017-07-25 11:05 | 2018-04-03 12:27 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | major | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.2.0 | Fixed in Version | 7.2.0 | ||
Summary | 0028946: Exception on Undo | ||||
Description | Exception (Standard_DomainError: This label has already such an attribute) raised when trying to Undo changes done by XCAFDoc_DimTolTool::SetDimension (const TDF_Label &theL, const TDF_Label &theDimTolL) It seems that one of the delta is lost or they applying in the wrong order. | ||||
Steps To Reproduce | static Standard_Integer TestUndo (Draw_Interpretor& theDI, Standard_Integer theArgC, const char** theArgV) { Handle (TDocStd_Application) anApp = DDocStd::GetApplication (); Handle (TDocStd_Document) aDoc; anApp->NewDocument ("BinOcaf", aDoc); aDoc->SetUndoLimit (1); STEPCAFControl_Reader Reader; Reader.ReadFile ("D:/nist_ctc_02_asme1_ap242-2.stp"); Reader.Transfer (aDoc); TDF_Label aShL, aDL; TDF_Tool::Label (aDoc->GetData(), "0:1:1:2:672", aShL); TDF_Tool::Label (aDoc->GetData (), "0:1:4:10", aDL); aDoc->OpenCommand (); Handle (XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool (aDoc->Main ()); aDimTolTool->SetDimension (aShL, aDL); aDoc->CommitCommand (); aDoc->Undo (); return 0; } Added testing script caf/bugs/E1 | ||||
Tags | No tags attached. | ||||
Test case number | caf bugs E1 | ||||
related to | 0028908 | closed | bugmaster | Open CASCADE | Improvement on attachment of attributes to the label |
related to | 0028973 | closed | bugmaster | Open CASCADE | Undo/Redo changes the order of some attributes |
related to | 0029116 | closed | bugmaster | Community | [Regression] OCAF attributes insertion order is violated again |
related to | 0029142 | closed | bugmaster | Open CASCADE | Exception on Redo |
related to | 0029531 | closed | bugmaster | Open CASCADE | Application Framework - Exception on Redo |
child of | 0024755 | closed | Community | TDF_Label::AddAttribute() reverses the order of added attributes |
2017-07-25 11:05 developer |
nist_ctc_02_asme1_ap242-2.stp (3,611,524 bytes) |
|
Simpler test case: static Standard_Integer TestUndo (Draw_Interpretor& theDI, Standard_Integer theArgC, const char** theArgV) { Handle (TDocStd_Application) anApp = DDocStd::GetApplication (); Handle (TDocStd_Document) aDoc; anApp->NewDocument ("BinOcaf", aDoc); TDataStd_Integer::Set (aDoc->Main (), 1); TDataStd_Real::Set (aDoc->Main (), 1); aDoc->SetUndoLimit (1); aDoc->OpenCommand (); aDoc->Main ().ForgetAttribute (TDataStd_Integer::GetID ()); TDataStd_Integer::Set (aDoc->Main (), 1); aDoc->CommitCommand (); aDoc->Undo (); return 0; } |
|
It seems it will be fixed with 0028908 issue fix. |
|
In my opinion patch for the issue 0028908 will not fix described problem. As I understood from the description it only adds possibility to choose where to add the attribute. To the top of the list or to the end. So this patch will only fix default scenarios, when new attribute prepends to the list. But as there is a possibility to add attribute to the end of the list the problem can be easily reproduced. |
|
Without the fix of CR28908 the draw-command TestUndo crashes, having applied the patch it prints: Draw[2]> testundo Report : 43 unknown entities. I think it is much better than a crash :-). What do you think? |
|
So, this bug is fixed by the fix in 28908. Anyway, it is worth to prepare a unit-test based on simplified scenario provided by dbv in order to avoid such problem in the future. |
|
Branch CR28946 has been created by szy. SHA-1: e23218080b7c3a9c0c1d1bc28bde7317cd499a3a Detailed log of new commits: Author: szy Date: Tue Aug 1 18:31:33 2017 +0300 0028946: Exception on Undo. //Added additional command ForgetAtt and test case E1 to test issue 28946. |
|
Review it, please. |
|
Branch CR28946 has been updated forcibly by inv. SHA-1: e16302cee1fb8fe3bd5ec293fb1a4d5f0d871955 |
|
CR28946 has been rebased on current master. Testing CR28946 has been started on jenkins-test-10. |
|
Result of testing on jenkins-test-10: http://jenkins-test-10.nnov.opencascade.com:8080/view/CR28946-master/view/ALL/ |
|
Combination - OCCT branch : CR28946 ; SHA1 : e16302cee1fb8fe3bd5ec293fb1a4d5f0d871955 Products branch : master was compiled on Linux, MacOS and Windows platforms and tested on optimize mode. Number of compiler warnings: OCCT : Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) Products : Linux: 5 (5 on master) Windows: 0 (0 on master) MacOS : 0 (0 on master) Regressions/Differences/Improvements: No regressions/differences CPU differences: No differences that required special attention Image differences : No differences that required special attention Memory differences : No differences that required special attention Testing cases are OK: http://occt-tests/CR28946-master-OCCT/Debian70-64/caf/bugs/E1.html http://occt-tests/CR28946-master-OCCT/Windows-64-VC10/caf/bugs/E1.html |
|
Branch CR28946 has been deleted by kgv. SHA-1: e16302cee1fb8fe3bd5ec293fb1a4d5f0d871955 |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-07-25 11:05 |
|
New Issue | |
2017-07-25 11:05 |
|
Assigned To | => mpv |
2017-07-25 11:05 |
|
File Added: nist_ctc_02_asme1_ap242-2.stp | |
2017-07-25 11:06 |
|
Severity | minor => major |
2017-07-25 12:11 |
|
Note Added: 0068663 | |
2017-07-25 13:33 |
|
Assigned To | mpv => vro |
2017-07-25 13:33 |
|
Relationship added | related to 0028908 |
2017-07-25 13:34 |
|
Note Added: 0068669 | |
2017-07-25 14:12 |
|
Note Added: 0068673 | |
2017-08-01 10:10 | vro | Note Added: 0069006 | |
2017-08-01 10:26 |
|
Note Added: 0069008 | |
2017-08-01 11:00 | vro | Assigned To | vro => szy |
2017-08-01 11:17 |
|
Status | new => assigned |
2017-08-01 18:32 | git | Note Added: 0069038 | |
2017-08-01 18:34 |
|
Note Added: 0069039 | |
2017-08-01 18:34 |
|
Assigned To | szy => vro |
2017-08-01 18:34 |
|
Status | assigned => resolved |
2017-08-01 18:34 |
|
Steps to Reproduce Updated | |
2017-08-02 07:10 | vro | Assigned To | vro => bugmaster |
2017-08-02 07:10 | vro | Status | resolved => reviewed |
2017-08-02 18:15 | git | Note Added: 0069064 | |
2017-08-02 18:15 | bugmaster | Note Added: 0069065 | |
2017-08-02 19:51 | bugmaster | Test case number | => caf bugs E1 |
2017-08-03 09:57 |
|
Note Added: 0069079 | |
2017-08-03 17:12 | bugmaster | Note Added: 0069091 | |
2017-08-03 17:12 | bugmaster | Status | reviewed => tested |
2017-08-07 08:43 | vro | Relationship added | related to 0028973 |
2017-08-11 07:52 | bugmaster | Changeset attached | => occt master e16302ce |
2017-08-11 07:52 | bugmaster | Status | tested => verified |
2017-08-11 07:52 | bugmaster | Resolution | open => fixed |
2017-08-18 17:00 | git | Note Added: 0069641 | |
2017-09-15 14:53 |
|
Relationship added | related to 0029116 |
2017-09-15 15:26 |
|
Relationship added | child of 0024755 |
2017-09-25 17:41 |
|
Relationship added | related to 0029142 |
2017-09-29 16:17 |
|
Fixed in Version | => 7.2.0 |
2017-09-29 16:24 |
|
Status | verified => closed |
2018-03-01 15:03 |
|
Relationship added | related to 0029531 |