Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2021-03

Lazarus loses environment, why does this happen?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

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

Reply by email

Mattias Gaertner
to Bo Berglund
Show quoted text 14 lines
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).

Show quoted text 5 lines
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

Reply by email

Marco van de Voort
to Mattias Gaertner

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.

Reply by email