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 643286 - GTK3: gtk_cell_area_stop_editing warnings
GTK3: gtk_cell_area_stop_editing warnings
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: 2.32
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks: 641100
 
 
Reported: 2011-02-25 13:16 UTC by Murray Cumming
Modified: 2011-02-28 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Avoid-GtkIconView-warnings.patch (1.61 KB, patch)
2011-02-25 18:50 UTC, Murray Cumming
none Details | Review
0001-Avoid-GtkIconView-warnings2.patch (3.69 KB, patch)
2011-02-25 20:12 UTC, Murray Cumming
none Details | Review

Description Murray Cumming 2011-02-25 13:16:23 UTC
Our port of Cheese to GTK+ 3, currently here
  https://github.com/Patriciasc/Cheese-GTK-3/
shows a few of these warnings, though there is no obvious problem for the user:
  (cheese:3753): Gtk-CRITICAL **: gtk_cell_area_stop_editing: assertion `GTK_IS_CELL_AREA (area)' failed

This is the backtrace at that point:

  • #0 g_log
    at gmessages.c line 576
  • #1 g_return_if_fail_warning
  • #2 gtk_cell_area_stop_editing
    at gtkcellarea.c line 3478
  • #3 gtk_icon_view_set_columns
    at gtkiconview.c line 5525
  • #4 cheese_thumb_view_init
    at thumbview/cheese-thumb-view.c line 635
  • #5 g_type_create_instance
    at gtype.c line 1889
  • #6 g_object_constructor
    at gobject.c line 1615
  • #7 gtk_icon_view_constructor
    at gtkiconview.c line 1111
  • #8 g_object_newv
    at gobject.c line 1479
  • #9 g_object_new
    at gobject.c line 1308
  • #10 cheese_thumb_view_new
    at thumbview/cheese-thumb-view.c line 655
  • #11 cheese_main_window_setup_ui
    at cheese-window.c line 2509
  • #12 cheese_main_on_app_activate
    at cheese-main.c line 150
  • #13 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #14 g_closure_invoke
    at gclosure.c line 767
  • #15 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #16 g_signal_emit_valist
    at gsignal.c line 2983
  • #17 g_signal_emit
    at gsignal.c line 3040
  • #18 g_application_activate
    at gapplication.c line 1069
  • #19 cheese_main_real_local_command_line
    at cheese-main.c line 206
  • #20 g_application_run
    at gapplication.c line 1193
  • #21 _vala_main
    at cheese-main.c line 360
  • #22 main
    at cheese-main.c line 371

Comment 1 Murray Cumming 2011-02-25 13:34:00 UTC
An updated backtrace after rebuilding GTK+ from today's git master:

  • #0 g_log
    at gmessages.c line 576
  • #1 g_return_if_fail_warning
  • #2 gtk_cell_area_stop_editing
    at gtkcellarea.c line 3478
  • #3 gtk_icon_view_set_columns
    at gtkiconview.c line 5528
  • #4 cheese_thumb_view_init
    at thumbview/cheese-thumb-view.c line 635
  • #5 g_type_create_instance
    at gtype.c line 1889
  • #6 g_object_constructor
    at gobject.c line 1615
  • #7 gtk_icon_view_constructor
    at gtkiconview.c line 1114
  • #8 g_object_newv
    at gobject.c line 1479
  • #9 g_object_new
    at gobject.c line 1308
  • #10 cheese_thumb_view_new
    at thumbview/cheese-thumb-view.c line 655
  • #11 cheese_main_window_setup_ui
    at cheese-window.c line 2509
  • #12 cheese_main_on_app_activate
    at cheese-main.c line 150
  • #13 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #14 g_closure_invoke
    at gclosure.c line 767
  • #15 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #16 g_signal_emit_valist
    at gsignal.c line 2983
  • #17 g_signal_emit
    at gsignal.c line 3040
  • #18 g_application_activate
    at gapplication.c line 1069
  • #19 cheese_main_real_local_command_line
    at cheese-main.c line 206
  • #20 g_application_run
    at gapplication.c line 1193
  • #21 _vala_main
    at cheese-main.c line 360
  • #22 main
    at cheese-main.c line 371

Comment 2 Tristan Van Berkom 2011-02-25 18:23:50 UTC
Thanks for pasting the new backtrace.

Building cheese was going to be time consuming I have a feeling
(as I mentioned to Patricia, first I would have to build the
latest vala, and I dont know what other dependencies).

I added yet another commit to master today to prevent warnings
from the icon view subclasses which access the icon view from
the instance initializer (i.e. before the parent class has finished
initializing... as I also mentioned, I did not intend to support
these premature api accesses but since Company complained so loudly
about it... we ended up supporting them).

Today's commit is 2408b1c59ee3f6c190f5bfcbd7f22520175f1aaf

Again, whether this works well or not, it's wiser to wait for
the super class to finish initializing and only access it's
apis from the ->constructor()... that's a good rule to follow 
for *any* subclass (since it's perfectly valid for the parent
class to add some api in the future that requires it to finish
initializing in ->constructor()).
Comment 3 Murray Cumming 2011-02-25 18:39:07 UTC
Thanks. I don't really expect you to build Cheese. It's just to give a hint. 

Unfortunately the warning is still there, with this backtrace at that point:

  • #0 g_log
    at gmessages.c line 576
  • #1 g_return_if_fail_warning
  • #2 gtk_cell_area_stop_editing
    at gtkcellarea.c line 3478
  • #3 gtk_icon_view_rows_reordered
    at gtkiconview.c line 3406
  • #4 _gtk_marshal_VOID__BOXED_BOXED_POINTER
    at gtkmarshalers.c line 1348
  • #5 g_closure_invoke
    at gclosure.c line 767
  • #6 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #7 g_signal_emit_valist
    at gsignal.c line 2983
  • #8 g_signal_emit
    at gsignal.c line 3040
  • #9 gtk_tree_model_rows_reordered
    at gtktreemodel.c line 1852
  • #10 gtk_list_store_sort_iter_changed
    at gtkliststore.c line 1891
  • #11 gtk_list_store_set_valist
    at gtkliststore.c line 990
  • #12 gtk_list_store_set
    at gtkliststore.c line 1026
  • #13 cheese_thumb_view_append_item
    at thumbview/cheese-thumb-view.c line 252
  • #14 cheese_thumb_view_fill
    at thumbview/cheese-thumb-view.c line 519
  • #15 cheese_thumb_view_init
    at thumbview/cheese-thumb-view.c line 647
  • #16 g_type_create_instance
    at gtype.c line 1889
  • #17 g_object_constructor
    at gobject.c line 1615
  • #18 gtk_icon_view_constructor
    at gtkiconview.c line 1114
  • #19 g_object_newv
    at gobject.c line 1479
  • #20 g_object_new
    at gobject.c line 1308
  • #21 cheese_thumb_view_new
    at thumbview/cheese-thumb-view.c line 655
  • #22 cheese_main_window_setup_ui
    at cheese-window.c line 2511
  • #23 cheese_main_on_app_activate
    at cheese-main.c line 150
  • #24 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #25 g_closure_invoke
  • #26 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #27 g_signal_emit_valist
    at gsignal.c line 2983
  • #28 g_signal_emit
    at gsignal.c line 3040
  • #29 g_application_activate
    at gapplication.c line 1069
  • #30 cheese_main_real_local_command_line
    at cheese-main.c line 206
  • #31 g_application_run
    at gapplication.c line 1193
  • #32 _vala_main
    at cheese-main.c line 346
  • #33 main
    at cheese-main.c line 357

Comment 4 Murray Cumming 2011-02-25 18:40:04 UTC
Actually, maybe we should just change the CheeseThumbView. Can you describe what you think we are doing wrong?
Comment 5 Murray Cumming 2011-02-25 18:50:31 UTC
Created attachment 181937 [details] [review]
0001-Avoid-GtkIconView-warnings.patch

This seems to fix it. Is this what you mean? And should I move more code from init() to constructed()?
Comment 6 Tristan Van Berkom 2011-02-25 19:25:15 UTC
I just added another patch to icon view that should fix your last
warning f85e80aadadbd5ff96e18c5669376278f84ab451 (Company will be happy
that we've forced as much api as possible to work from that stage).

(In reply to comment #5)
> Created an attachment (id=181937) [details] [review]
> 0001-Avoid-GtkIconView-warnings.patch
> 
> This seems to fix it. Is this what you mean? And should I move more code from
> init() to constructed()?

Yes that's what I mean.

The thing is GtkCellLayout widgets that use a GtkCellArea build the
cell area at constructor() time... this way the cell area can be provided
by the caller with apis such as _new_with_area().

In truth, much GTK+ code already abuses the instance structure initializer
(i.e. the _init()) and goes ahead calling lots of GTK+ apis prematurely, 
however that means that those subclasses will break if ever the parent class 
uses construct properties and defers its initialization to a later time
than _init().
Comment 7 Murray Cumming 2011-02-25 20:04:59 UTC
Thanks, and sorry for any frustration. The warnings are now gone, even without that patch to Cheese, so we can close this bug.

I guess I should move more code into constructed() too anyway.
Comment 8 Murray Cumming 2011-02-25 20:12:44 UTC
Created attachment 181947 [details] [review]
0001-Avoid-GtkIconView-warnings2.patch

Actually, I'll keep this open so that Patricia can apply this patch to make things generally safer.
Comment 9 Patricia Santana Cruz 2011-02-28 10:20:43 UTC
I already applied the patch so we can close this bug. Everything worked fine and the warnings are not showing any more. Thanks for the help!