From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,65b902127ca8a604 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Issue with GNAT GPL 2009 and GtkAda References: <4A414EBB.8060204@free.fr> From: Stephen Leake Date: Thu, 25 Jun 2009 05:06:08 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:yGRDIeONeySSf6lnIdtYrq3NXMM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: d70764a433de8e9cadf9d05636 Xref: g2news2.google.com comp.lang.ada:6611 Date: 2009-06-25T05:06:08-04:00 List-Id: Stephen Leake writes: > Damien Carbonne writes: > >> 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). > > This looks like a compiler bug to me. However, GNAT 6.2.1 on Windows > reports the same access violation. > >> 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. > > Since the access object being dereferenced is in a package level > variable, it should not be possible to get an access violation. > >> 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 ? > > I don't see why interfaces should affect accessibility. Another thought: whenever I have trouble with anonymous access types, I replace them with the corresponding named access type, and the problem goes away. That may indicate a conmpiler bug, but I've always had to much to do to find out. In this case, that means editing the GtkAda sources, which is less than ideal. -- -- Stephe