Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • Nektar Nektar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 62
    • Merge requests 62
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nektar
  • NektarNektar
  • Issues
  • #148
Closed
Open
Created May 15, 2019 by Jeremy Cohen@jhc02Developer

Runtime error with VtkToPng with VTK6+

I think this is currently only an issue with VtkToPng but it is likely to affect any future VTK-related code that aims to make use of OpenGL functionality.

When building VtkToPng (requires NEKTAR_UTILITY_EXTRAS to be enabled in current master branch), the build and link are successful but trying to use the executable fails. The error I'm seeing is:

Error: no override found for 'vtkActor'

As far as I understand this is simply a result of a required implementation class not being found - presumably an object is being referenced via an interface and instantiated through some sort of factory where the actual required implementation is not known until runtime. When the implementation is known and the code tries to instantiate it, the required type is not found. I tried linking in some additional VTK rendering libraries which didn't solve the problem.

The solution is described here and there is also some further information on handling optional dependencies.

The first link suggests that if CMake is being used, the required #defines will be automatically added but I couldn't get this to work and ended up having to add this manually. A diff of the changes I made is attached.

This is not ideal since it requires the rendering backend to be hard-coded. There must be a better way to resolve this. I've been building against OSMesa so I've had to build a version of VTK with the OpenGL backend but it looks like standard builds probably use OpenGL2 and the additional #define and libraries that are linked need to be adjusted to support this.

Am I doing something wrong here or is someone else able to reproduce this problem? I've been able to reproduce it with VTK6 and VTK7 on Linux and Mac platforms.

Patch for current 4.4.1 release: vtktopng-4.4.1.patch

Edited May 15, 2019 by Jeremy Cohen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking