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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,605e49a96dc9a0fd,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!feeder2-1.proxad.net!news12-e.free.fr!not-for-mail From: "Patrice Freydiere" Subject: Tagged Types .. Date: Sun, 05 Sep 2004 14:54:10 +0200 User-Agent: Pan/0.13.0 (The whole remains beautiful) Message-Id: Newsgroups: comp.lang.ada MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Organization: Guest of ProXad - France NNTP-Posting-Date: 05 Sep 2004 12:52:32 MEST NNTP-Posting-Host: 82.228.206.35 X-Trace: 1094381552 news12-e.free.fr 11701 82.228.206.35:34206 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:3331 Date: 2004-09-05T12:52:32+02:00 List-Id: Hi there, i'm using GNAT 3.15p, on linux and i got a strange message in using an access to tagged type i understand this is a runtime error message ??? (null): Bad address here is the context of execution ... for I in As'Range loop declare Im : Ais.Image.Image_access := Ais.Image.Imagecollections.Item_at(Il,I); Ic : Ais.Image.Image'Class := Im.all; begin Ais.Log.Log("Image retreived"); if Im=null then Ais.Log.Log("null address "); end if; declare Ba : Ada.Streams.stream_element_array := Ais.image.Create_thumbnail(Ic); S : String( Integer(Ba'first)..Integer(Ba'last) ); begin Ais.Log.Log("Add"); for J in Ba'Range loop S(Integer(J)) := Character'Val(Ada.Streams.Stream_Element'pos(Ba(J))); end loop; on output i saw 9: FileName =>fleur.png<= 1: Path =>/<= 9: FileName =>fleur.png<= 1: Path =>/<= 9: FileName =>fleur.png<= 1: Path =>/<= 9: FileName =>selection<= sending ... Sending Email Getting the Image /file/2001-03/Soiree_Projet/Photo_101-3-11-09.jpg Getting the Image /file/2001-03/Soiree_Projet/Photo_101-3-11-10.jpg Build attachment Image retreived (null): Bad address [use@villeurbanne]$ i tried to put a log to the called methode (Create_thumbnail) but no log appear .. is this a compiler pb ... ?? i still had several issues using tagged typed , sometime, the bug was due to not using intermediate variables to get tagged type ?? is there something wrong in my development method ? are there some recommendation to use tagged type ? thank's for your help! Patrice