View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015983 | VTK | (No Category) | public | 2016-02-08 08:48 | 2016-08-12 09:55 | ||||
Reporter | Algis | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | 6.3.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015983: VTK crash with OpenFOAM | ||||||||
Description | The simplest OpenFOAM (version 3.0) example (icoFoam.C) with included the simplest VTK (version 6.3.0) example (Arrow.cxx) crashes with "Floating point exception" in window rendering if OpenFOAM functions are called before VTK. It is enough, that OpenFOAM variable "args" Foam::argList args(argc, argv, false); is defined before renderWindow->Render(). It seems, that OpenFOAM's manager of exceptions intercepts something wrong (as division by 0) in VTK. Crashing code example simplified as much as possible: // ============================================================ // VTK includes // ============================================================ #include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingFreeType); VTK_MODULE_INIT(vtkRenderingContextOpenGL); #include <vtkArrowSource.h> #include <vtkPolyData.h> #include <vtkSmartPointer.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkRenderWindow.h> #include <vtkRenderer.h> #include <vtkRenderWindowInteractor.h> // ============================================================ // OpenFOAM includes // ============================================================ #define WM_DP #include "fvCFD.H" // ============================================================ // MAIN // ============================================================ int main ( int argc, char *argv[] ) { // Create an arrow. vtkSmartPointer<vtkArrowSource> arrowSource = vtkSmartPointer<vtkArrowSource>::New(); arrowSource->Update(); // Create a mapper and actor vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); mapper->SetInputConnection(arrowSource->GetOutputPort()); mapper->Update(); vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); actor->SetMapper(mapper); // Visualize vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New(); vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkRenderWindowInteractor>::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(actor); renderer->SetBackground(.1, .2, .3); // Background color dark blue // ============================================================ // OpenFOAM // ============================================================ Foam::argList args(argc, argv, false); // ============================================================ // VTK // ============================================================ renderWindow->Render(); renderWindowInteractor->Start(); // <-- 'Floating point exception' error in trying to manipulate with arrow // ============================================================ // END // ============================================================ return EXIT_SUCCESS; } | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Type | crash | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0037452) Kitware Robot (administrator) 2016-08-12 09:55 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-02-08 08:48 | Algis | New Issue | |
2016-08-12 09:55 | Kitware Robot | Note Added: 0037452 | |
2016-08-12 09:55 | Kitware Robot | Status | backlog => closed |
2016-08-12 09:55 | Kitware Robot | Resolution | open => moved |
2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |