Recent

Author Topic: [SOLVED] Unable to read Forms.pas  (Read 4186 times)

Deepaak

  • Sr. Member
  • ****
  • Posts: 454
[SOLVED] Unable to read Forms.pas
« on: September 22, 2014, 04:04:30 pm »
I am facing a strange issue with lazarus, even it happens with new project also.
« Last Edit: September 23, 2014, 09:39:24 pm by Deepaak »
Holiday season is online now. :-)

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Unable to read Forms.pas
« Reply #1 on: September 22, 2014, 04:34:40 pm »
Lazarus 1.3 : any issue (Forms.pas apparently) with this non stable version ?

** Edit 1 **
BTW: have you looked at your current "Forms.pas" file content ?

** Edit 2 **
In previous versions, the file name is "Forms.pp" and not "Forms.pas": I guess it has not changed. Do you have any such file (i.e. "Forms.pas) in your project directory or in your project search path ?
« Last Edit: September 22, 2014, 04:45:13 pm by ChrisF »

Deepaak

  • Sr. Member
  • ****
  • Posts: 454
Re: Unable to read Forms.pas
« Reply #2 on: September 23, 2014, 07:35:24 am »
Yes, It is forms.pp in lcl directory, but why laz is asking for forms.pas is out of my scope. Before it was working perfectly, but it happened after restarting the ide. i had even changed the forms.pp to forms.pas for testing this problem, but laz is still searching forms.pas.

Which forms.pas is searched by laz is not known.

I had even rebuild the ide from source using

Code: [Select]
Make clean all bigide
But the problem still persists. I am totally lost. Even reverted the svn revision to last revision, after that also problem still exisits.
Holiday season is online now. :-)

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Unable to read Forms.pas
« Reply #3 on: September 23, 2014, 11:47:04 am »
Your taskbar shows that you have at least two Laz folders: Lazarus and lazarus. This alone may contribute to your problem, if this means you have at least two Lazarus installations and they are not clearly separated with different config files (just a guess).
Somewhere you also have a forms.pas file (from a Delphi installation - so it is in your system path?) with several strange constructs that the Codetools parse and point out, including a non-public constructor.
Only you can determine why Lazarus opens this file (substituting it erroneously for forms.pp) when the compiler detects forms.ppu is out of date or not in the expected place.
Probably until you delete this file, or at least remove it from Lazarus' search paths, the problem will persist.
« Last Edit: September 23, 2014, 01:33:46 pm by howardpc »

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Unable to read Forms.pas
« Reply #4 on: September 23, 2014, 12:57:46 pm »
Yes, as indicated by howardpc, this file is related to Delphi.

Extract of Forms.pas version Delphi7 (the line numbers match exactly your errors):

Line 7:
Code: [Select]
{$C PRELOAD}

Line 133:
Code: [Select]
    procedure CreateParams(var Params: TCreateParams); override;

Line 160:
Code: [Select]
    procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED;
...


** Edit1 **
Would it be that a recent change in the trunk version is now searching files also in the windows search path ?
« Last Edit: September 23, 2014, 01:06:41 pm by ChrisF »

Deepaak

  • Sr. Member
  • ****
  • Posts: 454
Re: Unable to read Forms.pas
« Reply #5 on: September 23, 2014, 09:38:41 pm »
@howardpc
@ChrisF

Thank you, it was bit strange type of error, It was due to empty Forms.pas file in temp folder, I don't know how it came there, but when i was enumerating files on system, i found it. And on a guess round when i deleted the file, every things became normal. Huuuh, at last everything is back to normal, Once again thank you for your help.
Holiday season is online now. :-)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Unable to read Forms.pas
« Reply #6 on: September 24, 2014, 07:50:31 am »
Thank you, it was bit strange type of error, It was due to empty Forms.pas file in temp folder, I don't know how it came there, but when i was enumerating files on system, i found it.
Perhaps you were compiling a new project that hadn't been saved yet? By default the tools/options value for storing those projects is in your temp directory so that's probably why you saw that error.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018