comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Issue with GNAT GPL 2009 and GtkAda
Date: Wed, 24 Jun 2009 09:40:03 +0200
Date: 2009-06-24T09:40:03+02:00	[thread overview]
Message-ID: <ydn18fa84slk$.9huvcp0qqrmb.dlg@40tude.net> (raw)
In-Reply-To: 4A414EBB.8060204@free.fr

On Tue, 23 Jun 2009 23:52:59 +0200, Damien Carbonne wrote:

> When compiling a program I had written to GNAT GPL 2009 on Linux and 
> Windows, I met a problem with the usage of Gtk.Tree_Model.Foreach.
> 
> I wrote a relatively small program (unfortunately, still quite long) 
> that reproduces the problem (attached in the end).
> 
> I wonder if this is a bug in
>     1) my program,
>     2) GtkAda or
>     3) GNAT GPL 2009.
> What surprises me is that it was quite hard to reproduce this problem.
> Most other examples I wrote with Foreach worked very well.
> I don't know how GNAT handles accessibility rules.
> I wonder if the problem is not related to the usage of Interfaces ?
> I did not try yet to change the program so that it can work, but other 
> examples I wrote were quite similar, except that they did not use 
> interfaces. I'll check, but do you have any idea on this issue ?

Well, it is difficult to say, I never used foreach. I do Gtk_Tree_Iter
instead. I looked briefly at the implementation of Foreach in GtkAda and
found nothing offending.

Interface should not be a problem. Run-time accessibility checks is always
a *huge* problem. If in doubt use Unchecked_Access everywhere. I know it is
disgusting, but so is the propagation of a Constraint_Error at run-time.

Other possible issues:

1. Types extending GtkAda types must be library-level

2. Text_IO shall not be used (may cause exception propagation at least on
some platforms, with a subsequent crash. Ada exceptions propagated through
Gtk almost certainly crash the program. You cannot catch them)

3. In your code there is no "unref" the model after Set_Model. Tree model
is not a widget, it must be explicitly unreferenced.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2009-06-24  7:40 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:52 Issue with GNAT GPL 2009 and GtkAda Damien Carbonne
2009-06-24  7:40 ` Dmitry A. Kazakov [this message]
2009-06-24 10:15 ` Stephen Leake
2009-06-25  9:06   ` Stephen Leake
2009-06-25  9:39     ` Dmitry A. Kazakov
2009-06-25 19:02       ` Damien Carbonne
2009-06-26  9:31         ` Stephen Leake
2009-06-26 11:18           ` Niklas Holsti
2009-06-26 16:29             ` Damien Carbonne
2009-06-26 17:28               ` Dmitry A. Kazakov
2009-06-26 19:27                 ` Damien Carbonne
2009-06-26 19:50                   ` Dmitry A. Kazakov
2009-06-26 21:51             ` Randy Brukardt
2009-06-27 11:11               ` Stephen Leake
2009-06-27 17:04                 ` Robert A Duff
2009-06-30 11:11                   ` Stephen Leake
2009-06-30 18:10                     ` Robert A Duff
2009-06-29 22:11                 ` Randy Brukardt
2009-06-30 11:13                   ` Stephen Leake
2009-06-30 15:26                     ` Adam Beneschan
2009-06-30 15:59               ` Adam Beneschan
2009-06-30 23:11                 ` Randy Brukardt
2009-06-27  9:56             ` Stephen Leake
2009-06-26 21:03           ` Damien Carbonne
2009-06-27 11:21             ` Stephen Leake
2009-06-27 12:25               ` Damien Carbonne
2009-06-27 12:35                 ` Damien Carbonne
2009-06-29 22:15                   ` Randy Brukardt
2009-07-01 19:22                     ` Damien Carbonne
2009-06-30  0:48             ` Adam Beneschan
2009-06-30 11:18               ` Stephen Leake
2009-06-25 20:49       ` Randy Brukardt
2009-06-26  7:20         ` Dmitry A. Kazakov
2009-06-26  8:17           ` Georg Bauhaus
2009-06-26  8:52             ` Dmitry A. Kazakov
2009-06-26 21:38               ` Randy Brukardt
2009-06-27  7:47                 ` Dmitry A. Kazakov
2009-06-29 21:59                   ` Randy Brukardt
2009-06-30  8:31                     ` Dmitry A. Kazakov
2009-06-26 21:31           ` Randy Brukardt
2009-06-27  7:53             ` Dmitry A. Kazakov
2009-06-26  8:39       ` Alex R. Mosteo
2009-06-26  9:07         ` Dmitry A. Kazakov
2009-06-27  9:53           ` Stephen Leake
2009-06-26 21:40         ` Randy Brukardt
2009-06-29 10:04           ` Alex R. Mosteo
2009-06-26  9:02       ` Stephen Leake
2009-06-26  9:14         ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox