| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| 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 | ||||||||
| 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 | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Type | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0001432) Goodwin Lawlor (reporter) 2004-09-15 10:30 |
I don't know about the strange interaction you are reporting here but this error message is ususally seen when not exiting the tcl app correctly. This should be done by calling: proc cb_exit {} { vtkCommand DeleteAllObjects exit } which is found in VTK\Wrapping\Tcl\vtkinteraction\bindings.tcl . You should bind this callback to the toplevel window using: wm protocol . WM_DELETE_WINDOW cb_exit This is also the callback that should be bound to any "Exit" command you have in a "File" menu. |
|
(0001433) Goodwin Lawlor (reporter) 2004-09-15 10:35 |
I'll try that file name with forward slashes: VTK/Wrapping/Tcl/vtkinteraction/bindings.tcl |
|
(0036748) Kitware Robot (administrator) 2016-08-12 09:54 |
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 |
| 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 |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |