comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: exception access violation
Date: Mon, 13 Nov 2006 22:35:52 +0100
Date: 2006-11-13T23:33:12+01:00	[thread overview]
Message-ID: <1163453752.8475.3.camel@localhost.localdomain> (raw)
In-Reply-To: <1163446297.630444.280740@b28g2000cwb.googlegroups.com>

On Mon, 2006-11-13 at 11:31 -0800, Jade wrote:
> Hi,
> I am compiling a program with gnat gps and I am receiving an access
> violation error.  And my program crashes at this point.
> 
>  Exception raised
>  >>> Exception Name        => PROGRAM_ERROR
> >>> Exception Message     => EXCEPTION_ACCESS_VIOLATION
> Does anyone know what this could mean?  

Could be related to memory access via the operation system, GNAT
experts might be able to tell.
This will be easier to say if you post some code. This excerpt is
from seh_init.c, which you can find in ${GNAT_DIR}/.../adainclude/

  switch (ExceptionRecord->ExceptionCode)
    {
    case EXCEPTION_ACCESS_VIOLATION:
      /* If the failing address isn't maximally-aligned or if the page
         before the faulting page is not accessible, this is a program error.
      */
      if ((ExceptionRecord->ExceptionInformation[1] & 3) != 0
          || IsBadCodePtr
          ((void *)(ExceptionRecord->ExceptionInformation[1] + 4096)))
        {
          exception = &program_error;
          msg = "EXCEPTION_ACCESS_VIOLATION";
        }
      else
        {
          /* otherwise it is a stack overflow  */
          exception = &storage_error;
          msg = "stack overflow (or erroneous memory access)";
        }
      break;



-- Georg 





  reply	other threads:[~2006-11-13 21:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13 19:31 exception access violation Jade
2006-11-13 21:35 ` Georg Bauhaus [this message]
2006-11-14  9:09 ` Alex R. Mosteo
2006-11-14 19:34   ` Jade
2006-11-15  9:58     ` Alex R. Mosteo
2006-11-15  9:52       ` Georg Bauhaus
2006-11-15 13:32         ` Alex R. Mosteo
2006-11-15 23:43         ` Kevin K
  -- strict thread matches above, loose matches on Subject: below --
2009-05-18 16:05 Exception_Access_Violation mhamel_98
2009-05-18 16:14 ` Exception_Access_Violation John B. Matthews
2009-05-19  7:23   ` Exception_Access_Violation Alex R. Mosteo
2009-05-20 15:30     ` Exception_Access_Violation mhamel_98
2009-05-22 14:34       ` Exception_Access_Violation Björn Persson
2009-05-22 15:17         ` Exception_Access_Violation Niklas Holsti
2009-05-22 16:38       ` Exception_Access_Violation Adam Beneschan
2001-12-07 12:41 exception access violation Cousins, Jeff
replies disabled

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