question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when `compute_normals`

See original GitHub issue

Describe the bug, what’s wrong, and what you expect:

When calculating normals, the interpreter silently crashes… No error’s or output, not even with the VTKErrorCatcher. can anyone please enlighten me what happens in this minimal example?


To Reproduce

Please include a code snippet to reproduce the bug in the block below:

import pyvista
import numpy as np

xyz = np.random.random(102*3).reshape(-1,3)
faces = np.arange(102*3)
np.random.shuffle(faces)
faces = faces.reshape(-1,3)
faces = np.column_stack((np.ones(len(faces),) * 3, faces)).astype(int)

mesh = pyvista.PolyData()
mesh.points = xyz
mesh.faces = faces
print(mesh.compute_normals(inplace=False))

System Information: Please run the following code wherever you are experiencing the bug and paste the output below. This report helps us track down bugs and it is critical to addressing your bug:

# Get system info
import pyvista as pv
print(pv.Report())
--------------------------------------------------------------------------------
  Date: Wed Feb 02 16:36:41 2022 W. Europe Standard Time

                OS : Windows
            CPU(s) : 8
           Machine : AMD64
      Architecture : 64bit
               RAM : 31.9 GiB
       Environment : Python
       File system : unknown
        GPU Vendor : NVIDIA Corporation
      GPU Renderer : Quadro M1000M/PCIe/SSE2
       GPU Version : 4.5.0 NVIDIA 441.66

  Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit
  (AMD64)]

           pyvista : 0.33.2
               vtk : 9.1.0
             numpy : 1.22.1
           imageio : 2.14.1
           appdirs : 1.4.4
            scooby : 0.5.11
        matplotlib : 3.5.1
         pyvistaqt : 0.7.0
             PyQt5 : 5.15.6
             scipy : 1.7.3
--------------------------------------------------------------------------------


Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Onandon11commented, Feb 2, 2022

That function is indeed what I mentioned 😄

I will work on reproducing the dataset. I will be back when I have the dataset 😉

1reaction
darikgcommented, Feb 2, 2022

there’s only 102 verts but faces is indexing up to 305

Read more comments on GitHub >

github_iconTop Results From Across the Web

CloudCompare forum - crash with normal compute
Hi, I have imported a point cloud file teapot.ply with only verticals coordinates. I tried normal compute for this with "Local Surface ...
Read more >
"Compute normals for point set" Filter crashes for files ...
I'm trying to use the "Compute normals for point set" filter to compute ... with less than exactly 100 vertices trigger Meshlab to...
Read more >
Compute Normals seems not correct - Questions - Babylon.js
ComputeNormals looks weird, any wrong with it? ... Not a bug, SPS calculates its normals from the supplied mesh normals.
Read more >
Command Line Compute Normals guessing the Octree radius
Each time I need to write Octree radius, if it is really off the application crashes. Is there any way to call the...
Read more >
MeshLab - Laser Scanning Forum
It crashed more times than a ZX84 when trying to do even the simplest ... and Orientation > compute Normals for Point Set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found