RSS/Atom feed Twitter
Site is read-only, email is disabled

CVS, screenshot plugin crash

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

CVS, screenshot plugin crash Jean-Luc Coulon 02 Jun 17:31
CVS, screenshot plugin crash William Skaggs 02 Jun 19:23
  CVS, screenshot plugin crash Simon Budig 02 Jun 19:38
CVS, screenshot plugin crash William Skaggs 02 Jun 20:09
Jean-Luc Coulon
2005-06-02 17:31:07 UTC (over 19 years ago)

CVS, screenshot plugin crash

Hi,

If I do:

- Acquire - Screenshot
- the sectected region

The plugin crash with a popup : Plud-in crashed: "screenshot"

I've in the xterm from when I launched gimp: The program 'screenshot' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 5216 error_code 10 request_code 33 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.)

(gimp-2.3:29235): Gimp-Plug-In-WARNING **: gimp-2.3: plug_in_flush(): error:
Broken pipe

The lastest vesion of the CVS with a non-crashing screenshot plugin was the
one with these data on top of the Changelog: 2005-05-30 Sven Neumann

* plug-ins/common/screenshot.c: capitalization and mnemonics.

2005-05-29 Sven Neumann

* app/widgets/gimpdnd.c (gimp_dnd_get_color_icon): pass GIMP_COLOR_AREA_CHECKS_SMALL instead of TRUE for the type of the GimpColorArea.

* app/widgets/gimpcoloreditor.c: added a "context" property.

* libgimpwidgets/gimpcolorarea.c (gimp_color_area_set_color): always use gimp_rgba_distance(), regardless of the area's type.

The day after, there was a changed in the screenshot. Dunnon if it is related :

2005-05-31 Sven Neumann

* plug-ins/common/screenshot.c (select_window_x11): use XGrabKey() to grab the Escape key instead of doing a full keyboard grab.

Regards

Jean-Luc

William Skaggs
2005-06-02 19:23:28 UTC (over 19 years ago)

CVS, screenshot plugin crash

Jean-Luc Coulon wrote:

The plugin crash with a popup :
Plud-in crashed: "screenshot"

I get the same result. Looking at the man pages, this apparently happens if the key being grabbed has already been grabbed by something else -- but there does not seem to be any way to tell whether a given key has already been grabbed. Which kind of sucks.

There's a good chance that the window manager comes into play here. I am using Metacity with FC2 -- what about you?

-- Bill


______________ ______________ ______________ ______________ Sent via the CNPRC Email system at primate.ucdavis.edu

Simon Budig
2005-06-02 19:38:18 UTC (over 19 years ago)

CVS, screenshot plugin crash

William Skaggs (weskaggs@primate.ucdavis.edu) wrote:

Jean-Luc Coulon wrote:

The plugin crash with a popup :
Plud-in crashed: "screenshot"

I get the same result. Looking at the man pages, this apparently happens if the key being grabbed has already been grabbed by something else -- but there does not seem to be any way to tell whether a given key has already been grabbed. Which kind of sucks.

If XGrabKey might fail you can wrap it similiar to this:

gdk_error_trap_push (); XGrabKey (GDK_DISPLAY_XDISPLAY (data->display), data->hot_keycode,
AnyModifier,
GDK_WINDOW_XWINDOW (data->root), TRUE,
GrabModeAsync,
GrabModeAsync);
gdk_flush ();
if (gdk_error_trap_pop ())
{
g_printerr ("could not grab Hotkey. Aborting...\n"); exit (1);
}

Bye,
Simon

William Skaggs
2005-06-02 20:09:37 UTC (over 19 years ago)

CVS, screenshot plugin crash

Simon Budig wrote:

If XGrabKey might fail you can wrap it similiar to this:

gdk_error_trap_push (); XGrabKey (GDK_DISPLAY_XDISPLAY (data->display), data->hot_keycode,
AnyModifier,
GDK_WINDOW_XWINDOW (data->root), TRUE,
GrabModeAsync,
GrabModeAsync);
gdk_flush ();
if (gdk_error_trap_pop ())
{
g_printerr ("could not grab Hotkey. Aborting...\n"); exit (1);
}

Thanks for the hint. I tried wrapping the XGrabKey call in a gdk_error_trap_push/pop pair, and it seems to do the trick. (I don't see any reason for the plug-in to bail out just because the ESC key can't be grabbed.)

From the ChangeLog for HEAD:

2005-06-01 Bill Skaggs

* plug-ins/common/screenshot.c: trap errors when running XGrabKey, to prevent bail-out on BadAccess error as reported by Jean-Luc Coulon on developers list; solution suggested by Simon Budig.

It would probably have been better to do all this via Bugzilla, by the way.

-- Bill


______________ ______________ ______________ ______________ Sent via the CNPRC Email system at primate.ucdavis.edu