View Issue Details

IDProjectCategoryView StatusLast Update
0024047Open CASCADEOCCT:Visualizationpublic2013-12-19 13:58
ReportergkaAssigned Togka 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024047: Exception in TPrsStd_AISPresentation during destruction of TDocStd_Document
DescriptionDuring destruction of TDocStd_Document exception is raised in method TPrsStd_AISPresentation::AISErase() because TPrsStd_AISPresentation contains pointer on already destructed AIS_InteractiveContext.
Steps To ReproduceDraw command to reproduce this situation is added. Now it is possible to reproduce this situation in TestHarness by command:

box a 0 0 0 10 10 10
XTestDoc a

Or it is possible to make following sequence of actions:

 Handle(XCAFApp_Application) A = XCAFApp_Application::GetApplication();
 Handle(TDocStd_Document) aD1 = new TDocStd_Document("MDTV-XCAF");
 aD1->Open(A);
  
  Handle(V3d_Viewer) vw = ViewerTest_Tool::MakeViewer ("Test viwer");
  Handle(AIS_InteractiveContext) aContext = new AIS_InteractiveContext(vw);
  TPrsStd_AISViewer::New (aD1->Main(),aContext);
 
  Handle(XCAFDoc_ShapeTool) aShapes =
    XCAFDoc_DocumentTool::ShapeTool (aD1->Main());
  TDF_Label aLab = aShapes->AddShape(shape);
  
  Handle(TNaming_NamedShape) NS;
  Handle(TPrsStd_AISPresentation) prs;
  if( aLab.FindAttribute( TNaming_NamedShape::GetID(), NS) ) {
    prs = TPrsStd_AISPresentation::Set( NS );
  }
   
  if( aLab.FindAttribute(TPrsStd_AISPresentation::GetID(), prs) )
    prs->Display();
  

  TPrsStd_AISViewer::Update(aLab);

  Handle(TDocStd_Owner) owner;
  if (aD1->Main().Root().FindAttribute(TDocStd_Owner::GetID(), owner))
  {
    Handle_TDocStd_Document empty;
    owner->SetDocument(empty);
  }
  aContext.Nullify();
  aD1->Close();
  aD1.Nullify();
TagsNo tags attached.
Test case numberbugs caf(015) bug24047

Attached Files

  • bug24047.tcl (32 bytes)

Relationships

related to 0024007 closedRoman Lygin Community [Regression] Sporadic crashes when working with XDE documents 
related to 0024141 assignedvpozdyayev Open CASCADE Draw Harness, ViewerTest - AIS_InteractiveContext should be explicitly cleared before removal 
related to 0024164 closedbugmaster Open CASCADE Optimization of OCAF document closing 

Activities

gka

2013-06-26 12:16

developer   ~0024878

 Branch CR24047 is ready to be reviewed.

gka

2013-06-26 12:29

developer  

bug24047.tcl (32 bytes)

san

2013-06-26 15:55

developer   ~0024886

Branch CR24047 reviewed without remarks, ready for testing.

mkv

2013-06-27 09:51

tester   ~0024890

Dear BugMaster,

Branch CR24047 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: bb1cf86128f0db4da8fd73bae5dbe10db6552de3

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 7 (7 on master)

products component :
Linux: 0 (0 on master)
Windows: 63 (63 on master)

Regressions:
(Only on Linux)
http://occt-tests/CR24047-master-occt/Debian60-64/summary.html
3rdparty export(001) A2, A3, A4, A5, A6, A7
3rdparty fonts(002) A2, A3, A4, A5, A6
bugs vis(004) buc60814, bug128, bug21091_2, bug21091_4, bug21091_6, bug21091_7, bug21091_8, bug21091_9, bug23747_1
perf multi_mesh_selection(001) A1, A2, A3, A4, A5, A6
perf multi_mesh_shading(002) A1, A2, A3, A4, A5, A6, A7, A8
perf multi_mesh_shrink(003) A1, A2, A3, A4, A5, A6, A7, A8
perf multi_mesh_wireframe(004) A1, A2, A3, A4,A5, A6, A7, A8
perf multi_object_hlr(005) A1, A2, A3, A4, A5, A6, A7, A8
perf multi_object_selection(006) A1, A2, A3, B1, B2, B3, B4, B5, B6, D1, D2, D3
perf multi_object_shading(007) A1, A2, A3, A4, A5, A6, A7, A8
perf multi_object_wireframe(008) A1, A2, A3, A4, A5, A6, A7, A8, A1, A3, A4, A5, A6
perf single_mesh_shading(010) A1, A2, A3, A4, A5, A6
perf single_mesh_shrink(011) A1, A2, A3, A4, A5, A6, A7
perf single_mesh_wireframe(012) A1, A2, A3, A5, A7, A8
perf single_object_hlr(013) A3, A4, A5, A7
perf single_object_selection(014) A1, A2, B2, D1, D3
perf single_object_shading(015) A2, A3, A5
perf single_object_wireframe(016) A1, A3, A4, A5

Improvements:
No improvements

Testing cases:
bugs caf(015) bug24047 - BAD; it is necessary to correct return value of XTestDoc draw-commnad

Testing on Linux:
Total MEMORY difference: 362699244 / 362790964
Total CPU difference: 44049.06000000094 / 48002.090000000884

Testing on Windows:
Total MEMORY difference: 422179236 / 423696892
Total CPU difference: 42311.28125 / 37862.03125

There are not differences in images found by testdiff.

gka

2013-06-28 15:33

developer   ~0024914

Branch 24047 was updated. Method of AIS_Trihedron::SetContext() is modified.
Branch 24047 is ready to be reviewed.

san

2013-06-28 18:00

developer   ~0024916

Branch CR24047 reviewed without remarks, ready for testing.

mkv

2013-07-02 14:13

tester   ~0024941

Dear BugMaster,

Branch CR24047 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 102fb9d92b43a7bd8c6c095766ac3ad8ff1e86f9

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 7 (7 on master)

products component :
Linux: 0 (0 on master)
Windows: 63 (63 on master)

Regressions:
http://occt-tests/CR24047-master-occt/Debian60-64/summary.html
3rdparty export(001) A2, A3, A4, A6, A7
bugs vis(004) buc60814, bug61, bug22368

Improvements:
No improvements

Testing cases:
bugs caf(015) bug24047 - BAD; it is necessary to correct return value of XTestDoc draw-commnad

Testing on Linux:
Total MEMORY difference: 366027224 / 366074120
Total CPU difference: 42683.43000000068 / 43399.41000000103

Testing on Windows:
Total MEMORY difference: 408308652 / 412106936
Total CPU difference: 40789.3125 / 43448.234375

There are following differences in images found by testdiff.
http://occt-tests/CR24047-master-occt/Debian60-64/diff-Debian60-64.html
IMAGE bugs vis buc60818: buc60818_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug223: bug22332_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug22332: bug22332_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug5988: bug5988_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug23652: bug23652_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug21091_2: bug21091_2_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug21091_4: bug21091_4_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug21091_5: bug21091_5_Driver1_Viewer1_View1.png differs
....

gka

2013-07-12 12:24

developer   ~0025051

Branch CR24047 is ready to be reviewed

san

2013-07-12 16:46

developer   ~0025054

Branch CR24047 reviewed without remarks, ready for testing.

kgv

2013-07-12 21:42

developer   ~0025056

Dear gka,

the following changes look redundant since both NULL check and nullifying are performed inside method OpenGl_Element::Destroy() by design.
- OpenGl_Element::Destroy (theCtx, myTrihedron);
- OpenGl_Element::Destroy (theCtx, myGraduatedTrihedron);
+ if( myTrihedron != NULL)
+ {
+ OpenGl_Element::Destroy (theCtx, myTrihedron);
+ myTrihedron =NULL;
+ }

apn

2013-07-16 14:36

administrator   ~0025081

Dear BugMaster,

Branch CR24047 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 114a9945f9cb65029fb551e4f4c97957d1f917db

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 8 (8 on master)

products component :
Linux: 0 (0 on master)
Windows: 63 (63 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs caf(015) bug24047 - OK

Testing on Linux:
Total MEMORY difference: 365488972 / 365745120
Total CPU difference: 48747.20000000101 / 45334.67000000106

Testing on Windows:
Total MEMORY difference: 424293672 / 426125448
Total CPU difference: 34421.28125 / 35067.859375

There are not differences in images found by testdiff.

san

2013-07-16 19:19

developer   ~0025086

Branch CR24047 has been updated (the last remark taken into account), could you please re-test it?

mkv

2013-07-18 10:58

tester   ~0025107

Dear BugMaster,

Branch CR24047 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: f6ebb6e52b79b856a8ca11b52479428bb4063caa

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 1768 (1767 on master)

products component :
Linux: 0 (0 on master)
Windows: 288 (288 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs caf(015) bug24047 - OK

Testing on Linux:
Total MEMORY difference: 355156632 / 437029128
Total CPU difference: 35781.970000000656 / 130364.23999999979

Testing on Windows:
Total MEMORY difference: 424385864 / 426119972
Total CPU difference: 35690.859375 / 31424.28125

There are not differences in images found by testdiff.

Related Changesets

occt: master da0e82aa

2013-07-18 09:16:35

gka

Details Diff
0024047: Exception in TPrsStd_AISPresentation during destruction of TDocStd_Document

Adding test case for this fix
Modification in order to avoid exception during destruction of AIS_InteractiveContext
Small modification for trihedron
Small modifications to avoid regressions
Cosmetic modification
Affected Issues
0024047
mod - src/AIS/AIS_InteractiveContext.cxx Diff File
mod - src/AIS/AIS_InteractiveObject.cxx Diff File
mod - src/AIS/AIS_Trihedron.cxx Diff File
mod - src/OpenGl/OpenGl_View.cxx Diff File
mod - src/TPrsStd/TPrsStd_AISPresentation.cxx Diff File
mod - src/XDEDRAW/XDEDRAW.cxx Diff File
add - tests/bugs/caf/bug24047 Diff File

Issue History

Date Modified Username Field Change
2013-06-26 11:58 gka New Issue
2013-06-26 11:58 gka Assigned To => gka
2013-06-26 12:02 gka Summary Exception in TPrsStd_AISPresentation during destruction of TPrsStd_AISPresentation. => Exception in TPrsStd_AISPresentation during destruction of TDocStd_Document
2013-06-26 12:16 gka Note Added: 0024878
2013-06-26 12:16 gka Assigned To gka => san
2013-06-26 12:16 gka Status new => resolved
2013-06-26 12:19 gka Relationship added related to 0024007
2013-06-26 12:29 gka File Added: bug24047.tcl
2013-06-26 15:55 san Note Added: 0024886
2013-06-26 15:55 san Assigned To san => bugmaster
2013-06-26 15:55 san Status resolved => reviewed
2013-06-26 16:37 mkv Assigned To bugmaster => mkv
2013-06-27 09:51 mkv Note Added: 0024890
2013-06-27 09:52 mkv Test case number => bugs caf(015) bug24047
2013-06-27 09:52 mkv Assigned To mkv => gka
2013-06-27 09:52 mkv Status reviewed => assigned
2013-06-28 15:33 gka Note Added: 0024914
2013-06-28 15:33 gka Status assigned => resolved
2013-06-28 15:34 gka Assigned To gka =>
2013-06-28 15:34 gka Assigned To => san
2013-06-28 18:00 san Note Added: 0024916
2013-06-28 18:00 san Assigned To san => bugmaster
2013-06-28 18:00 san Status resolved => reviewed
2013-07-01 15:43 mkv Assigned To bugmaster => mkv
2013-07-02 14:13 mkv Note Added: 0024941
2013-07-02 14:14 mkv Assigned To mkv => gka
2013-07-02 14:14 mkv Status reviewed => assigned
2013-07-12 12:21 gka Status assigned => resolved
2013-07-12 12:24 gka Assigned To gka => san
2013-07-12 12:24 gka Note Added: 0025051
2013-07-12 16:46 san Note Added: 0025054
2013-07-12 16:46 san Assigned To san => bugmaster
2013-07-12 16:46 san Status resolved => reviewed
2013-07-12 21:42 kgv Note Added: 0025056
2013-07-15 15:23 apn Assigned To bugmaster => apn
2013-07-16 14:36 apn Note Added: 0025081
2013-07-16 14:36 apn Assigned To apn => bugmaster
2013-07-16 14:36 apn Status reviewed => tested
2013-07-16 19:19 san Note Added: 0025086
2013-07-16 19:19 san Status tested => feedback
2013-07-17 10:37 mkv Assigned To bugmaster => mkv
2013-07-18 10:58 mkv Note Added: 0025107
2013-07-18 10:59 mkv Assigned To mkv => bugmaster
2013-07-18 10:59 mkv Status feedback => tested
2013-07-19 13:33 gka Changeset attached => occt master da0e82aa
2013-07-19 13:33 gka Assigned To bugmaster => gka
2013-07-19 13:33 gka Status tested => verified
2013-07-19 13:33 gka Resolution open => fixed
2013-09-03 16:45 kgv Relationship added related to 0024141
2013-10-02 15:52 abv Relationship added related to 0024164
2013-12-19 13:52 bugmaster Status verified => closed
2013-12-19 13:58 bugmaster Fixed in Version => 6.7.0