[gtkada] Tasking with GtkAda

bertus.dries at planet.nl bertus.dries at planet.nl
Sat Mar 18 12:05:18 CET 2017


I don't know if what I have to say is of any importance to you, But I do 
have an workig program under Windows using GTKAda and tasking. I have done 
nothing with the aid of chapter 8 (Tasking with GtkAda). What I have been 
doing is simply putall GtkAda in one task, in my case the basic task and let 
all othertasks communicate withthis task.

L. Dries

-----Oorspronkelijk bericht----- 
From: Oliver Kellogg
Sent: Friday, March 17, 2017 1:41 AM
To: gtkada at lists.adacore.com
Subject: [gtkada] Tasking with GtkAda

Hello,

We followed the advice given at

http://docs.adacore.com/gtkada-docs/gtkada_ug/_build/html/tasking.html

but still found that our program would crash after a varying amount of time, 
at varying places (usually ending somewhere in libpango).

All backtraces had in common that recompute_idle_func() was involved.
Here is an example backtrace:

(sns_main:2426): Pango-CRITICAL **: pango_layout_line_get_extents: assertion 
'LINE_IS_VALID (line)' failed

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff57b5955 in pango_context_get_font_description () from 
/lib64/libpango-1.0.so.0
(gdb) bt
#0  0x00007ffff57b5955 in pango_context_get_font_description () from 
/lib64/libpango-1.0.so.0
#1  0x00007ffff57ba4c8 in pango_layout_get_empty_extents_at_index () from 
/lib64/libpango-1.0.so.0
#2  0x00007ffff57bd175 in pango_layout_line_get_extents () from 
/lib64/libpango-1.0.so.0
#3  0x00007ffff69d3a66 in gtk_entry_adjust_scroll () from 
/lib64/libgtk-3.so.0
#4  0x00007ffff69d5190 in recompute_idle_func () from /lib64/libgtk-3.so.0
#5  0x00007ffff65e66b8 in gdk_threads_dispatch () from /lib64/libgdk-3.so.0
#6  0x00007ffff4d34d7a in g_main_context_dispatch () from 
/lib64/libglib-2.0.so.0
#7  0x00007ffff4d350b8 in g_main_context_iterate.isra () from 
/lib64/libglib-2.0.so.0
#8  0x00007ffff4d3538a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#9  0x00007ffff6a4d045 in gtk_main () from /lib64/libgtk-3.so.0

Our program makes GUI widget update calls from Ada tasks.

We changed the program so that the Ada tasks put their widget update 
requests into a protected-object based queue, and in the main program we 
call Glib.Main.Timeout_Add with a function that reads from this queue and 
executes the requests.
Since that change, our tasking program has been running without crash.

Oliver





_______________________________________________
gtkada mailing list
gtkada at lists.adacore.com
http://lists.adacore.com/mailman/listinfo/gtkada

_______________________________________________
gtkada mailing list
gtkada at lists.adacore.com
http://lists.adacore.com/mailman/listinfo/gtkada 



More information about the gtkada mailing list