[Lazarus] porting delphi project code

waldo kitty wkitty42 at windstream.net
Sat Jun 1 23:55:16 CEST 2013


On 6/1/2013 15:13, Juha Manninen wrote:
> I did another change. Conversion is done in 2 phases, first analyzing
> and converting unit files, then converting form files and replacing /
> adding / removing used units in unit files.
> With an exception during the 1. phase, the whole conversion was screwed.
> Now the 2. phase is done for all units that were converted so far.
>
> Please test.


i copied over my backup directory to start clean the same as before...

this time i renamed the Jedi directory to -Jedi to disable it... or so i though! 
see below...

MClasses.pas - unit Consts not found - clicked "Comment out"
MlrForm.pas - unit XPMan not found - clicked "Comment out"

wow... there's a lot more processing going on now... i see a "second pass"(?) 
thru the open files...

too smart! found -Jedi directory and tried to use it... then the messages window 
said that conversion was aborted... i did not copy the messages...


closing Lazarus, i chose to NOT save the project... heaptrc gave me this spittle...

(typing by hand :(  each '=====' line marks where i had to hit the [OK] button)

Heap dump by heaptrc unit
8692249 memory blocks allocated : 771969829/806033864
8687936 memory blocks freed    : 771802469/805856352
4313 unfreed memory blocks : 167360
True heap size : 34865152
True free heap : 34362736
Should be : 34411608
Call trace for block $0C9E5B10 size 64
  $0040EEA8 line 334958 of (Unknown file)
  $0040CE51 line 334958 of (Unknown file)
  $00A432F9 line 2433 of customcodetool.pas
  $00A43374 line 2443 of customcodetool.pas
  $00A3D799 line 392 of customcodetool.pas
  $00A3D9F9 line 438 of customcodetool.pas
  $00A3DAA4 line 444 of customcodetool.pas
  $00A509A8 line 4903 of pascalparsertool.pas
Call trace for block $0C5F1C90 size 24
  $0040CE51 line 334958 of (Unknown file)
  $00A432F9 line 2433 of customcodetool.pas
  $00A43374 line 2443 of customcodetool.pas
  $00A3D799 line 392 of customcodetool.pas
  $00A3D9F9 line 438 of customcodetool.pas
  $00A3DAA4 line 444 of customcodetool.pas
  $00A509A8 line 4903 of pascalparsertool.pas
  $00A46E76 line 690 of pas
=====
  $00A46E76 line 69Call trace for block $0C5F5410 size 16
  $00A43374 line 2443 of customcodetool.pas
  $00A3D799 line 392 of customcodetool.pas
  $00A3D9F9 line 438 of customcodetool.pas
  $00A3DAA4 line 444 of customcodetool.pas
  $00A509A8 line 4903 of pascalparsertool.pas
  $00A46E76 line 690 of pascalparsertool.pas
  $00CCB8A6 line 532 of ../convertor/usedunits.pas
  $008F9CA4 line 541 of ../convertor/convertdelphi.pas
Call trace for block $0D5A2D88 size 105
  $0040EEA8 line 334958 of (Unknown file)
  $0041B57A line 334958 of (Unknown file)
  $00A3DA6A line 444 of customcodetool.pas
  $00A509A8 line 4903 of pascalparsertool.pas
  $00A46E76 line 690 of pascalparsertool.pas
  $00CCB8A6 line 532 of ../converter/usedunits.pas
  $008F9CA4 line 541 of ../converter/convertdelphi.pas
  $00900991 line 1581 of ../converter/convertdelphi.pas
Call trace for block $0C5F3A90 size 24
  $008F9C3E line 534 of ../converter/convertdelphi.pas
  $00900991 line 1581 of ../converter/convertdelphi.pas
  $00
=====
  $00900668 line 1615 of ../converter/convertdelphi. $008FC49E line 1024 of 
../converter/convertdelphi.pas
  $008FBF1F line 973 of ../converter/convertdelphi.pas
  $0046AC54 line 8014 of main.pp
  $00770006 line 574 of menuintf.pas
Call trace for block $1459FCC8 size 64
  $00CB980B line 744 of ../converter/convertsettings.pas
  $008F9B12 line 518 of ../converter/convertdelphi.pas
  $00900991 line 1581 of ../converter/convertdelphi.pas
  $00900668 line 1615 of ../converter/convertdelphi.pas
  $008FC49E line 1024 or ../converter/convertdelphi.pas
  $008FBF1F line 973 of ../converter/convertdelphi.pas
  $0046AC54 line 8014 of main.pp
  $0045A460 line 4460 of main.pp
Call trace for block $0CAEBB58 size 44
  $0090096F line 1578 of ../converter/convertdelphi.pas
  $00900668 line 1615 of ../converter/convertdelphi.pas
  $008FC49E line 1024 of ../converter/convertdelphi.pas
  $008FBF1F line 973 of ../converter/convertdelphi.pas
  $0046AC54 line 8014 of main.pp
  $
=====
  $0045a460 line 4460 of main.p $00770006 line 574 of menuintf.pas
  $00774387 line 1649 of menuintf.pas
Call trace for block $1459FD58 size 64
  $004EA03C line 547 of lazfileutils.pas
  $008FF66C line 1453 of ../converter/convertdelphi.pas
  $00900638 line 1611 of ../converter/convertdelphi.pas
  $008FC49E line 1024 or ../converter/convertdelphi.pas
  $008FBF1F line 973 of ../converter/convertdelphi.pas
  $0046AC54 line 8014 of main.pp
  $0045A460 line 4460 of main.pp
  $00770006 line 574 of menuintf.pas
Call trace for block $144D0D08 size 32
  $00903868 line 497 of ../converter/convcodetool.pas
  $00904227 line 761 of ../converter/convcodetool.pas
  $00902B37 line 221 of ../converter/convcodetool.pas
  $008FA2EF line 658 of ../converter/convertdelphi.pas
  $009009C2 line 1585 of ../converter/convertdelphi.pas
  $00900668 line 1615 of ../converter/convertdelphi.pas
  $008FC49E line 1024 of ../converter/convertdelphi.pas
  $008FBF1F line 973 of ../converter/convertdelphi.pas
Call trace fo
=====

that's enough of that... i quit counting after 300 more [OK] clicks... i'm glad 
i wasn't trying to type all of that in! i finally used my task manager to kill 
it after an hour+ of trying to click through it :(

looking back above... 4000+ unfreed blocks with two or maybe three in each 
heaptrc popup?? no effing wonder it was taking so long to get thru it :(

that heaptrc window really needs to be something other than successive boxes 
that you can't copy from and can only click your way thru to get to the end... 
i'd offer a patch if i knew what to do where but i don't so i can't... i'm 
thinking maybe a memo box with all of the output so that it can all be easily 
copied and pasted... none if it even shows up in my specified 
--debug-log=somefile :( :( :(


PS: sorry for the frustration... it is not your fault that heaptrc acts like that...

-- 
NOTE: No off-list assistance is given without prior approval.
       Please keep mailing list traffic on the list unless
       private contact is specifically requested and granted.




More information about the Lazarus mailing list