Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-02

Compilation aborted!

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Donald Ziesig

Hi Everyone:

I am writing a package that currently has one unit file which, in turn, has two inter-related classes.

Until just now, the package compiled (some empty methods) with only expected info and warnings.  I just did some minor editing (added 6 contiguous lines) and now I get "FATAL Compilation aborted".  I commented out the newly entered code, but the compilation aborts.  I removed the newly entered code but it still aborts.

I ran the IDE from a terminal and it suggested that I look at the State file (.compiled).  I did, but it has nothing of interest.

Can anyone suggest what to do next to isolate the problem?

Thanks,

Don Ziesig

Reply by email

Donald Ziesig
to Donald Ziesig
Donald Ziesig wrote 20 lines
Hi Everyone: I am writing a package that currently has one unit file which, in turn, has two inter-related classes. Until just now, the package compiled (some empty methods) with only expected info and warnings.  I just did some minor editing (added 6 contiguous lines) and now I get "FATAL Compilation aborted".  I commented out the newly entered code, but the compilation aborts.  I removed the newly entered code but it still aborts. I ran the IDE from a terminal and it suggested that I look at the State file (.compiled).  I did, but it has nothing of interest. Can anyone suggest what to do next to isolate the problem? Thanks, Don Ziesig

Forgot to add: Linux Mint 18.3, Lazarus 1.8.0 02-09-2018 SVN 57265M, FPC 3.0.4

Reply by email

Donald Ziesig
to Donald Ziesig
Donald Ziesig wrote 25 lines
On 02/17/2018 10:08 PM, Donald Ziesig via Lazarus wrote: > Hi Everyone: > > I am writing a package that currently has one unit file which, in > turn, has two inter-related classes. > > Until just now, the package compiled (some empty methods) with only > expected info and warnings.  I just did some minor editing (added 6 > contiguous lines) and now I get "FATAL Compilation aborted".  I > commented out the newly entered code, but the compilation aborts.  I > removed the newly entered code but it still aborts. > > I ran the IDE from a terminal and it suggested that I look at the > State file (.compiled).  I did, but it has nothing of interest. > > Can anyone suggest what to do next to isolate the problem? > > Thanks, > > Don Ziesig > Forgot to add: Linux Mint 18.3, Lazarus 1.8.0 02-09-2018 SVN 57265M, FPC 3.0.4

Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error (AV).  It is getting late here. I will look at this in the morning.

Reply by email

Mattias Gaertner
to Donald Ziesig
[...] Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error (AV).  It is getting late here. I will look at this in the morning.

Maybe you got messed up ppu files, or you messed up unit paths.

Mattias

Reply by email

Donald Ziesig
to Mattias Gaertner
Mattias Gaertner wrote 9 lines
On Sat, 17 Feb 2018 22:35:17 -0500 Donald Ziesig via Lazarus wrote: > [...] > Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error > (AV).  It is getting late here. I will look at this in the morning. Maybe you got messed up ppu files, or you messed up unit paths. Mattias

I found the problem!  It is definitely a compiler bug (compiler did NOT report the actual error, all it did was throw an Access Violation).

Unfortunately, I had changed one more line than I remembered during the last edit before the failure.

That line was (in the type(s) declaration:

     TAMBytes = array[0..1] of Byte;

I changed it to:

   TAMBytes = array[0..High(Integer)] of Byte;

Type TAMBytes was used as the return type is several functions. When I commented out ALL of the code that used TAMBytes, the error went away.  Since TAMBytes was the only consistent item in that code, I checked its declaration and remembered the other :-[ change I made. Reverted that to the original version and the compilation succeeded.  Finally changed it to:

   TAMBytes = array[0..32767] of Byte;

This also compiled successfully, and was big enough that it will handle much bigger arrays than I expected to use.

I will create a simplified test case and submit a bug report to Free Pascal.

Thanks for putting up with my earlier complaints.

Don Ziesig

Reply by email

Virgo Pärna
to Donald Ziesig
Donald Ziesig wrote
  TAMBytes = array[0..High(Integer)] of Byte;

Was it 32 bit compiler? Because 2GB - 1 byte array would really be problem with 32 bit programs. But ofcause it should not result in Access Violation.

Virgo Pärna

Reply by email

Virgo Pärna
to Virgo Pärna
Virgo Pärna wrote 8 lines
On Sun, 18 Feb 2018 12:51:49 -0500, Donald Ziesig via Lazarus wrote: > >   TAMBytes = array[0..High(Integer)] of Byte; > Was it 32 bit compiler? Because 2GB - 1 byte array would really be problem with 32 bit programs. But ofcause it should not result in Access Violation.

Correction: actully 2GB. Forgot 0th byte.

Virgo Pärna

Reply by email