Forum > Editor

Lazarus not restoring project editor state when loading LPI (SOLVED)

(1/3) > >>

I searched for this but could not find an answer.

When I load a project that I've been working on, the saved state of the design (Source Editor window, opened units in the various tabs, form being designed, etc) never loads.  The Source Editor never even appears, though I see the project name in the Lazarus window caption.  I have to open all the units and forms again manually one by one, every time.

I do see an LPS file was created and it is writing a new timestamp when I save the project, but apparently Lazarus isn't doing anything with it when loading it.  Project Options > Sessions has "Save in LPS file in project directory" and all of the Save checkboxes checked except for "Save editor info only for project files".  I am using Lazarus IDE V2.0.12.

EDIT: Marked it as solved.

Any/every project, or just 1 specific project?


Though i can't recall that it was that bad, note the Lazarus version number.

Linux, Windows, Mac?

Anyway, it is likely some data in the session can't be read => if so, the only way to get it working is either:
- avoid getting such data into the session
- Upgrade to a newer version (on that old version, only very generic assistance can be given)

Run your IDE as

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---lazarus.exe --debug-log=c:\mylog.txtThen check for error messages, and stack traces in that log.

One think I do remember that would fail loading (at least some parts of the session) was that specific entries in the "watches" window , would not load correctly... But it is ages ago, so I don't recall exactly what values, nor if 2.0.12 was affected.
-- EDIT: actually, it was a breakpoint, specifically if you had address based breakpoints in the ASM window.

As an alternative approach to the --debug-log, you can open  the lps file in an editor.  Remove individual sections (such that the XML remains valid), until the IDE loads the remainder. Then you know which part does not load.
(Note, it may also be a part of the lpi file...)

Thanks, I like the great support here.

The Lazarus type is Windows.  I wasn't aware we were up to V3.0 already so I did an upgrade to V3.0.  I am getting the same exact problem.

Description of error:
- Set up my IDE as if I am programming, have various units and forms open
- File > Save All
- File > Close All
- File > Open > (select LPI) and in the popup pick "Open Project"
- Project comes up but is empty in the IDE and I have to manually re-open units and forms.

I tried my other projects in V3.0 and they all have the the same issues, they come up completely empty, even if I close, add the forms and units, and open them again.  I don't have any add-ons.  In fact when I upgraded to V3.0 I uninstalled V2.0.12 and installed V3.0 fresh.  So it is broken out of the box, or possibly some bad settings are associated with all the projects.

Below is the debug log, not much in there.  This is starting Lazarus, loading the project, seeing the empty source editor, then closing Lazarus.

It is odd that it is reporting "Could not find a fpc executable in the PATH" as the project compiles fine and it seems like it's the installer's job to sort out where fpc is, not mine.  I got the installer from:

Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="C:\Users\(MyAcct)\AppData\Local\lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="C:\lazarus"
InitializeFppkg failed: Could not find a fpc executable in the PATH
Hint: (lazarus) [TMainIDE.DoOpenProjectFile] "C:\code\programs\dateassign\dateproj.lpi"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-win32-win32 New=i386-win32-win32 Changed: OS/CPU=True LCL=False
Hint: (lazarus) [TMainIDE.DoOpenProjectFile] "C:\code\programs\dateassign\dateproj.lpi"
LAZARUS END - cleaning up ...
FreeFormEditor: FormEditor1=TFormEditor
Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END


[0] Message Index

[#] Next page

Go to full version