MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024406Open CASCADE[OCCT] OCCT:Visualizationpublic2013-11-27 11:342016-12-23 21:24
Reporterkgv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.4.2 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0024406: Visualization - crash on re-usage of the same primitive array
DescriptionOpenGl_PrimitiveArray releases memory of primitive arrays allocated by Graphic3d_ArrayOfPrimitives when VBO is used.

This is both undocumented (see Graphic3d_Group::AddPrimitiveArray()) and undesired behavior.

Memory management of Graphic3d_ArrayOfPrimitives arrays should be re-designed.
Steps To Reproduce
Handle(Graphic3d_ArrayOfSegments) aLines = new Graphic3d_ArrayOfSegments (2);
aLines->AddVertex (0.0f, 0.0f, 0.0f);
aLines->AddVertex (1.0f, 0.0f, 0.0f);
Handle(Graphic3d_Group) aGroup1 = Prs3d_Root::CurrentGroup (thePrs);
Handle(Graphic3d_Group) aGroup2 = Prs3d_Root::NewGroup     (thePrs);
aGroup1->AddPrimitiveArray (aLines);
aGroup2->AddPrimitiveArray (aLines);
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0024534closedabv Improve design of Image_PixMap class 
related to 0027172closedabv Visualization - avoid signed integer overflow within Graphic3d_ArrayOfPrimitives 
related to 0028276closedapn Visualization, Graphic3d_ArrayOfPrimitives - fix usage of 16-bit indices 
child of 0023117closedbugmaster TKV3d and TKOpenGl code clean-up 

-  Notes
(0028811)
kgv (developer)
2014-04-13 21:33

Patch is ready for review in branch CR24406_2.
(0028828)
apl (developer)
2014-04-14 18:19

Dear Bugmaster,

The branch is reviewed - no remarks, please test.
(0028871)
mkv (tester)
2014-04-16 12:58

Dear BugMaster,

Branch CR24406_2 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 603be6175269e69ce75cb16beb97722add6de0b9

Number of compiler warnings:

occt component :
Linux: 20 (18 on master)
Windows: 0 (0 on master)
MacOS: 413 (413 on master)

There are new additional compilation warnings on Linux platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR24406_2-master_build_occt_linux/1/warnings16Result/package.-133837126/ [^]
OpenGl_PrimitiveArray.cxx:404, GNU C Compiler 4 (gcc), Priority: Normal
‘aNbComp’ may be used uninitialized in this function

OpenGl_PrimitiveArray.cxx:565, GNU C Compiler 4 (gcc), Priority: Normal
‘aNbComp’ may be used uninitialized in this function

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:


Testing on Linux:
Total MEMORY difference: 352389164 / 352653700
Total CPU difference: 52229.749999999956 / 67343.38000000024

Testing on Windows:
Total MEMORY difference: 381245372 / 380703700
Total CPU difference: 36185.5 / 39760.09375

There are no differences in images found by testdiff.
(0028872)
mkv (tester)
2014-04-16 12:59

Dear kgv,
"thePrs" variable is not defined in "Steps To Reproduce".
(0028883)
kgv (developer)
2014-04-16 16:15

Patch has been updated with warning fix - check compilation, no need to re-perform tests.

>> "thePrs" variable is not defined in "Steps To Reproduce".
This is code quotation for overridden method AIS_InteractiveObject::Compute() of custom object. There is no need to create test case for this issue.

- Related Changesets
occt: master 871fa103
Timestamp: 2014-04-17 14:01:04
Author: kgv
Committer: apn
Details ] Diff ]
0024406: Visualization - crash on re-usage of the same primitive array

Redesign Graphic3d_ArrayOfPrimitives
Store vertices data in buffer objects managed using smart-pointers
- no more low-level memory corruption by memory releasing after VBO creation.
Remove broken hasEdgeInfos.

Interleave vertex attributes (position, color, normal, uv) in single buffer.
Remove from Graphic3d_ArrayOfPrimitives methods ::Orientate().
Remove structures Graphic3d_PrimitiveArray, CALL_DEF_PARRAY.
Add support for 2D vertex arrays.

Graphic3d_Group - remove array or primitive arrays.
Introduce more universal method Graphic3d_Group::AddPrimitiveArray().

Fix warning
mod - src/AIS/AIS_Triangulation.cxx Diff ] File ]
mod - src/Graphic3d/FILES Diff ] File ]
mod - src/Graphic3d/Graphic3d.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPoints.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPolygons.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPolygons.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPolylines.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPolylines.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfQuadrangles.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfQuadrangles.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfQuadrangleStrips.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfSegments.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfTriangleFans.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfTriangles.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfTriangles.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ArrayOfTriangleStrips.cxx Diff ] File ]
add - src/Graphic3d/Graphic3d_BoundBuffer.hxx Diff ] File ]
add - src/Graphic3d/Graphic3d_Buffer.hxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_GraphicDriver.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_Group.cdl Diff ] File ]
mod - src/Graphic3d/Graphic3d_Group.cxx Diff ] File ]
add - src/Graphic3d/Graphic3d_IndexBuffer.hxx Diff ] File ]
mod - src/InterfaceGraphic/FILES Diff ] File ]
mod - src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx Diff ] File ]
rm - src/InterfaceGraphic/InterfaceGraphic_PrimitiveArray.hxx Diff ] File ]
mod - src/NCollection/NCollection_Vec4.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_CappingAlgo.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_GraphicDriver.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Group.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Group.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_SceneGeometry.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_VertexBuffer.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_VertexBuffer.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace_Raytrace.cxx Diff ] File ]
mod - src/StdPrs/StdPrs_ShadedShape.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-11-27 11:34 kgv New Issue
2013-11-27 11:34 kgv Assigned To => san
2013-11-27 11:42 kgv Assigned To san => kgv
2013-11-27 11:42 kgv Status new => assigned
2014-03-29 10:49 kgv Relationship added child of 0023117
2014-03-29 18:52 kgv Relationship added related to 0024534
2014-04-04 18:09 abv Target Version 6.7.1 => 6.8.0
2014-04-13 21:33 kgv Note Added: 0028811
2014-04-13 21:33 kgv Assigned To kgv => apl
2014-04-13 21:33 kgv Status assigned => resolved
2014-04-14 18:19 apl Note Added: 0028828
2014-04-14 18:19 apl Assigned To apl => bugmaster
2014-04-14 18:19 apl Status resolved => reviewed
2014-04-14 19:28 mkv Assigned To bugmaster => mkv
2014-04-16 12:58 mkv Note Added: 0028871
2014-04-16 12:59 mkv Note Added: 0028872
2014-04-16 12:59 mkv Assigned To mkv => kgv
2014-04-16 12:59 mkv Status reviewed => assigned
2014-04-16 16:15 kgv Note Added: 0028883
2014-04-16 16:15 kgv Assigned To kgv => bugmaster
2014-04-16 16:15 kgv Status assigned => resolved
2014-04-16 16:19 kgv Status resolved => reviewed
2014-04-17 17:59 apn Test case number => Not needed
2014-04-17 17:59 apn Status reviewed => tested
2014-04-18 16:02 apn Changeset attached => occt master 871fa103
2014-04-18 16:02 apn Assigned To bugmaster => apn
2014-04-18 16:02 apn Status tested => verified
2014-04-18 16:02 apn Resolution open => fixed
2014-11-11 12:47 aiv Fixed in Version => 6.8.0
2014-11-11 12:52 aiv Status verified => closed
2016-02-17 17:39 kgv Relationship added related to 0027172
2016-12-23 21:24 kgv Relationship added related to 0028276


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker