[Lazarus] Lazarus loses environment, why does this happen?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus loses environment, why does this happen?

Free Pascal - Lazarus mailing list
Lazarus 2.0.8 on Raspberry Pi 4 with FPC 3.0.4

I have discussed this topic here before but I would like to know what is causing
the problem...
It happened again today; when I started Lazarus I just got the main bar plus the
code editor, all other windows were not there.

Since I have been hit by this before I keep a backup of the pcp dir files in a
tar archive so I could extract the environmentoptions.xml file from 2020-12-23
(with Lazarus closed of course) and replace the now bogus environmentoptions.xml
in the pcp dir and all was OK again.

Last time it happened I checked the environmentoptions.xml before fixing it and
it was all blank, just a series of #0 chars.

So what I am wondering now is what would cause Lazarus to write such a file
anytime?
It seems like normally Lazarus should just read the file unless a change is done
in some options and then the write would be done at that specific time.

But it seems like this file is not handled this way at all...

Any ideas?

--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus loses environment, why does this happen?

Free Pascal - Lazarus mailing list
On Fri, 12 Mar 2021 15:25:42 +0100
Bo Berglund via lazarus <[hidden email]> wrote:

> Lazarus 2.0.8 on Raspberry Pi 4 with FPC 3.0.4
>
> I have discussed this topic here before but I would like to know what
> is causing the problem...
> It happened again today; when I started Lazarus I just got the main
> bar plus the code editor, all other windows were not there.
>
> Since I have been hit by this before I keep a backup of the pcp dir
> files in a tar archive so I could extract the environmentoptions.xml
> file from 2020-12-23 (with Lazarus closed of course) and replace the
> now bogus environmentoptions.xml in the pcp dir and all was OK again.
>
> Last time it happened I checked the environmentoptions.xml before
> fixing it and it was all blank, just a series of #0 chars.

I never saw that. Sounds like a buffer overflow, invalid pointer thing.
You could compile the ide with -gh (heaptrc).

 
> So what I am wondering now is what would cause Lazarus to write such
> a file anytime?
> It seems like normally Lazarus should just read the file unless a
> change is done in some options and then the write would be done at
> that specific time.

It stores some desktop settings too.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus loses environment, why does this happen?

Free Pascal - Lazarus mailing list

Op 2021-03-12 om 15:34 schreef Mattias Gaertner via lazarus:
> blank, just a series of #0 chars.
> I never saw that. Sounds like a buffer overflow, invalid pointer thing.

I have an application in Delphi for which I use ported 2006 era Lazarus
txmlconfig units. I still use them, since I implemented some quirk
workarounds for the malformed xmls supplied by a customer.

Over the years, I have seen this (zeroing in save) behaviour a few
times, and it seems related to crashes during shutdown.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus