Sign in Join

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

Mailing lists / fpc-devel / 2012-01

Access violation during compilation

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

kyan

Hello everyone.

I am trying to port a set of Delphi libraries to FPC and during compilation from the Lazarus IDE I get a "Compilation aborted" without any other explanation. Doing the build from a command prompt I get this:

Compiling unit1.pas
Compiling C:\Projects\MkCtrls\PropStorage.pas
Compiling C:\Projects\MkCtrls\UHom.pas
Compiling C:\Projects\MkCtrls\uHomXPath.pas
Fatal: Compilation aborted
An unhandled exception occurred at $0000000100042D3C: EAccessViolation: Access violation
$0000000100042D3C
$0000000100120431
$000000010011EC8B
$0000000100121075
$000000010012109C
$000000010012109C
$000000010012109C
$0000000100121DFB
$000000010010CC45
$0000000100109CF8
$000000010010C68B
$000000010010CC75
$0000000100107BF4
$0000000100107A39
$000000010003D596
$000000010014759E
$00000001001520A1

It seems that the compiler itself throws an AV. I am trying to isolate the code structure that causes this AV so that I can rewrite it or report a bug but I haven't been able to do it so far because the involved units are quite complex and depend on each other and other units heavily.

Is there any way to get the compiler to give me more information about what causes the AV? I am using fpc 2.7.1 for OS Win64 and CPU x86/64 but I get the same result with Win32/i386.

ΤΙΑ.

Reply by email

Marco van de Voort
to kyan

In our previous episode, kyan said:

Show quoted text 31 lines
Compiling unit1.pas Compiling C:\Projects\MkCtrls\PropStorage.pas Compiling C:\Projects\MkCtrls\UHom.pas Compiling C:\Projects\MkCtrls\uHomXPath.pas Fatal: Compilation aborted An unhandled exception occurred at $0000000100042D3C: EAccessViolation: Access violation $0000000100042D3C $0000000100120431 $000000010011EC8B $0000000100121075 $000000010012109C $000000010012109C $000000010012109C $0000000100121DFB $000000010010CC45 $0000000100109CF8 $000000010010C68B $000000010010CC75 $0000000100107BF4 $0000000100107A39 $000000010003D596 $000000010014759E $00000001001520A1 It seems that the compiler itself throws an AV. I am trying to isolate the code structure that causes this AV so that I can rewrite it or report a bug but I haven't been able to do it so far because the involved units are quite complex and depend on each other and other units heavily.

That is still the way to go. It is not terribly difficult but can be overwhelming the first times. Just push yourself through after a few times it gets easier.

There are some tricks to help though:

- increase verbosity (-va) from this log you can sometimes find out where the crash happens
- inserting errors in the relevant unit by inserting random characters in a binary search program (if the compiler errors on the "XXX" that I inserted, then that spot is before the crash, ok, now lets move the XXX a bit further into the unit)
- recompiling the compiler with lineinfo (-gl, -gw, don't know if that works for win64 atm), the traceback might give you an idea which language feature causes the crash.

Reply by email

Alexander Shishkin
to kyan: Hello everyone. I am trying to port a set of Delphi libraries to FPC and during…

18.01.2012 15:39, kyan пишет:

Show quoted text 48 lines
Hello everyone. I am trying to port a set of Delphi libraries to FPC and during compilation from the Lazarus IDE I get a "Compilation aborted" without any other explanation. Doing the build from a command prompt I get this: Compiling unit1.pas Compiling C:\Projects\MkCtrls\PropStorage.pas Compiling C:\Projects\MkCtrls\UHom.pas Compiling C:\Projects\MkCtrls\uHomXPath.pas Fatal: Compilation aborted An unhandled exception occurred at $0000000100042D3C: EAccessViolation: Access violation $0000000100042D3C $0000000100120431 $000000010011EC8B $0000000100121075 $000000010012109C $000000010012109C $000000010012109C $0000000100121DFB $000000010010CC45 $0000000100109CF8 $000000010010C68B $000000010010CC75 $0000000100107BF4 $0000000100107A39 $000000010003D596 $000000010014759E $00000001001520A1 It seems that the compiler itself throws an AV. I am trying to isolate the code structure that causes this AV so that I can rewrite it or report a bug but I haven't been able to do it so far because the involved units are quite complex and depend on each other and other units heavily. Is there any way to get the compiler to give me more information about what causes the AV? I am using fpc 2.7.1 for OS Win64 and CPU x86/64 but I get the same result with Win32/i386. ΤΙΑ. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

1) What about fpc 2.6.0?
2) does error appears in clean build?

Reply by email