MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029142Open CASCADE[OCCT] OCCT:Application Frameworkpublic2017-09-25 17:412017-10-16 09:23
Reporterdbv 
Assigned Toszy 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.3.0*Fixed in Version 
Summary0029142: Exception on Redo
DescriptionProblem 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 Reproducestatic 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;
}
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0028946closedbugmaster Open CASCADE Exception on Undo 
related to 0029116assignedvro Community [Regression] OCAF attributes insertion order is violated again 

-  Notes
(0071153)
mpv (developer)
2017-10-03 14:41

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.
(0071372)
git (administrator)
2017-10-12 15:53

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
(0071375)
szy (developer)
2017-10-12 16:07

The issue is fixed by taken into account 'forgotten' status of the attribute.
Review it, please. After I will check it with Jenkins.
(0071379)
git (administrator)
2017-10-12 17:06

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.

(0071509)
mpv (developer)
2017-10-16 09:23

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.

- Issue History
Date Modified Username Field Change
2017-09-25 17:41 dbv New Issue
2017-09-25 17:41 dbv Assigned To => mpv
2017-09-25 17:41 dbv Relationship added related to 0028946
2017-09-25 17:42 dbv Steps to Reproduce Updated View Revisions
2017-10-03 14:39 mpv Assigned To mpv => vro
2017-10-03 14:41 mpv Note Added: 0071153
2017-10-03 14:41 mpv Status new => assigned
2017-10-03 14:45 mpv Relationship added related to 0029116
2017-10-12 15:53 git Note Added: 0071372
2017-10-12 16:07 szy Note Added: 0071375
2017-10-12 16:07 szy Assigned To vro => mpv
2017-10-12 16:07 szy Status assigned => resolved
2017-10-12 17:06 git Note Added: 0071379
2017-10-16 09:23 mpv Note Added: 0071509
2017-10-16 09:23 mpv Assigned To mpv => szy
2017-10-16 09:23 mpv Status resolved => assigned


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker