After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165032 - Gimp-Display-CRITICAL on stderr opening 2mp camera jpg image
Gimp-Display-CRITICAL on stderr opening 2mp camera jpg image
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.2.x
Other Linux
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-23 23:12 UTC by Akkana Peck
Modified: 2008-01-15 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample image (497.70 KB, image/jpeg)
2005-01-23 23:13 UTC, Akkana Peck
Details

Description Akkana Peck 2005-01-23 23:12:30 UTC
Open an image from a Canon 2mp camera (1600x1200).  I'll attach a sample.
GIMP prints on stdout: 

(gimp:2778): Gimp-Display-CRITICAL **: file gimpdisplayshell.c: line 1415
(gimp_display_shell_shrink_wrap): assertion `GTK_WIDGET_REALIZED (shell)' failed

once for each image opened, though the image opens correctly.

Images from other cameras (higher res, 3mp) open without this error, as do
smaller edited images originally from this camera.
Comment 1 Akkana Peck 2005-01-23 23:13:38 UTC
Created attachment 36428 [details]
Sample image
Comment 2 Raphaël Quinet 2005-01-24 12:38:33 UTC
I tried to load the image but I didn't see any warning message.  As it comes
from gimp_display_shell_shrink_wrap and the realized signal that was not
propagated in time, it looks like a race condition.  It probably depends on:
- the size of the image compared to the size your screen
- the window manager that you are using
- the time it takes for the GIMP to open the image
If you could provide additional information such as your screen size, WM used,
version of GTK+, it may be easier for others to reproduce the problem.
Comment 3 Akkana Peck 2005-01-24 18:12:20 UTC
The screen is 1280x1024, wm is fvwm (with "SmartPlacement", and no gimp-specific
placement rules), libgtk2 is 2.4.14-2 (debian's).  If speed might be an issue,
the processor is a P3 1.2GHz and the video card is a Rage128.

The images which generate this message are all 1600x1200, a bit larger than the
screen.  Images (from a different camera) which are larger still, like 2048 x
1536, do not generate the error.
Comment 4 Akkana Peck 2005-01-24 18:41:10 UTC
I tested copies of the image at various sizes.  I see the error whenever the
image is between 1442 and 1921 pixels in width.  This is the size range for
which gimp shows a big image window, 1002 pixels wide.  Above 1921 and below
1442, gimp scales the image window down to a much smaller size, and I don't see
the error.
Comment 5 Manish Singh 2005-01-24 19:04:09 UTC
I can't reproduce it either.

Running gimp with --g-fatal-warnings and providing the stack trace might help
with further diagnosis.
Comment 6 Akkana Peck 2005-01-24 22:55:05 UTC
Stack trace from 2.2.3: I'm including the whole thing instead of trying to pick
just the relevant parts, because the order in which things are happening might
be part of it and maybe something higher up on the stack will give a hint.

  • #4 g_return_if_fail_warning
    from /usr/lib/libglib-2.0.so.0
  • #5 gimp_display_shell_shrink_wrap
    at gimpdisplayshell.c line 1415
  • #6 gimp_display_shell_scale_resize
    at gimpdisplayshell-scale.c line 501
  • #7 gimp_display_shell_scale_by_values
    at gimpdisplayshell-scale.c line 472
  • #8 gimp_display_shell_scale
    at gimpdisplayshell-scale.c line 388
  • #9 view_zoom_explicit_cmd_callback
    at view-commands.c line 207
  • #10 g_cclosure_marshal_VOID__OBJECT
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #15 gtk_radio_action_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #22 _gtk_action_emit_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_toggle_action_set_active
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 view_actions_set_zoom
    at view-actions.c line 599
  • #25 view_actions_update
    at view-actions.c line 503
  • #26 gimp_action_group_update
    at gimpactiongroup.c line 363
  • #27 gimp_ui_manager_real_update
    at gimpuimanager.c line 351
  • #28 g_cclosure_marshal_VOID__POINTER
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #33 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #34 gimp_ui_manager_update
    at gimpuimanager.c line 403
  • #35 gimp_display_shell_real_scaled
    at gimpdisplayshell.c line 577
  • #36 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #37 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #38 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #39 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #40 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #41 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #42 gimp_display_shell_scaled
    at gimpdisplayshell.c line 1071
  • #43 gimp_display_shell_canvas_size_allocate
    at gimpdisplayshell-callbacks.c line 359
  • #44 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #45 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #46 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #47 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #48 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #49 gtk_widget_size_allocate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #50 gtk_table_get_homogeneous
    from /usr/lib/libgtk-x11-2.0.so.0
  • #51 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #52 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #53 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #54 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #55 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #56 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #57 gtk_widget_size_allocate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #58 gtk_hbox_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #59 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #60 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #61 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #62 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #63 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #64 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #65 gtk_widget_size_allocate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #66 gtk_vbox_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #67 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #68 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #69 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #70 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #71 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #72 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #73 gtk_widget_size_allocate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #74 gtk_vbox_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #75 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #76 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #77 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #78 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #79 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #80 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #81 gtk_widget_size_allocate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #82 gtk_window_reshow_with_initial_size
    from /usr/lib/libgtk-x11-2.0.so.0
  • #83 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #84 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #85 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #86 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #87 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #88 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #89 gtk_widget_size_allocate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #90 gtk_window_reshow_with_initial_size
    from /usr/lib/libgtk-x11-2.0.so.0
  • #91 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #92 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #93 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #94 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #95 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #96 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #97 gtk_widget_show
    from /usr/lib/libgtk-x11-2.0.so.0
  • #98 gimp_display_new
    at gimpdisplay.c line 347
  • #99 gui_display_create
    at gui-vtable.c line 336
  • #100 gimp_create_display
    at gimp-gui.c line 250
  • #101 file_open_with_proc_and_display
    at file-open.c line 317
  • #102 file_open_with_display
    at file-open.c line 281
  • #103 app_run
    at app_procs.c line 338
  • #104 main
    at main.c line 473

Comment 7 Manish Singh 2005-01-26 01:11:35 UTC
This only happens when Resize window on zoom is turned on in the preferences.

If gimp_display_shell_new() picks a scale that corresponds to one of the fixed
view-zoom actions, and that action is not already set as the default, it falls
through this code that tries to shrink wrap a window that doesn't exist yet.

Quick fix is to check if the window is realized in
gimp_display_shell_scale_resize, but I'm not sure that's the best fix.
Comment 8 Michael Natterer 2006-05-06 22:57:38 UTC
Apparently this was fixed by the fix for bug #164281. Added some
additional paranoia code to HEAD. Closing as FIXED.

2006-05-07  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale):
	return early if the shell is already at the requested zoom level.
	(paranoia addition for bug #165032, which was already fixed by the
	fix for bug #164281)