comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Brooks <peter.h.m.brooks@gmail.com>
Subject: Where would you start debugging?
Date: Thu, 27 Jun 2013 06:53:09 -0700 (PDT)
Date: 2013-06-27T06:53:09-07:00	[thread overview]
Message-ID: <8b4c7660-3f0b-41a2-9cc3-2ab1c595e182@googlegroups.com> (raw)

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?

             reply	other threads:[~2013-06-27 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 13:53 Peter Brooks [this message]
2013-06-27 14:24 ` Where would you start debugging? Peter Brooks
2013-06-27 14:33 ` G.B.
2013-06-28 10:35   ` Peter Brooks
replies disabled

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