View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029142 | Open CASCADE | OCCT:Application Framework | public | 2017-09-25 17:41 | 2018-06-29 21:19 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.3.0 | Fixed in Version | 7.3.0 | ||
Summary | 0029142: Exception on Redo | ||||
Description | Problem described in issue 0028946 is not actually fixed. Now it reproduces on Redo. This is due to the fact that deltas are applied in the order of attributes on the label, and not in the order of their real change. | ||||
Steps To Reproduce | static Standard_Integer TestRedo (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 (); aDoc->Redo (); return 0; } Test => ..\tests\bugs\caf\bug29142 | ||||
Tags | No tags attached. | ||||
Test case number | bugs caf bug29142 | ||||
related to | 0028946 | closed | bugmaster | Open CASCADE | Exception on Undo |
related to | 0029116 | closed | bugmaster | Community | [Regression] OCAF attributes insertion order is violated again |
related to | 0029531 | closed | bugmaster | Open CASCADE | Application Framework - Exception on Redo |
related to | 0029884 | closed | bugmaster | Community | Application Framework - Calling sequence of BeforeUndo() and AfterUndo() unpredictable |
|
So, here the any order of attributes could not help. It is proposed to process removed attributes (which will be created) after all other deltas processing. |
|
Branch CR29142 has been created by szy. SHA-1: 6b2c520f808bd38ec5b37291b91aa1ec03952b79 Detailed log of new commits: Author: szy Date: Thu Oct 12 15:53:27 2017 +0300 0029142: Exception on Redo. //Forgotten attribute status is taken into account. Author: szy Date: Thu Oct 12 15:43:08 2017 +0300 Merge branch 'master' of git.dev.opencascade.org:occt Author: szy Date: Tue Oct 3 16:23:37 2017 +0300 Merge branch 'master' of git.dev.opencascade.org:occt Author: szy Date: Thu Sep 28 18:19:56 2017 +0300 Merge branch 'master' of git.dev.opencascade.org:occt |
|
The issue is fixed by taken into account 'forgotten' status of the attribute. Review it, please. After I will check it with Jenkins. |
|
Branch CR29142 has been updated by szy. SHA-1: 22c7d0a5f3252f7f183ffba592e70f4e961ba358 Detailed log of new commits: Author: szy Date: Thu Oct 12 17:06:40 2017 +0300 0029142: Exception on Redo. //test case bugs/caf/bug29142. |
|
With this fix the following code throws no exception. pload ALL NewDocument D BinOcaf UndoLimit D 100 set Lab1 [Label D 0:1:1] NewCommand D SetInteger D $Lab1 111 NewCommand D ForgetAll D $Lab1 CommitCommand D SetInteger D $Lab1 222 Undo D However the "master" version does not allow having two attributes on one label. |
|
Branch CR29142_1 has been created by szy. SHA-1: e0faeec217ab9454f5273bbc4d9d65197cd75314 Detailed log of new commits: Author: szy Date: Wed Nov 15 17:38:48 2017 +0300 0029142: Exception on Redo. //Order of attributes deltas is fixed. Author: szy Date: Tue Nov 14 16:54:26 2017 +0300 Merge branch 'master' of git.dev.opencascade.org:occt Author: szy Date: Fri Oct 13 14:23:55 2017 +0300 Merge branch 'master' of git.dev.opencascade.org:occt |
|
The previous solution is changed to reordering of AttributesDeltas inside Delta. Review it, please. In addition to this I can propose an alternative solution too. |
|
The fix fixes the problem! Also, your idea to introduce a flag forbidding developers to delete and create the same attribute within one transaction seems reasonable too. In addition, seems useful to introduce a flag in TDF_Attribute, which allows the attribute to participate in transaction mechanism or not. By default, all attributes participate in undo/redo (no change for default behavior). But some special user-defined attributes might ignore the transactions... this flag might be very useful for such attributes, what do you think? |
|
About the flag to forbid delete and add attribute in one transaction: in complicated applications this may block development because different independent (and external, like XCAF) components may work one the same labels consequently in one transaction. Involving this flag only because of complexity of implementation in OCAF will casue searching workarounds for this limitation. Participation in transactions flag - I agree, this may be a good idea. Especially if this flag may be defined outside of the attribute (without needs of redefinition of attribute). |
|
I prefer to present the idea face to face to avoid useless writing. Let's meet next week and discuss the idea. |
|
Tested - http://jenkins-test-10.nnov.opencascade.com/view/CR29142-master/. |
|
Branch CR29142_1 has been updated by szy. SHA-1: 13dab595d386e5a3ceadbf574d1f9454c6c6429c Detailed log of new commits: Author: szy Date: Mon Nov 20 17:20:32 2017 +0300 0029142: Exception on Redo. //Removing extra qualifier Author: szy Date: Mon Nov 20 17:07:12 2017 +0300 Merge branch 'CR29142_1' of git.dev.opencascade.org:occt into CR29142_1 Author: szy Date: Wed Nov 15 17:38:48 2017 +0300 0029142: Exception on Redo. //Order of attributes deltas is fixed. Author: szy Date: Mon Nov 20 16:29:04 2017 +0300 Merge branch 'master' of git.dev.opencascade.org:occt |
|
Branch CR29142_2 has been created by szy. SHA-1: 459f0a36d6739a44b50b3bdf800f5668443d84dd Detailed log of new commits: Author: szy Date: Mon Nov 20 17:31:15 2017 +0300 0029142: Exception on Redo. ////Order of attributes deltas is fixed. |
|
Tested CR29142_2: => http://jenkins-test-10.nnov.opencascade.com/view/CR29142-master/. |
|
Combination - OCCT branch : CR29142_2 SHA-1: 459f0a36d6739a44b50b3bdf800f5668443d84dd Products branch : master was compiled on Linux, MacOS and Windows platforms and tested on optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Linux: OCCT Total CPU difference: 20586.690000000417 / 20649.13000000041 [-0.30%] Products Total CPU difference: 7907.560000000076 / 7869.380000000079 [+0.49%] Windows: OCCT Total CPU difference: 18327.231481498555 / 18333.206319798577 [-0.03%] Products Total CPU difference: 7829.846191000003 / 7930.73203769996 [-1.27%] Image differences : No differences that require special attention Memory differences : No differences that require special attention Test case is OK |
|
Branch CR29142_2 has been updated by szy. SHA-1: bd7a28bd4bca3d6b71fb7e203dbf12f65701bb8a Detailed log of new commits: Author: szy Date: Thu Nov 23 12:15:06 2017 +0300 0029142: Exception on Redo. //Fix of the warning for VStudio 2017. |
|
Branch CR29142 has been deleted by kgv. SHA-1: 22c7d0a5f3252f7f183ffba592e70f4e961ba358 |
|
Branch CR29142_1 has been deleted by kgv. SHA-1: 13dab595d386e5a3ceadbf574d1f9454c6c6429c |
|
Branch CR29142_2 has been deleted by kgv. SHA-1: bd7a28bd4bca3d6b71fb7e203dbf12f65701bb8a |
occt: master a7378539 2017-11-20 14:31:15
Committer: bugmaster Details Diff |
0029142: Exception on Redo. Order of attributes deltas is fixed. |
Affected Issues 0029142 |
|
mod - src/TDF/TDF_Data.cxx | Diff File | ||
mod - src/TDF/TDF_Data.hxx | Diff File | ||
mod - src/TDF/TDF_Delta.hxx | Diff File | ||
mod - src/TDF/TDF_Delta.lxx | Diff File | ||
add - tests/bugs/caf/bug29142 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-09-25 17:41 |
|
New Issue | |
2017-09-25 17:41 |
|
Assigned To | => mpv |
2017-09-25 17:41 |
|
Relationship added | related to 0028946 |
2017-09-25 17:42 |
|
Steps to Reproduce Updated | |
2017-10-03 14:39 |
|
Assigned To | mpv => vro |
2017-10-03 14:41 |
|
Note Added: 0071153 | |
2017-10-03 14:41 |
|
Status | new => assigned |
2017-10-03 14:45 |
|
Relationship added | related to 0029116 |
2017-10-12 15:53 | git | Note Added: 0071372 | |
2017-10-12 16:07 |
|
Note Added: 0071375 | |
2017-10-12 16:07 |
|
Assigned To | vro => mpv |
2017-10-12 16:07 |
|
Status | assigned => resolved |
2017-10-12 17:06 | git | Note Added: 0071379 | |
2017-10-16 09:23 |
|
Note Added: 0071509 | |
2017-10-16 09:23 |
|
Assigned To | mpv => szy |
2017-10-16 09:23 |
|
Status | resolved => assigned |
2017-11-15 17:39 | git | Note Added: 0072259 | |
2017-11-15 17:44 |
|
Note Added: 0072261 | |
2017-11-15 17:44 |
|
Assigned To | szy => mpv |
2017-11-15 17:44 |
|
Status | assigned => resolved |
2017-11-15 17:44 |
|
Steps to Reproduce Updated | |
2017-11-16 16:17 |
|
Assigned To | mpv => vro |
2017-11-17 09:31 | vro | Note Added: 0072307 | |
2017-11-17 09:31 | vro | Assigned To | vro => mpv |
2017-11-17 09:31 | vro | Status | resolved => reviewed |
2017-11-17 09:39 |
|
Note Added: 0072309 | |
2017-11-17 10:18 |
|
Note Added: 0072311 | |
2017-11-20 16:25 |
|
Note Added: 0072337 | |
2017-11-20 16:34 |
|
Assigned To | mpv => bugmaster |
2017-11-20 17:20 | git | Note Added: 0072340 | |
2017-11-20 17:31 | git | Note Added: 0072341 | |
2017-11-21 10:08 |
|
Note Added: 0072355 | |
2017-11-21 11:54 | bugmaster | Test case number | => bugs caf bug29142 |
2017-11-21 11:57 | bugmaster | Note Added: 0072358 | |
2017-11-21 11:57 | bugmaster | Status | reviewed => tested |
2017-11-21 11:58 | bugmaster | Note Edited: 0072358 | |
2017-11-23 12:15 | git | Note Added: 0072431 | |
2017-11-25 12:28 | bugmaster | Changeset attached | => occt master a7378539 |
2017-11-25 12:28 | bugmaster | Status | tested => verified |
2017-11-25 12:28 | bugmaster | Resolution | open => fixed |
2017-12-07 21:07 | git | Note Added: 0072793 | |
2017-12-07 21:07 | git | Note Added: 0072794 | |
2017-12-07 21:07 | git | Note Added: 0072795 | |
2018-02-20 12:58 |
|
Target Version | 7.4.0 => 7.3.0 |
2018-03-01 15:02 |
|
Relationship added | related to 0029531 |
2018-06-20 11:08 | Vico Liang | Relationship added | related to 0029884 |
2018-06-29 21:13 |
|
Fixed in Version | => 7.3.0 |
2018-06-29 21:19 |
|
Status | verified => closed |