Re: Crash: gqview over ssh connection, crashes on menu/tooltip/popup

John Ellis <[email protected]> Thu, 02 Dec 2004 13:18:29 -0500
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>
Carl Hudkins wrote:

[snip]

>  Summary:
>  Running gqview on a ssh-forwarded X session, the program exits with an X
> error if I attempt to use a menu, pop up a dialog, or allow a tooltip to
> appear.
> 
>  More detail:
>  Here's a transcript of a typical session, in which I click on the "File"
> menu:
> 
> rassilon@nenene rassilon $ ssh -X panopticon
> Password:
> Last login: Tue Nov 30 19:22:18 2004 from 192.168.0.6
> rassilon@panopticon rassilon $ gqview &
> [1] 18859
> rassilon@panopticon rassilon $ GQview 1.5.4, This is a development release!
> Expect bugs.
> /home/rassilon/.gtkrc.mine:1: error: unexpected character `/', expected
> string constant
> Xlib:  extension "RENDER" missing on display "localhost:12.0".
> The program 'gqview' received an X Window System error.
> This probably reflects a bug in the program.
> The error was 'BadWindow (invalid Window parameter)'.
>   (Details: serial 2048 error_code 3 request_code 38 minor_code 0)
>   (Note to programmers: normally, X errors are reported asynchronously;
>    that is, you will receive the error a while after causing it.
>    To debug your program, run it with the --sync command line
>    option to change this behavior. You can then get a meaningful
>    backtrace from your debugger if you break on the gdk_x_error() function.)
> 
> [1]+  Exit 1                  gqview

Please try running another GTK2 application over the ssh -X connection, and test
if
menus and tooltips work, this will help determine if it is internal to GQview or
simply GTK apps in general.

Also try it with only using the default GTK theme - just in case it is a buggy
theme.

> 
>  I am on Gentoo Linux here, and I've compiled gqview without stripping the
> binary.  However, running it from inside gdb over an ssh connection, does
> not cause gqview to appear on my display, so I cannot trigger any
> conditions that cause this exit.  Gdb also complains that it cannot insert
> breakpoints and such:
> 
> (gdb) r
> Starting program: /usr/bin/gqview
> warning: Unable to find dynamic linker breakpoint function.
> GDB will be unable to debug shared library initializers
> and track explicitly loaded dynamic code.
> warning: Cannot insert breakpoint -2:
> Cannot access memory at address 0x29200

Weird, if you can walk/drive/swim to the remote machine, try running gdb on it
locally to see if it works at all. I too get the first warning about the dynamic
linker on gentoo, but otherwise gdb seems to work.

>  Pretty much the same thing happens if I say "r --sync" instead, and gdb
> also says that it cannot find a function called "gdk_x_error" if I try to
> set a breakpoint there (using the command, "break gdk_x_error").  I'm not a
> gdb expert, but I do try to use the help system.  :)
> 
>  If it matters, the gqview binary resides on an Intel box (Pentium 3, SMP),
> and I'm making my connection from a PPC box (G3, SMP).  Also, the Intel box
> has Xfree 4.3.0, and the PPC box has Xorg 6.7.0.

I have tried the combinations of Xfree -> Xorg, Xorg -> Xfree, and Xorg -> Xorg
- they all seem to work here. I even tried Xvnc -> Xfree.

For reference, these test systems include various combinations of GTK+: 2.2.2,
2.2.4, 2.4.9, and 2.4.13. In general Xfree in combination with gtk 2.2.x and
Xorg with gtk 2.4.x.

>  I'll be very happy to provide any more information required to help fix
> this problem, but it seems that I need some guidance in order to be able to
> provide that information.  In particular, it seems I need more knowledge
> about how to run X programs through gdb over ssh.  Google has not been
> helpful in this area.  :/

If you run gdb gqview, then start gqview with r<enter>, is GQview starting? If
so gdb is running the program and Control+C should work to break the process in
gdb. If you get this far try setting the breakpoint from here. If gdk_x_error is
still not defined try setting the break point on gdk_window_new , then when the
breakpoint is reached, stepping (s<enter>) with gdb until the error occurs (it
may take a few steps).


Greetings,
John


-- 
John Ellis <[email protected]>

http://gqview.sourceforge.net <GQview> | http://gqapplets.sourceforge.net
http://gqmpeg.sourceforge.net <GQmpeg> |                  <panel applets>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/