Then how can I disable keyboard/mouse? I looked at osgProducer::Viewer.setKeyboardMouse(), but it only allows to set a valid object for kbm (not NULL). And setUpViewer() always initializes kbm...
I can't find something like removeKeyboardMouse()

Paul

Don Burns wrote:
KeyboardMouse is entirely optional for an application. If you have applications that don't need keyboard mouse support, just leave it out.

-don

On 5/19/06, *Paul Melis* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Producer seems to get stuck at program exit because it's waiting on a
    keyboard/mouse thread on linux.

    Let me sketch the scenario here:
    Run "osgviewer --run-till-frame-number 100 cow.osg". The 100 frames
    should be drawn pretty quick, but if you don't move the mouse or
    press a
    key after starting the viewer it will not exit UNTIL you move the
    mouse
    (or press a key). I've observed this behaviour on two different
    systems
    (also running different window managers).

    Attaching with GDB to the stalled process shows the following trace:

    0xb782e707 in sched_yield () from /lib/libc.so.6
    (gdb) bt
    #0  0xb782e707 in sched_yield () from /lib/libc.so.6
    #1  0xb78d3609 in OpenThreads::Thread::YieldCurrentThread () from
    /home/melis/osg/lib/libOpenThreads.so
    #2  0xb7e97e94 in Producer::KeyboardMouse::~KeyboardMouse () from
    /home/melis/osg/lib/libProducer.so
    #3  0xb7f06cf0 in osgProducer::Viewer::~Viewer () from
    /home/melis/osg/lib/libosgProducer.so
    #4  0x0804a3d0 in main ()
    (gdb)

    This whole thing is not such a big deal on a normal desktop
    system, but
    our distributed application runs on multiple render nodes that don't
    have a keyboard or mouse attached and our viewer on those nodes
    doesn't
    exit when told to over the network, even though main() is clearly
    finished. Attaching with gdb in this situation shows the same trace.

    Any ideas on how to overcome this? I don't know enough X11 to hack
    something like sending a single keypress to ourselves at exit, I'm not
    sure that will even work...
    Paul

    --
    Paul Melis

    VR Specialist,
    Center for High-Performance Computing & Visualization,
    University of Groningen,
    The Netherlands

    T: +31 50 363 9298
    E: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    W: http://www.rug.nl/rc/hpcv/index

    _______________________________________________
    osg-users mailing list
    [email protected] <mailto:[email protected]>
    http://openscenegraph.net/mailman/listinfo/osg-users
    http://www.openscenegraph.org/


------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to