lock-up & crash while pulldown menu displayed and click elsewhere - Motif

This is a discussion on lock-up & crash while pulldown menu displayed and click elsewhere - Motif ; I have been plagued by a hang and crash problem that requires me to kill my program to unfreeze my display and input devices (mouse cursor and keyboard). I can easily reproduce it and it looks a lot like a ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: lock-up & crash while pulldown menu displayed and click elsewhere

  1. lock-up & crash while pulldown menu displayed and click elsewhere

    I have been plagued by a hang and crash problem that requires me to
    kill my program to unfreeze my display and input devices (mouse cursor
    and keyboard).

    I can easily reproduce it and it looks a lot like a problem previously
    reported in two old posts ("Lock up bug - need advice" and "Event
    Handler Hangs Motif Menus") but I can't figure out how to fix it.

    I have a main window with a menubar across the top and lower in the
    window I have some icons that you can select. If you select an icon
    with the left-most mouse button, the icon becomes "selected". If you
    select an icon with the right-most mouse button, a pop-up menu appears
    for the icon that allows you to perform operations on the item
    represented by the icon.

    My problem happens when I am running in gdb and I select one of the
    pulldown menus in the menubar then let up on the mouse button - the
    pulldown remains displayed - then I move the mouse and right-click on
    one of the icons. gdb displays:

    Program received signal SIGSEGV, Segmentation fault
    0x002ed748 in XtWidgetToApplicationContext()
    (gdb)

    and my entire display and all input devices lock up and my program has
    to be killed from elsewhere to be able to unlock my display and input
    devices.

    I can't debug it since gdb hangs obviously but I log each of my
    routines I enter and exit and can see that my icon's right-click event
    handler is not getting logged, although it should be.

    If I'm not running in gdb, I just crash with a Segmentation Fault and
    don't hang.

    I have no idea why this is crashing. Does anyone have any ideas?
    Thanks in advance,
    Julie


  2. Re: lock-up & crash while pulldown menu displayed and click elsewhere

    You need two X servers to debug this kind of stuff.

    Even if you don't have access to two machines close together, with VNC,
    it's quite easy to do. Run the target program inside the VNC server,
    and your debugger in the real X server.

  3. Re: lock-up & crash while pulldown menu displayed and click elsewhere


    ST wrote:
    > You need two X servers to debug this kind of stuff.
    >
    > Even if you don't have access to two machines close together, with VNC,
    > it's quite easy to do. Run the target program inside the VNC server,
    > and your debugger in the real X server.


    My configuration is actually quite complex. I am doing X11 tunneling
    over ssh (although this is not the culprit since the folks where my
    application is running (in GA) are having the same problem). I
    actually do have a Linux box with 3 graphics cards in it and 3 totally
    separate X Servers running but one X Server has no input devices and
    the other two X Servers (one is being used to display my GA app) are
    sharing the input devices (kb and mouse).

    I don't know how to run ssh with the -X option and have it display
    elsewhere (on an X Server other than the one I'm running ssh from).

    Do you really think I need two X Servers to debug this crash? Is there
    any other way?

    A little more info is that my application is running on a Solaris 5.10
    host (64 bit processor) in GA and I am tunneling in from MD and
    displaying on my xfree86 X Server here. But when the local folks in GA
    run my program on this host and just set their display to unix:0, they
    experience the same crash. I am building with Motif 2.1 built for the
    Solaris 5.10 platform.

    Thank you for any help,
    Julie


  4. Re: lock-up & crash while pulldown menu displayed and click elsewhere

    The best performance would be to install a TightVNC server on the
    remote machine, if possible. It can run locally, so "install" is a bit
    of an overstatement - you don't need be root to set it up.

    Then, on your local machine, use "vncviewer -via machine:1" to
    view it.

    Not only will it cage the remote app into it's own X server, it will be
    many times faster than X tunneling. (Be sure to turn ssh compression
    off, and let VNC handle it.)

    If you have difficulty getting VNC working on Solaris, note the VNC
    server doesn't have to run on the same machine as the app; is there
    another box remote that you can use?

+ Reply to Thread