Recent

Author Topic: What Just Happened?  (Read 1125 times)

Dennis1

  • New member
  • *
  • Posts: 8
What Just Happened?
« on: July 22, 2019, 06:35:17 pm »
I'm working on a simple text editor as I learn Lazarus and Free Pascal. It's been going well. I usually get no errors when I compile -- generally just when I make a typo. But suddenly every control is not recognized and I have over 50 "identifier not found" errors. This was after making one tiny change to a menu caption, which I have since reversed. :o I've checked the "uses" section and nothing has changed. I've tried restarting etc. Nothing.

Any ideas??

winni

  • Hero Member
  • *****
  • Posts: 606
Re: What Just Happened?
« Reply #1 on: July 22, 2019, 06:45:15 pm »
typo in

Code: Pascal  [Select]
  1.  TForm1 = class (Tform)

?????

Or the string in your menu caption not closed???

Or, or, or ...

Winni

wp

  • Hero Member
  • *****
  • Posts: 6495
Re: What Just Happened?
« Reply #2 on: July 22, 2019, 06:47:56 pm »
It's hard to tell without seeing any code... Please pack your source code (*.pas, *.lfm, *.lpi, *.lpr) files (plus any special data files if needed) into a common zip which you can upload under "Attachment and other options". Do not add compiler-generated file such as the exe, ppu, .o etc because this will make the upload to big.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Thaddy

  • Hero Member
  • *****
  • Posts: 9298
Re: What Just Happened?
« Reply #3 on: July 22, 2019, 06:53:12 pm »
Did you make that change in the lfm file? (usually  a NONO) Or in code?
also related to equus asinus.

Dennis1

  • New member
  • *
  • Posts: 8
Re: What Just Happened?
« Reply #4 on: July 23, 2019, 04:46:05 am »
I think fixed it. I replaced the header section from a backup and deleted all the menu entries. That removed the avalanche of errors. The only oddity remaining is that the font selection dialogue loads only intermittently. Still, progress!

Thank you to all who responded!

Dennis1

  • New member
  • *
  • Posts: 8
Re: What Just Happened?
« Reply #5 on: July 23, 2019, 03:18:32 pm »
After some trial and error to reproduce the problem, I've found that Lazarus seems to intermittently "forget" its forms or controls.

Say I'm changing the width of a Memo box. I type "Memo1." and after the "." the IDE produces a list of relevant methods etc. But only sometimes. Sometimes it has no idea what Memo1 is. Other times I have to type Form1.Memo1 before it remembers. Similarly, a simple line like "Form2.Show" works about half the time when compiled. 

It's probably something I'm doing, but what? 
« Last Edit: July 23, 2019, 03:57:38 pm by Dennis1 »

Handoko

  • Hero Member
  • *****
  • Posts: 3239
  • My goal: build my own game engine using Lazarus
Re: What Just Happened?
« Reply #6 on: July 23, 2019, 03:57:56 pm »
I never have the issue as you mentioned.

Please provide more information: your OS and Lazarus version, the steps to reproduce. And it's even better if you can provide the sample project.

wp

  • Hero Member
  • *****
  • Posts: 6495
Re: What Just Happened?
« Reply #7 on: July 23, 2019, 04:08:48 pm »
I never have the issue as you mentioned.

Please provide more information: your OS and Lazarus version, the steps to reproduce. And it's even better if you can provide the sample project.
I absolutely agree. Since you are a beginner, the same issue may happen again, and since you did not solve it in a way such that you know what you did, you will get into trouble again. Guaranteed!
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Thaddy

  • Hero Member
  • *****
  • Posts: 9298
Re: What Just Happened?
« Reply #8 on: July 23, 2019, 07:03:24 pm »
Yup.
also related to equus asinus.

Dennis1

  • New member
  • *
  • Posts: 8
Re: What Just Happened?
« Reply #9 on: August 15, 2019, 04:07:22 am »
I agree!

I've reproduced the error twice. On both occasions, it happened after editing a menu caption and then double-clicking the resulting menu item and populating a new procedure. In both cases, every control on the form instantly became unknown and generated 50 errors. In both cases, it was fixed by shutting down and restarting (ie rebooting, not restarting Lazarus).

trev

  • Sr. Member
  • ****
  • Posts: 259
  • Former Delphi 7 and Delphi 10.2 User
Re: What Just Happened?
« Reply #10 on: August 15, 2019, 06:16:31 am »
You till haven't said what operating system you are using and what version of Lazarus you are using.

I've not had the problem you describe in a project with many memos with macOS 14.6, FreeBSD 12 or Ubuntu v18.04, nor with Lazarus v2.0.0 or v2.1.0.
o Lazarus v2.1.0 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

Dennis1

  • New member
  • *
  • Posts: 8
Re: What Just Happened?
« Reply #11 on: August 17, 2019, 09:27:06 pm »
Sorry -- it's Win7, Laz 2.0.2 r60954

I'm sure it's something I'm doing. I recompiled Lazarus to include the DCPCiphers and DCPHashes modules ... maybe I screwed something up.