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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.205.71 with SMTP id d68mr4291390iog.5.1468364931588; Tue, 12 Jul 2016 16:08:51 -0700 (PDT) X-Received: by 10.157.10.1 with SMTP id 1mr154683otg.12.1468364931466; Tue, 12 Jul 2016 16:08:51 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!jk6no21583702igb.0!news-out.google.com!d68ni5599ith.0!nntp.google.com!hy1no241280igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 12 Jul 2016 16:08:51 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8202:8510:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8202:8510:5985:2c17:9409:aa9c References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <08db03b5-dad4-4a03-8b79-95049e081843@googlegroups.com> Subject: Re: Application Crashes when linked with DLL From: rieachus@comcast.net Injection-Date: Tue, 12 Jul 2016 23:08:51 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31080 Date: 2016-07-12T16:08:51-07:00 List-Id: On Tuesday, July 12, 2016 at 3:50:09 PM UTC-4, Aurele wrote: > Hi o/, I'm working with Gautier and we stumbled on an interesting program= behavior and thought of sharing it with you for comments. We are using the= latest version (2016) of Adacore GNAT programming studio. Here is the prob= lem: =20 >=20 > Create a dynamic link library (DLL) and link it to an separate applicatio= n. The application crashes with the message "This application as requested = the runtime to terminate in an unusual way. Specifically, the problem is ca= used by the exception block in the application. Remove it and all is well. Two things. First, the message you are seeing comes from Windows. At least= , I have seen it in other cases where a DLL failed. Second, why are you overloading Constraint_Error? It may be perfectly lega= l, but what happens when you run some code from the Ada run-time where Cons= traint_Error is suppressed? Try commenting out the declaration of Constrai= nt_Error, or do a global change of Constraint_Error in your code to somethi= ng else. The problem with renaming Constraint_Error is that in some places= in the Ada run-time and environment it may be raised or referred to by nam= e, and in other cases implicitly such as out of range assignments or pragma= Suppress.