comp.lang.ada
 help / color / mirror / Atom feed
* Where would you start debugging?
@ 2013-06-27 13:53 Peter Brooks
  2013-06-27 14:24 ` Peter Brooks
  2013-06-27 14:33 ` G.B.
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Brooks @ 2013-06-27 13:53 UTC (permalink / 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-28 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 13:53 Where would you start debugging? Peter Brooks
2013-06-27 14:24 ` Peter Brooks
2013-06-27 14:33 ` G.B.
2013-06-28 10:35   ` Peter Brooks

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