MantisBT - Open CASCADE
View Issue Details
0032331Open CASCADE[OCCT] OCCT:VISpublic2021-04-26 14:092021-07-07 09:47
anv 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 7.5.3 
[OCCT] 7.6.0* 
Not required
0032331: VIS - Exception when trying to display some surfaces using iVtk with VTK 9
Visualization of some surfaces (such as Sphere, Torus, Cone with apex) leads to an exception, when trying to display it via iVtk. This problem appeared after upgrade to VTK 9, cause vtkPolyData and vtkCellData were strongly reworked.

Problem is located in IVtkTools_SubPolyDataFilter::RequestData(), and is caused by incorrect memory allocation in anOutput->Allocate(anInput, anIdList->GetNumberOfIds()) with an exception in anOutput->CopyCells (anInput, anIdList) when trying to insert a cell to unallocated array.

It seems this is a REGRESSION in VTK itself caused by incorrect rounding math.
One of similar references:
https://gitlab.kitware.com/vtk/vtk/-/issues/18184 [^]
pload MODELING VIS
sphere s 100
mkface f s
ivtkinit
ivtkdisplay f
No tags attached.
related to 0032252new kgv VIS - running IVtk built with VTK 9 leads to runtime exceptions 
Issue History
2021-04-26 14:09anvNew Issue
2021-04-26 14:09anvAssigned To => anv
2021-04-26 14:11anvNote Added: 0100593
2021-04-26 14:14anvNote Edited: 0100593bug_revision_view_page.php?bugnote_id=100593#r25106
2021-04-26 14:18kgvRelationship addedrelated to 0032252
2021-04-26 20:58anvNote Added: 0100603
2021-04-27 21:50anvNote Added: 0100627
2021-04-28 19:02gitNote Added: 0100643
2021-04-28 19:31kgvNote Added: 0100644
2021-04-29 18:38gitNote Added: 0100671
2021-04-29 19:15anvNote Added: 0100674
2021-04-29 19:17anvNote Added: 0100675
2021-04-30 11:54gitNote Added: 0100692
2021-04-30 15:09gitNote Added: 0100699
2021-04-30 15:20anvNote Added: 0100700
2021-04-30 15:20anvAssigned Toanv => kgv
2021-04-30 15:20anvStatusnew => resolved
2021-04-30 15:27kgvAssigned Tokgv => bugmaster
2021-04-30 15:27kgvStatusresolved => reviewed
2021-04-30 16:18gitNote Added: 0100701
2021-05-01 12:29bugmasterNote Added: 0100725
2021-05-01 12:29bugmasterStatusreviewed => tested
2021-05-01 12:41bugmasterTest case number => Not required
2021-05-01 12:44bugmasterChangeset attached => occt master 2c276f91
2021-05-01 12:44bugmasterStatustested => verified
2021-05-01 12:44bugmasterResolutionopen => fixed
2021-05-01 13:32gitNote Added: 0100733
2021-05-01 13:32gitNote Added: 0100734
2021-06-24 10:47kgvCategoryOCCT:Visualization => OCCT:VIS
2021-06-24 10:47kgvSummaryVisualization - Exception when trying to display some surfaces using iVtk with VTK 9 => VIS - Exception when trying to display some surfaces using iVtk with VTK 9
2021-06-24 10:53bugmasterProjectInternal => Open CASCADE
2021-07-07 09:47kgvDescription Updatedbug_revision_view_page.php?rev_id=25447#r25447
2021-07-07 09:47kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25449#r25449

Notes
(0100593)
anv   
2021-04-26 14:11   
(edited on: 2021-04-26 14:14)
Analysis / Solution implementation / Testing

For week 16

(0100603)
anv   
2021-04-26 20:58   
Testing
(0100627)
anv   
2021-04-27 21:50   
Testing
(0100643)
git   
2021-04-28 19:02   
Branch CR32331 has been created by anv.

SHA-1: 828128e65e458a66bae6b15bfb64a7b252b68d54


Detailed log of new commits:

Author: anv
Date: Tue Apr 27 21:33:54 2021 +0300

    0032331: Visualization - Exception when trying to display some surfaces using iVtk with VTK 9
    
    Updated memory allocation for vtkPolyData to use more suited method for VTK versions after 9.0
(0100644)
kgv   
2021-04-28 19:31   
+#if (VTK_MAJOR_VERSION > 8)

'VTK_MAJOR_VERSION >= 9' would look more clear.
(0100671)
git   
2021-04-29 18:38   
Branch CR32331 has been updated forcibly by anv.

SHA-1: 96ac6a5070521af82c7f372e80b3e5a18ee55df3
(0100674)
anv   
2021-04-29 19:15   
Testing
(0100675)
anv   
2021-04-29 19:17   
Testing
(0100692)
git   
2021-04-30 11:54   
Branch CR32331 has been updated forcibly by anv.

SHA-1: 6ea6d794852d29f31a6100c1c78a51ee1bf16f94
(0100699)
git   
2021-04-30 15:09   
Branch CR32331 has been updated forcibly by anv.

SHA-1: cf1a065b79445946a13bd55a04920fdb00d60ed9
(0100700)
anv   
2021-04-30 15:20   
Memory allocation for VTK versions 9 and above was updated according to changes in vtkPolyData.
Build/test results for Windows can be found at
http://jenkins-test-occt/view/CR32331-master-vtk9/ [^]
Unfortunately VTK 9 fails to be built on jenkins, seems like it has some issues with Debian 8. Igor was able to build it manually on Debian 10 and all tests went fine. Customer behind this issue uses Debian 10, so this should suffice.
(0100701)
git   
2021-04-30 16:18   
Branch CR32331_750 has been created by anv.

SHA-1: 1b13b5cd9c0143f40a85da833e3a40d5bf580e2d


Detailed log of new commits:

Author: anv
Date: Wed Apr 28 19:02:32 2021 +0300

    0032331: Visualization - Exception when trying to display some surfaces using iVtk with VTK 9
    
    Branch 32331 based on release version 7.5.0 for delivery to IILS
(0100725)
bugmaster   
2021-05-01 12:29   
Combination -
OCCT branch : master
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17839.600000000362 / 17844.450000000477 [-0.03%]
Products
Total CPU difference: 11562.480000000109 / 11558.800000000136 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19303.28125 / 19431.828125 [-0.66%]
Products
Total CPU difference: 12894.515625 / 12871.203125 [+0.18%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0100733)
git   
2021-05-01 13:32   
Branch CR32331_750 has been deleted by inv.

SHA-1: 1b13b5cd9c0143f40a85da833e3a40d5bf580e2d
(0100734)
git   
2021-05-01 13:32   
Branch CR32331 has been deleted by inv.

SHA-1: cf1a065b79445946a13bd55a04920fdb00d60ed9