From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Expected exception is not thrown in Windows XP, should be a compiler bug?
Date: Tue, 28 May 2013 18:46:36 +0200
Date: 2013-05-28T18:46:36+02:00 [thread overview]
Message-ID: <b0k5bcFukgU1@mid.individual.net> (raw)
In-Reply-To: <738d74eb-dbba-4a4b-8d56-a2ce1b39955e@googlegroups.com>
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
. @ .
next prev parent reply other threads:[~2013-05-28 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 10:10 Expected exception is not thrown in Windows XP, should be a compiler bug? ake.ragnar.dahlgren
2013-05-27 14:45 ` Niklas Holsti
2013-05-28 10:17 ` ake.ragnar.dahlgren
2013-05-28 16:46 ` Niklas Holsti [this message]
2013-05-27 14:54 ` Jesper Quorning
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox