comp.lang.ada
 help / color / mirror / Atom feed
* Tagged Types ..
@ 2004-09-05 12:54 Patrice Freydiere
  2004-09-05 11:15 ` Simon Wright
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Patrice Freydiere @ 2004-09-05 12:54 UTC (permalink / raw)


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 





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-05 21:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-05 12:54 Tagged Types Patrice Freydiere
2004-09-05 11:15 ` Simon Wright
2004-09-05 13:09 ` Patrice Freydiere
2004-09-05 17:37   ` Jeff C r e e.m
2004-09-05 21:08 ` Jeffrey Carter

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