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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Expected exception is not thrown in Windows XP, should be a compiler bug? Date: Tue, 28 May 2013 18:46:36 +0200 Organization: Tidorum Ltd Message-ID: References: <738d74eb-dbba-4a4b-8d56-a2ce1b39955e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: individual.net KTy2MQJlMVnX7IZwW14mzgUnwASXu/iIMornYOdE0xIl3fy/6r Cancel-Lock: sha1:IhRRR9m9cjT22ILZBDmafOT2L8g= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <738d74eb-dbba-4a4b-8d56-a2ce1b39955e@googlegroups.com> X-Original-Bytes: 3446 Xref: number.nntp.dca.giganews.com comp.lang.ada:181757 Date: 2013-05-28T18:46:36+02:00 List-Id: On 13-05-28 12:17 , ake.ragnar.dahlgren@gmail.com wrote: > Den måndagen den 27:e maj 2013 kl. 16:45:14 UTC+2 skrev Niklas Holsti: [ snip totally format-clobbered quote ] > Thank you and Jesper for your thoughts. > > I should further investigate the possibility of a > missing environment variable, but if I add more logging to > standard out it seems to me that the problem does not occur > during elaboration time but during execution of the Ada.Strings.Fixed.Move > command. Consider: > > with Ada.Text_IO; > with Ada.Strings.Fixed; > with GNATCOLL.SQL.Postgres; > > procedure Main is > Host_URL : aliased constant String := "localhosta"; > begin > declare > type Host_URL_Type is new String (1 .. 9); > > Target_Host_URL : Host_URL_Type; > begin > Ada.Text_IO.Put_Line ("Will execute Main method"); > Ada.Strings.Fixed.Move (Source => Host_URL, > Target => String (Target_Host_URL)); I don't know if this is related to the problem, but this call of Move should propagate Length_Error, since the Target is only 9 characters long but the Source is 10 characters (and the overflow character is not a space). Of course this Length_Error should be caught in your catch-all handler, below: > Ada.Text_IO.Put_Line("Executed Main method"); > end; > exception > when others => > Ada.Text_IO.Put_Line("Write some error message"); > end Main; > > It has the following output: > > C:\temp>main > Will execute Main method > > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > Maybe the GNATCOLL.SQL.Postgres package creates a new task that executes > some C-code which makes the whole application crash and it just happens > to do so during the execution of the Ada.Strings.Fixed.Move command by > the environment task? ... or during the exception-handling in the environment task. I think that is possible .. in principle, but it seems a bit unlikely. So perhaps there is a real bug somewhere. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .