Archived issue #0032331

VIS - Exception when trying to display some surfaces using iVtk with VTK 9

Open CASCADEOCCT:VISclosed15 public notes

Search issues

Description

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

Steps to reproduce

pload MODELING VIS
sphere s 100
mkface f s
ivtkinit
ivtkdisplay f

Public activity

15 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Analysis / Solution implementation / Testing

For week 16

02Commenter 2
Testing
03Commenter 3
Testing
04Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
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
05Commenter 3
+#if (VTK_MAJOR_VERSION > 8)

'VTK_MAJOR_VERSION >= 9' would look more clear.
06Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
07Commenter 7
Testing
08Commenter 8
Testing
09Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
10Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
11Commenter 11
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.
12Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
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
13Commenter 1
Combination -
OCCT branch : [archived branch]
Products branch : [archived branch]
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
14Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
15Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records