Recent

Author Topic: problem with the lps  (Read 997 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1213
problem with the lps
« on: June 19, 2025, 01:13:55 pm »
What I did:
I installed CEF, could not make it run and set back ny VM to a snapshot without it.
Sure, the source code I wrote in the meanwhile I saved outside the snapshot.

Then I installed Lazarus 4 without CEF.
What I was not aware of: I had already used CEF in my code.
I saw the usual error messages as "the component cannot be found, do you want to quit" or similar.

This was not the topic.
The topic was, that I could not get rid of it.
I deleted the (few) uses clause. I deleted the (few) lines of code.
I removed the Frame from my project.

I could not get rid of it!
At the end I found by a full text search, that in the *.lps file the entry was fully there.

In the past I had repeated troubles with renaming and similar with not taken in those base-directory files.

===

estimating in short what may be a way to reproduce it:
- try to remove a "loading-trouble"-frame from your project by the project manager.

See it everywhere removed - except the *.lps and troubling you on.

Thaddy

  • Hero Member
  • *****
  • Posts: 17451
  • Ceterum censeo Trumpum esse delendum (Tnx Charlie)
Re: problem with the lps
« Reply #1 on: June 19, 2025, 01:30:42 pm »
Examine the LPI not the LPS
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

paweld

  • Hero Member
  • *****
  • Posts: 1435
Re: problem with the lps
« Reply #2 on: June 20, 2025, 07:07:21 am »
LPS is the Lazarus Project Session file:
Quote
A session contains all meta information about open files in the source editor, the bookmarks, jump history and run file information
You can delete the file
Best regards / Pozdrawiam
paweld

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: problem with the lps
« Reply #3 on: June 20, 2025, 03:04:16 pm »
To be clear, did you remember to remove the dependency on the package? Open "Main Menu > Project > Project Inspector", and make sure there are no unnecessary packages in the "Required Packages" tree node.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11476
  • Debugger - SynEdit - and more
    • wiki
Re: problem with the lps
« Reply #4 on: June 20, 2025, 03:34:14 pm »
"the component cannot be found, do you want to quit" or similar.

"Or similar":  It be possible something like the following, or similar...

If indeed it was the session file, the that could be pointing to files you once had open in your editor, and that the IDE should open again.

And, as long as the file (E.g. an old form or frame that contained the component) does still exist on disk, then it will be opened in an editor. Even if it no longer is part of the project. (Well non project file are actually IIRC only remembered for re-opening if that is specially enabled... but not sure).

So anyhow, a file with the component on a form/frame was about to be opened.

The IDE has a setting, if to also forcefully open the form. But that only applies if you do NOT use the docked form editor (anchordock is no problem, only the docked form editor).

Also, if a form has an issue loading, the IDE will report it, and give up on opening that form. But IIRC with the docked form editor it has a problem giving up, so you get more errors... Again not sure.

This is from distant memory. I don't personally use the docked form editor (nor anchor docking, at least not in most cases).

Nicole

  • Hero Member
  • *****
  • Posts: 1213
Re: problem with the lps
« Reply #5 on: June 20, 2025, 10:06:30 pm »
Quote
To be clear, did you remember to remove the dependency on the package? Open "Main Menu > Project > Project Inspector", and make sure there are no unnecessary packages in the "Required Packages" tree node.

sure, I did.

Quote
And, as long as the file (E.g. an old form or frame that contained the component) does still exist on disk, then it will be opened in an editor. Even if it no longer is part of the project

Perhaps, this shall be given a second thought. You click "abort" and "abort" and "quick" and all this stuff many times. You are not able even to close the stupid window. I hammered with one hand on "enter" to click away those uselessly popping up again and again messages. And with the other hand I tried to hit the close file quickly enough. This is absurd.

idea:
Let pop up one message:
"Do you want to close the IDE and not open it with this very project again?"

About session things and files, I "can delete".
I still have this problem:
https://forum.lazarus.freepascal.org/index.php/topic,71495.msg558059.html#msg558059

I had it with Lazarus 3 and it persists in Lazarus 4.
This has nothing to do with CEF. It is just a frame which looks as the others and has worked fine for years.

wp

  • Hero Member
  • *****
  • Posts: 12913
Re: problem with the lps
« Reply #6 on: June 21, 2025, 12:26:24 am »
Let pop up one message:
"Do you want to close the IDE and not open it with this very project again?"
In Tools > Options > Environment > IDE Startup there's a checkbox "Open last project and packages at start". At least as long as you're having difficulties with a project crashing the IDE I would recommend to turn this off (I have it off all the time and load the previous project from the recent files dropdown toolbar button).

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: problem with the lps
« Reply #7 on: June 21, 2025, 08:31:07 am »
Let pop up one message:
"Do you want to close the IDE and not open it with this very project again?"

Or you can run Lazarus with the parameter "lazarus --skip-last-project" if you want to do it once.

You can call it in the command line, script or create a shortcut for it.

Nicole

  • Hero Member
  • *****
  • Posts: 1213
Re: problem with the lps
« Reply #8 on: June 21, 2025, 10:15:27 am »
Both ways are very useful.
However both and not really convenient.

As I could not even enter my Lazarus, I could not change the options.
The start version is a better way, however too complex. I will keep it, but case I need it, it will take me several time to remember, that I saved it and to find where.

I posted the thing in suggestions and hope our developers will find a way for everybody.
We all are Hero Members. A good solutions helps those thousands of users out there as well, who never post here.

n7800

  • Sr. Member
  • ****
  • Posts: 400
Re: problem with the lps
« Reply #9 on: June 21, 2025, 01:52:07 pm »
You don't have to remember it, calling "lazarus -h" (or "--help") shows all available options.

 

TinyPortal © 2005-2018