MantisBT - VTK | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0001125 | VTK | (No Category) | public | 2004-09-01 18:27 | 2016-08-12 09:54 |
| Reporter | pra | ||||
| Assigned To | Will Schroeder | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Project | |||||
| Type | |||||
| Summary | 0001125: Strange interaction between tk_getOpenFile and vtkTkRenderWidget | ||||
| Description | Dear, I have a strange behavior in a TCL script (see below). If the line "reader SetFileName $file_in" is included at start the TkRenderWidget reports the following error when the program is terminated: A TkRenderWidget is being destroyed before it associated vtkRenderWindow is destroyed. This is very bad and usually due to the order in which objects are being destroyed. Always destroy the vtkRenderWindow before destroying the user interface components. But try to play with the two lines right below vtkPolyDataReader and you'll see different (but deterministic) behaviors depending on which lines are included (You get different different mouse interaction, wireframe on/off works/doesn’t work) Hope you'll be able to track the bug down. I'm running on a Dell inspiron 9100 with XP SP1, VTK 4.4 & TCL/Tk 8.3.2 (info patchlevel). Best wishes, Per R. Andresen ------------------ package require vtk package require vtkinteraction ####################################### # # Global variables # ####################################### set X_SIZE 800; # Size of window set Y_SIZE 500 set maintitle "crop by Claus"; # title is dynamically changed # Get input file name set typelist_in { {{Visualization Toolkit (polygonal)} {.vtk} } {{All Files } * } } set file_in [tk_getOpenFile -filetypes $typelist_in]; # Read file vtkPolyDataReader reader #reader SetFileName $file_in; # DOESN'T WORK if included but it works if the line is pasted from the vtk interactor (press 'u' - pres reset 'r' after loading the file) reader SetFileName ""; # mouse interaction changes if or not this line is included when using the vtk interactor as described in the previous line?!?!? vtkPolyDataMapper clipInMapper clipInMapper SetInput [reader GetOutput] vtkActor actorIn actorIn SetMapper clipInMapper # # Create the standard rendering stuff. # vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 # Add the actors to the renderer, set the background and size # ren1 AddActor actorIn # # Create the Tk widget, associate it with the renderwindow. # set vtkw [vtkTkRenderWidget .ren \ -width ${X_SIZE} \ -height ${Y_SIZE} \ -rw renWin] # # Pack the Tk widget. # pack $vtkw -side top -fill both -expand yes # # Sets event handlers # ::vtk::bind_tk_render_widget $vtkw | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) | ||
| 2016-08-12 09:54 | Kitware Robot | Note Added: 0036748 | |||
| 2016-08-12 09:54 | Kitware Robot | Status | expired => closed | ||
| 2016-08-12 09:54 | Kitware Robot | Resolution | open => moved | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||