Re: Threads and gtk_widget_show (code should not be reached?)



You missed the list in your last reply. It is quoted below, and I've
attached the file you sent me as well (table.txt).

On Thu, Jan 31, 2013 at 4:54 PM, Ferdinand Ramirez <
ramirez ferdinand yahoo com> wrote:

 Attached is a working program with GtkEntry in the table. If you comment
out line 21 and uncomment line 20 to use GtkTextView instead of GtkEntry,
you will encounter the error I mentioned.

Similarly, if you replace the gtk_widget_show_all on line 65 by
gtk_widget_show, the error goes away but does not draw the table, only the
outermost frame. In fact, doing gtk_widget_show for successive levels of
children works until you reach the GtkTextView level.

Am I invoking (in lines 73 to 75) the function to create the table in the
correct manner from the thread? What you see in lines 71 and 72 are
alternatives to invoking the function but those have identical results as
well.

-Ferdinand


I've found that this isn't related to threading, and seems to be a bug in
TextView; my guess is embedding TextViews inside TextViews is somehow a bad
idea.
This error only effects Gtk+-2.0 (at least 2.24.13), and does not effect
Gtk+3.0 (3.6.4)

I have attached a more concise version of the program that produces the
bug. I found that if you delay the show_all on the embedded TextViews to
another g_idle_add, you don't get the error.
I believe the code is valid, so if nobody else has a comment you might want
to file a bug. I don't know if Gtk+2 gets bugfixes anymore though..

The error is:
Gtk-WARNING **: gtktextview.c:4610: somehow some text lines were modified
or scrolling occurred since the last validation of lines on the screen -
may be a text widget bug.
Gtk:ERROR:gtktextview.c:4611:gtk_text_view_paint: code should not be reached

And the backtrace is:
#0  0x00000030f9a35ba5 in raise () from /lib64/libc.so.6
#1  0x00000030f9a37358 in abort () from /lib64/libc.so.6
#2  0x00007ffff7775b37 in g_assertion_message () from
/lib64/libglib-2.0.so.0
#3  0x000000345001efd5 in gtk_text_view_expose_event () from
/lib64/libgtk-x11-2.0.so.0
#4  0x000000344ff4da3c in _gtk_marshal_BOOLEAN__BOXED () from
/lib64/libgtk-x11-2.0.so.0
#5  0x00007ffff7a3d910 in g_closure_invoke () from
/lib64/libgobject-2.0.so.0
#6  0x00007ffff7a4ea80 in signal_emit_unlocked_R () from
/lib64/libgobject-2.0.so.0
#7  0x00007ffff7a568c7 in g_signal_emit_valist () from
/lib64/libgobject-2.0.so.0
#8  0x00007ffff7a56de2 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#9  0x00000034500814be in gtk_widget_event_internal () from
/lib64/libgtk-x11-2.0.so.0
#10 0x000000344ff4be80 in gtk_main_do_event () from
/lib64/libgtk-x11-2.0.so.0
#11 0x000000344fa4556c in _gdk_window_process_updates_recurse () from
/lib64/libgdk-x11-2.0.so.0
#12 0x000000344fa45513 in _gdk_window_process_updates_recurse () from
/lib64/libgdk-x11-2.0.so.0
#13 0x000000344fa45513 in _gdk_window_process_updates_recurse () from
/lib64/libgdk-x11-2.0.so.0
#14 0x000000344fa45513 in _gdk_window_process_updates_recurse () from
/lib64/libgdk-x11-2.0.so.0
#15 0x000000344fa400e7 in gdk_window_process_updates_internal () from
/lib64/libgdk-x11-2.0.so.0
#16 0x000000344fa4263e in gdk_window_process_updates () from
/lib64/libgdk-x11-2.0.so.0
#17 0x0000003450017eb2 in gtk_text_view_value_changed () from
/lib64/libgtk-x11-2.0.so.0
#18 0x0000003450018346 in get_hadjustment () from /lib64/libgtk-x11-2.0.so.0
#19 0x000000345001b140 in gtk_text_view_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#20 0x00007ffff7a40a9e in g_cclosure_marshal_VOID__BOXEDv () from
/lib64/libgobject-2.0.so.0
#21 0x00007ffff7a3db0b in _g_closure_invoke_va () from
/lib64/libgobject-2.0.so.0
#22 0x00007ffff7a563a8 in g_signal_emit_valist () from
/lib64/libgobject-2.0.so.0
#23 0x00007ffff7a56de2 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#24 0x0000003450086268 in gtk_widget_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#25 0x000000344ff090ae in gtk_frame_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#26 0x00007ffff7a40a9e in g_cclosure_marshal_VOID__BOXEDv () from
/lib64/libgobject-2.0.so.0
#27 0x00007ffff7a3db0b in _g_closure_invoke_va () from
/lib64/libgobject-2.0.so.0
#28 0x00007ffff7a563a8 in g_signal_emit_valist () from
/lib64/libgobject-2.0.so.0
#29 0x00007ffff7a56de2 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#30 0x0000003450086268 in gtk_widget_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#31 0x000000344ffe595b in gtk_table_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#32 0x00007ffff7a40a9e in g_cclosure_marshal_VOID__BOXEDv () from
/lib64/libgobject-2.0.so.0
#33 0x00007ffff7a3db0b in _g_closure_invoke_va () from
/lib64/libgobject-2.0.so.0
#34 0x00007ffff7a563a8 in g_signal_emit_valist () from
/lib64/libgobject-2.0.so.0
#35 0x00007ffff7a56de2 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#36 0x0000003450086268 in gtk_widget_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#37 0x000000344ff090ae in gtk_frame_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#38 0x00007ffff7a40a9e in g_cclosure_marshal_VOID__BOXEDv () from
/lib64/libgobject-2.0.so.0
#39 0x00007ffff7a3dbd7 in _g_closure_invoke_va () from
/lib64/libgobject-2.0.so.0
#40 0x00007ffff7a563a8 in g_signal_emit_valist () from
/lib64/libgobject-2.0.so.0
#41 0x00007ffff7a56de2 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#42 0x0000003450086268 in gtk_widget_size_allocate () from
/lib64/libgtk-x11-2.0.so.0
#43 0x00000034500188c6 in gtk_text_view_child_allocated () from
/lib64/libgtk-x11-2.0.so.0
#44 0x00007ffff7a3d910 in g_closure_invoke () from
/lib64/libgobject-2.0.so.0
#45 0x00007ffff7a4ed08 in signal_emit_unlocked_R () from
/lib64/libgobject-2.0.so.0
#46 0x00007ffff7a56c8d in g_signal_emit_valist () from
/lib64/libgobject-2.0.so.0
#47 0x00007ffff7a56de2 in g_signal_emit () from /lib64/libgobject-2.0.so.0
#48 0x000000345000a6a5 in gtk_text_layout_get_line_display () from
/lib64/libgtk-x11-2.0.so.0
#49 0x000000345000b21a in gtk_text_layout_real_wrap () from
/lib64/libgtk-x11-2.0.so.0
#50 0x000000344ffef203 in _gtk_text_btree_validate_line () from
/lib64/libgtk-x11-2.0.so.0
#51 0x00000034500096e1 in gtk_text_layout_validate_yrange () from
/lib64/libgtk-x11-2.0.so.0
#52 0x00000034500186a7 in gtk_text_view_validate_onscreen () from
/lib64/libgtk-x11-2.0.so.0
#53 0x000000345001acae in gtk_text_view_flush_first_validate () from
/lib64/libgtk-x11-2.0.so.0
#54 0x000000345001ace9 in first_validate_callback () from
/lib64/libgtk-x11-2.0.so.0
#55 0x000000344fa1ebb7 in gdk_threads_dispatch () from
/lib64/libgdk-x11-2.0.so.0
#56 0x00007ffff7753a55 in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#57 0x00007ffff7753d88 in g_main_context_iterate.isra.24 () from
/lib64/libglib-2.0.so.0
#58 0x00007ffff7754182 in g_main_loop_run () from /lib64/libglib-2.0.so.0
#59 0x000000344ff4ab47 in gtk_main () from /lib64/libgtk-x11-2.0.so.0
#60 0x0000000000401142 in main ()

Attachment: table.txt
Description: Text document

Attachment: table-concise.txt
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]