[vtk-developers] CreateRepeatingTimer and X11/Tk

David Cole david.cole at kitware.com
Tue Aug 19 17:25:15 EDT 2008


Thanks for the report... I'll put fixing that on my list for tomorrow.


On Tue, Aug 19, 2008 at 5:16 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> I just updated my vtk head.  polyConn.tcl works fine now, even exits
> when I hit "e'. However, if I add an 'iren Start", it crashes...
>
> On Tue, Aug 19, 2008 at 3:49 PM, David Cole <david.cole at kitware.com>
> wrote:
> > OK.....
> > See the notes in the original issue
> > ( http://public.kitware.com/Bug/view.php?id=3164 ) if you want all the
> gory
> > details, but I have committed a further refinement of the fix to CVS
> HEAD.
> > Try it and let me know if you have any problems.
> > I will be merging it to VTK-5-2 tomorrow assuming the dashboards do not
> > complain about too many things overnight. :-)
> > Thanks for your patience,
> > David Cole
> >
> > On Tue, Aug 19, 2008 at 11:59 AM, David Cole <david.cole at kitware.com>
> wrote:
> >>
> >> If you add "iren Start", you also have to add an "exit" following it....
> >> (It hangs because it leaves the Start method and there is nothing
> telling
> >> Tcl/Tk to exit and clean up all the referenced objects...)
> >> If you wait just a little bit longer,  I think I am closing in on the
> real
> >> fix.
> >> Thanks,
> >> David
> >>
> >> On Tue, Aug 19, 2008 at 11:04 AM, Bill Lorensen <
> bill.lorensen at gmail.com>
> >> wrote:
> >>>
> >>> David,
> >>>
> >>> I just built VTK head. Now when I run a script like:
> >>> VTK/Graphics/Testing/Tcl/polyConn.tcl
> >>>
> >>> I get no interaction unless I add an "iren Start". If I hit an 'e' in
> >>> the graphics windows, the window hangs. Other keys like 'w' or 's'
> >>> work as expected.
> >>>
> >>> Bill
> >>>
> >>> On Mon, Aug 18, 2008 at 1:45 PM, Bill Lorensen <
> bill.lorensen at gmail.com>
> >>> wrote:
> >>> > I,m at the VTK-5-2 branch.
> >>> >
> >>> > On Mon, Aug 18, 2008 at 12:23 PM, David Cole <david.cole at kitware.com
> >
> >>> > wrote:
> >>> >> Nope. Same problem. Do you still get that with CVS HEAD of VTK, or
> are
> >>> >> you
> >>> >> snapped to the VTK-5-2 branch...?
> >>> >>
> >>> >> On Mon, Aug 18, 2008 at 12:21 PM, Bill Lorensen
> >>> >> <bill.lorensen at gmail.com>
> >>> >> wrote:
> >>> >>>
> >>> >>> Maybe my problem is different. When I try to interact with a tcl
> test
> >>> >>> like polyConn.tcl, I get:
> >>> >>>
> >>> >>> ERROR: In
> >>> >>> /home/lorensen/Projects/VTK/Rendering/vtkInteractorStyle.cxx,
> >>> >>> line 392
> >>> >>> vtkInteractorStyleJoystickCamera (0xa0129e8): Timer start failed
> >>> >>>
> >>> >>> This is a fedora core 9 system, gcc 4.3.
> >>> >>>
> >>> >>> Bill
> >>> >>>
> >>> >>>
> >>> >>> On Mon, Aug 18, 2008 at 10:39 AM, David Cole <
> david.cole at kitware.com>
> >>> >>> wrote:
> >>> >>> > There is interaction available if you call "iren Start" at the
> >>> >>> > bottom of
> >>> >>> > your tcl script to push an X event loop sponsored by the
> >>> >>> > vtkRenderWindowInteractor.
> >>> >>> > The remaining problem is that on other platforms (Windows with
> >>> >>> > ActiveState
> >>> >>> > Tcl, for example) the vtk.exe Tcl/Tk event loop is running and
> >>> >>> > enabling
> >>> >>> > interaction without any "iren Start" at the bottom of the tcl
> >>> >>> > script. So
> >>> >>> > ideally, it would be nice to get that behavior for free in X
> >>> >>> > implementations, too... seems to be what VTK devs expect.
> >>> >>> > So, I may have to put back some of the tcl-specific X code that
> >>> >>> > used to
> >>> >>> > be
> >>> >>> > there before my commit last Thursday. I spent Friday in a
> fruitless
> >>> >>> > attempt
> >>> >>> > at getting the interaction to work with just X stuff from our
> >>> >>> > tcl/tk
> >>> >>> > app.
> >>> >>> > Maybe somebody out there can give me a hint about whether this is
> >>> >>> > really
> >>> >>> > possible or not...? Maybe I'm just wasting my time trying to
> >>> >>> > minimize
> >>> >>> > the
> >>> >>> > code required.... going back to using Tk_DoOneEvent and tcl
> timers
> >>> >>> > may
> >>> >>> > be
> >>> >>> > the right way to go after all.
> >>> >>> > At least there is now one common implementation for handling the
> >>> >>> > actual
> >>> >>> > X
> >>> >>> > events, though. At least that part of my cleanup effort will
> >>> >>> > survive. I
> >>> >>> > will
> >>> >>> > reply again with final results when I have them.
> >>> >>> > Thanks for your patience, and feel free to send along any helpful
> >>> >>> > hints.
> >>> >>> >
> >>> >>> >
> >>> >>> > David Cole
> >>> >>> >
> >>> >>> > On Mon, Aug 18, 2008 at 1:56 AM, Andrew Maclean
> >>> >>> > <andrew.amaclean at gmail.com>
> >>> >>> > wrote:
> >>> >>> >>
> >>> >>> >> Hi Bill, I think David is looking further into it.
> >>> >>> >> I think it still needs some more work. I tried it in the weekend
> >>> >>> >> and
> >>> >>> >> there was no interaction at all (mouse and keyboard).
> >>> >>> >> Regards
> >>> >>> >>   Andrew
> >>> >>> >>
> >>> >>> >>
> >>> >>> >> On Mon, Aug 18, 2008 at 3:12 AM, Bill Lorensen
> >>> >>> >> <bill.lorensen at gmail.com>
> >>> >>> >> wrote:
> >>> >>> >> > David,
> >>> >>> >> >
> >>> >>> >> > Is this ready for the VTK-5-2 branch?
> >>> >>> >> >
> >>> >>> >> > Bill
> >>> >>> >> >
> >>> >>> >> > 2008/8/14 David Cole <david.cole at kitware.com>:
> >>> >>> >> >> Fixed in CVS HEAD by making vtkXRenderWindowTclInteractor a
> >>> >>> >> >> trivial
> >>> >>> >> >> subclass
> >>> >>> >> >> of vtkXRenderWindowInteractor:
> >>> >>> >> >>
> >>> >>> >> >>
> /cvsroot/VTK/VTK/Graphics/Testing/Tcl/TestFillHolesFilter.tcl,v
> >>> >>> >> >> <--
> >>> >>> >> >> Graphics/Testing/Tcl/TestFillHolesFilter.tcl
> >>> >>> >> >>     new revision: 1.3; previous revision: 1.2
> >>> >>> >> >>
> /cvsroot/VTK/VTK/Rendering/vtkXRenderWindowInteractor.cxx,v
> >>> >>> >> >> <--
> >>> >>> >> >> Rendering/vtkXRenderWindowInteractor.cxx
> >>> >>> >> >>     new revision: 1.136; previous revision: 1.135
> >>> >>> >> >>     /cvsroot/VTK/VTK/Rendering/vtkXRenderWindowInteractor.h,v
> >>> >>> >> >> <--
> >>> >>> >> >> Rendering/vtkXRenderWindowInteractor.h
> >>> >>> >> >>     new revision: 1.75; previous revision: 1.74
> >>> >>> >> >>
> >>> >>> >> >>
> /cvsroot/VTK/VTK/Rendering/vtkXRenderWindowTclInteractor.cxx,v
> >>> >>> >> >> <--
> >>> >>> >> >> Rendering/vtkXRenderWindowTclInteractor.cxx
> >>> >>> >> >>     new revision: 1.54; previous revision: 1.53
> >>> >>> >> >>
> >>> >>> >> >> /cvsroot/VTK/VTK/Rendering/vtkXRenderWindowTclInteractor.h,v
> <--
> >>> >>> >> >> Rendering/vtkXRenderWindowTclInteractor.h
> >>> >>> >> >>     new revision: 1.26; previous revision: 1.25
> >>> >>> >> >> I will merge this to the VTK-5-2 branch after a clean night
> on
> >>> >>> >> >> the
> >>> >>> >> >> dashboards and then mark this issue as resolved...
> >>> >>> >> >>
> >>> >>> >> >> Thanks,
> >>> >>> >> >> David Cole
> >>> >>> >> >>
> >>> >>> >> >> On Tue, Aug 12, 2008 at 4:19 PM, David Cole
> >>> >>> >> >> <david.cole at kitware.com>
> >>> >>> >> >> wrote:
> >>> >>> >> >>>
> >>> >>> >> >>> I will try to get this one fixed tomorrow.
> >>> >>> >> >>>
> >>> >>> >> >>> Would anybody object to re-factoring the
> >>> >>> >> >>> vtkXRenderWindowTclInteractor
> >>> >>> >> >>> class (re-parent it from vtkXRenderWindowInteractor) such
> that
> >>> >>> >> >>> it
> >>> >>> >> >>> inherits
> >>> >>> >> >>> its common functionality and then has just overrides that
> are
> >>> >>> >> >>> specific
> >>> >>> >> >>> to
> >>> >>> >> >>> Tcl/Tk...?
> >>> >>> >> >>> I don't think it should break backwards compatibility for
> most
> >>> >>> >> >>> people,
> >>> >>> >> >>> although I could certainly imagine a class derived from it
> >>> >>> >> >>> that may
> >>> >>> >> >>> squawk
> >>> >>> >> >>> for one reason or another by having its parent chain
> >>> >>> >> >>> changed...
> >>> >>> >> >>> I think the intent of both classes was to have the same code
> >>> >>> >> >>> except
> >>> >>> >> >>> for
> >>> >>> >> >>> the differences due to making tcl calls from the
> TclInteractor
> >>> >>> >> >>> method
> >>> >>> >> >>> implementations. However, over time, they have diverged and
> >>> >>> >> >>> had
> >>> >>> >> >>> different
> >>> >>> >> >>> bug fixes applied to one that should have been applied to
> >>> >>> >> >>> both.
> >>> >>> >> >>>
> >>> >>> >> >>> Is the fix for this bug simply to re-inherit
> >>> >>> >> >>> vtkXRenderWindowTclInteractor
> >>> >>> >> >>> or would that upset any of you....??
> >>> >>> >> >>>
> >>> >>> >> >>> Thanks for any feedback,
> >>> >>> >> >>> David Cole
> >>> >>> >> >>> Kitware, Inc.
> >>> >>> >> >>>
> >>> >>> >> >>> On Sat, Aug 9, 2008 at 12:59 PM, Peter Wainwright
> >>> >>> >> >>> <prw at ceiriog.eclipse.co.uk> wrote:
> >>> >>> >> >>>>
> >>> >>> >> >>>> On all recent CVS versions of VTK, I have been unable to
> run
> >>> >>> >> >>>> this
> >>> >>> >> >>>> example
> >>> >>> >> >>>>
> >>> >>> >> >>>>  http://www.ceiriog.eclipse.co.uk/vtktut6.tcl
> >>> >>> >> >>>>
> >>> >>> >> >>>> Its just a simple use of vtkRenderWindowInteractor.  But
> when
> >>> >>> >> >>>> I
> >>> >>> >> >>>> click
> >>> >>> >> >>>> in
> >>> >>> >> >>>> the window I am unable to rotate the model and I get the
> >>> >>> >> >>>> error
> >>> >>> >> >>>> message:
> >>> >>> >> >>>>
> >>> >>> >> >>>> ERROR: In
> >>> >>> >> >>>>
> /home/prw/src/VTK-20080806/Rendering/vtkInteractorStyle.cxx,
> >>> >>> >> >>>> line 392
> >>> >>> >> >>>> vtkInteractorStyleJoystickCamera (0x9543c0): Timer start
> >>> >>> >> >>>> failed
> >>> >>> >> >>>>
> >>> >>> >> >>>> This seems to relate to the bug
> >>> >>> >> >>>> http://www.vtk.org/Bug/view.php?id=3164,
> >>> >>> >> >>>> which apparently has not been touched for almost 2 years.
>  It
> >>> >>> >> >>>> seems
> >>> >>> >> >>>> to
> >>> >>> >> >>>> affect the X11 implementation only.  Is anyone working on
> >>> >>> >> >>>> this?
> >>> >>> >> >>>>
> >>> >>> >> >>>> Peter Wainwright
> >>> >>> >> >>>>
> >>> >>> >> >>>> _______________________________________________
> >>> >>> >> >>>> vtk-developers mailing list
> >>> >>> >> >>>> vtk-developers at vtk.org
> >>> >>> >> >>>> http://www.vtk.org/mailman/listinfo/vtk-developers
> >>> >>> >> >>>
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> >> _______________________________________________
> >>> >>> >> >> vtk-developers mailing list
> >>> >>> >> >> vtk-developers at vtk.org
> >>> >>> >> >> http://www.vtk.org/mailman/listinfo/vtk-developers
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> > _______________________________________________
> >>> >>> >> > vtk-developers mailing list
> >>> >>> >> > vtk-developers at vtk.org
> >>> >>> >> > http://www.vtk.org/mailman/listinfo/vtk-developers
> >>> >>> >> >
> >>> >>> >>
> >>> >>> >>
> >>> >>> >>
> >>> >>> >> --
> >>> >>> >> ___________________________________________
> >>> >>> >> Andrew J. P. Maclean
> >>> >>> >> Centre for Autonomous Systems
> >>> >>> >> The Rose Street Building J04
> >>> >>> >> The University of Sydney 2006 NSW
> >>> >>> >> AUSTRALIA
> >>> >>> >> Ph: +61 2 9351 3283
> >>> >>> >> Fax: +61 2 9351 7474
> >>> >>> >> URL: http://www.acfr.usyd.edu.au/
> >>> >>> >> ___________________________________________
> >>> >>> >
> >>> >>> >
> >>> >>
> >>> >>
> >>> >
> >>
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080819/56e23bd8/attachment.html>


More information about the vtk-developers mailing list