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.66.192.8 with SMTP id hc8mr3594244pac.11.1372341189407; Thu, 27 Jun 2013 06:53:09 -0700 (PDT) X-Received: by 10.182.204.97 with SMTP id kx1mr15746obc.18.1372341189245; Thu, 27 Jun 2013 06:53:09 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!news.glorb.com!qx7no969515pbc.1!news-out.google.com!b2ni38703pby.1!nntp.google.com!j2no2801644qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 27 Jun 2013 06:53:09 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.236.80.248; posting-account=p-xPhAkAAADjHQWEO7sFME2XBdF1P_2H NNTP-Posting-Host: 105.236.80.248 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8b4c7660-3f0b-41a2-9cc3-2ab1c595e182@googlegroups.com> Subject: Where would you start debugging? From: Peter Brooks Injection-Date: Thu, 27 Jun 2013 13:53:09 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:15957 Date: 2013-06-27T06:53:09-07:00 List-Id: I've written a small package, there's not much point in putting it here. The moment I run it it is giving me this error: raised CONSTRAINT_ERROR : erroneous memory access I'm using gnat on a Mac. The odd thing is that this happens when the calling program simply has a 'with' statement mentioning the package, there's no need to call it. So, it's clearly part of the iniitalisation of the package. Where should I start debugging? I'm doing some conversions from strings to enumerated types, so I've a few lines like this: " PACKAGE item_package IS NEW Ada.Text_IO.Enumeration_IO( Enum => item_category ); " So that I can to the conversion later with: " item_package.Get(From => String_Split.Slice(subs,1),Item => item.category(item_number),Last => last); " This strikes me as the most likely place for it to be going wrong - the compiler is obviously happy, but, at run time, that 'NEW' is falling over with a problem with memory allocation. Is that likely? If it is, should I forget this method and just parse the string manually?