View Issue Details

IDProjectCategoryView StatusLast Update
0013323FPCCompilerpublic2009-04-23 02:54
ReporterPaul Ishenin Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.3.1 
Fixed in Version2.4.0 
Summary0013323: compiler crashes when trying to build a bit changed source without clean
DescriptionBuild LCL, then go to graphics.pp and change in the TPen declaration

property Cosmetic: Boolean read FCosmetic write SetCosmetic default True;

to

property Cosmetic: Boolean read FCosmetic write SetCosmetic {default True};

then try to rebuild LCL without clean and you will get an exception which I attached in the additional information. If you clean, build and then restore original default value for Cosmetic property you'll get exception once again.
Additional Informationc:\programming\fpc\bin\i386-win32\make.exe: Entering directory `c:/programming/lazarus/lcl'
c:/programming/fpc/bin/i386-win32/rm.exe -f units/i386-win32/alllclunits.ppu
c:/programming/fpc/bin/i386-win32/ppc386.exe -gl -Fu. -Fuforms -Fuwidgetset -Fiinclude -FE. -FUunits/i386-win32 -gh -di386 alllclunits.pp
Free Pascal Compiler version 2.3.1 [2009/03/13] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling alllclunits.pp
Compiling graphics.pp
Compiling graphics.pp
Compiling graphics.pp
Compiling intfgraphics.pas
FatAn unhandled exception occurred at $0044E718 :
EAccessViolation : Access violation
  $0044E718
  $004E9CBD
  $0042D221
  $004ED6E8
  $004F48A7
  $004F52E5
  $0042D221
  $004ED6E8
  $004ED07E
  $004ED5BC
  $004ED07E
  $004ED5BC
  $004ED203
  al: Compilation aborted
$004ED5BC
  $004ED07E
  $004ED5BC
  $004ED07E

c:\programming\fpc\bin\i386-win32\make.exe: *** [alllclunits.ppu] Error 217
c:\programming\fpc\bin\i386-win32\make.exe: Leaving directory `c:/programming/lazarus/lcl'
TagsNo tags attached.
Fixed in Revision13024
FPCOldBugId
FPCTarget
Attached Files

Activities

Vincent Snijders

2009-03-13 17:20

manager   ~0026092

Last edited: 2009-03-13 17:21

Use Lazarus revision 18982 as starting point to reproduce this issue.

Jesus Reyes

2009-04-08 18:39

developer   ~0026666

It looks too similar to the one I often have (fpc r12965, x86_64)

lr_class.pas(1058,36) Hint: Parameter "StreamOut" not used
lr_class.pas(9566,5) Note: Local variaAn unhandled exception occurred at $0000000000475AF2 :
EAccessViolation : Access violation
  $0000000000475AF2 line 646 of symtype.pas
  $000000000056B7B3 line 186 of wpoinfo.pas
  $000000000055B25F line 1433 of fppu.pas
  $00000000005568C2 line 123 of fppu.pas
  $000000000056652F line 1069 of pmodules.pas
  $000000000054BAAD line 383 of parser.pas
  $000000000055B5F9 line 1531 of fppu.pas
  $00000000005654D0 line 713 of pmodules.pas
  $00000000005662FF line 1021 of pmodules.pas
  $000000000054BAAD line 383 of parser.pas
  $000000000055B5F9 line 1531 of fppu.pas
  $00000000005654D0 line 713 of pmodules.pas
  $000000000056580E line 801 of pmodules.pas
  $000000000056661C line 1100 of pmodules.pas
  $000000000054BAAD line 383 of parser.pas
  $000000000055B5F9 ble "i" not used
lr_class.pas(9828,5) Note: Local variable "i" not used
lr_class.pas(2564,3) Note: Local variable "DxArray" not used
Compiling lr_dbset.pas
Fatal: Compilation aborted
TExternalToolList.Run Exception: /home/prog/lazarus/components/lazreport/source/lr_dbset.pas(1,1) Fatal: Compilation aborted
TMainIDE.DoBuildLazarus: Compile AutoInstall Packages failed.

Paul Ishenin

2009-04-11 15:38

developer   ~0026705

I compiled fpc with -gl and have this dump:
EAccessViolation : Access violation
  $0044F958 TDEREF__RESOLVE, line 644 of symtype.pas
  $004EB14D RELOAD_FLAGGED_UNITS, line 123 of fppu.pas
  $0042E431 COMPILE, line 383 of parser.pas
  $004EEB78 TPPUMODULE__LOADPPU, line 1531 of fppu.pas
  $004F5D37 LOADUNITS, line 713 of pmodules.pas
  $004F6775 PROC_UNIT, line 1021 of pmodules.pas
  $0042E431 COMPILE, line 383 of parser.pas
  $004EEB78 TPPUMODULE__LOADPPU, line 1531 of fppu.pas
  $004EE693 TPPUMODULE__LOAD_USEDUNITS, line 1322 of fppu.pas
  $004EEA4C TPPUMODULE__LOADPPU, line 1486 of fppu.pas
  $004F5D37 LOADUNITS, line 713 of pmodules.pas
  $004F6775 PROC_UNIT, line 1021 of pmodules.pas
  $0042E431 COMPILE, line 383 of parser.pas
  $004EEB78 TPPUMODULE__LOADPPU, line 1531 of fppu.pas
  $004EE50E TPPUMODULE__LOAD_USEDUNITS, line 1269 of fppu.pas
  $004EEA4C TPPUMODULE__LOADPPU, line 1486 of fppu.pas
  $004EE693 TPPUMODULE__LOAD_USEDUNITS, line 1322 of fpping controls.pp

2009-04-11 16:58

 

wpo_bug.patch (1,892 bytes)   
Index: compiler/wpoinfo.pas
===================================================================
--- compiler/wpoinfo.pas	(revision 13007)
+++ compiler/wpoinfo.pas	(working copy)
@@ -182,20 +182,29 @@
     var
       i: longint;
     begin
-      for i:=0 to fcreatedobjtypes.count-1 do
-        fcreatedobjtypes[i]:=fcreatedobjtypesderefs^[i].resolve;
-      freemem(fcreatedobjtypesderefs);
-      fcreatedobjtypesderefs:=nil;
+      if assigned(fcreatedobjtypesderefs) then
+      begin
+        for i:=0 to fcreatedobjtypes.count-1 do
+          fcreatedobjtypes[i]:=fcreatedobjtypesderefs^[i].resolve;
+        freemem(fcreatedobjtypesderefs);
+        fcreatedobjtypesderefs:=nil;
+      end;
 
-      for i:=0 to fcreatedclassrefobjtypes.count-1 do
-        fcreatedclassrefobjtypes[i]:=fcreatedclassrefobjtypesderefs^[i].resolve;
-      freemem(fcreatedclassrefobjtypesderefs);
-      fcreatedclassrefobjtypesderefs:=nil;
+      if assigned(fcreatedclassrefobjtypesderefs) then
+      begin
+        for i:=0 to fcreatedclassrefobjtypes.count-1 do
+          fcreatedclassrefobjtypes[i]:=fcreatedclassrefobjtypesderefs^[i].resolve;
+        freemem(fcreatedclassrefobjtypesderefs);
+        fcreatedclassrefobjtypesderefs:=nil;
+      end;
 
-      for i:=0 to fmaybecreatedbyclassrefdeftypes.count-1 do
-        fmaybecreatedbyclassrefdeftypes[i]:=fmaybecreatedbyclassrefdeftypesderefs^[i].resolve;
-      freemem(fmaybecreatedbyclassrefdeftypesderefs);
-      fmaybecreatedbyclassrefdeftypesderefs:=nil;
+      if assigned(fmaybecreatedbyclassrefdeftypesderefs) then
+      begin
+        for i:=0 to fmaybecreatedbyclassrefdeftypes.count-1 do
+          fmaybecreatedbyclassrefdeftypes[i]:=fmaybecreatedbyclassrefdeftypesderefs^[i].resolve;
+        freemem(fmaybecreatedbyclassrefdeftypesderefs);
+        fmaybecreatedbyclassrefdeftypesderefs:=nil;
+      end;
     end;
 
 
wpo_bug.patch (1,892 bytes)   

Paul Ishenin

2009-04-11 16:58

developer   ~0026706

Attached patch fixes the problem

Jonas Maebe

2009-04-20 10:20

manager   ~0026860

That patch can at most hide the problem (and will probably result in wrong programs when using wpo afterwards). I will look at it later.

Paul Ishenin

2009-04-23 02:54

developer   ~0026962

Thanks, it works now.

Issue History

Date Modified Username Field Change
2009-03-13 17:05 Paul Ishenin New Issue
2009-03-13 17:20 Vincent Snijders Note Added: 0026092
2009-03-13 17:21 Vincent Snijders Note Edited: 0026092
2009-04-08 18:39 Jesus Reyes Note Added: 0026666
2009-04-11 15:38 Paul Ishenin Note Added: 0026705
2009-04-11 16:58 Paul Ishenin File Added: wpo_bug.patch
2009-04-11 16:58 Paul Ishenin Note Added: 0026706
2009-04-11 18:58 Marco van de Voort Status new => assigned
2009-04-11 18:58 Marco van de Voort Assigned To => Jonas Maebe
2009-04-20 10:20 Jonas Maebe Note Added: 0026860
2009-04-22 16:53 Jonas Maebe Fixed in Revision => 13024
2009-04-22 16:53 Jonas Maebe Status assigned => resolved
2009-04-22 16:53 Jonas Maebe Fixed in Version => 2.3.1
2009-04-22 16:53 Jonas Maebe Resolution open => fixed
2009-04-23 02:54 Paul Ishenin Status resolved => closed
2009-04-23 02:54 Paul Ishenin Note Added: 0026962