Regarding your question: I used to work with 92 DPI for a while, this was caused by the proprietary nvidia driver, this was annoying, I have now fixed the dpi at my development workstation to 96 with xrandr and now Lazarus reliably gets the 96 every time.
But this does not seem to be related, it still keeps happening in my 96DPI environment with forms saved with 96dpi.
Some new observations from today:
* DPI awareness and scaling is enabled, Designtime DPI is (and remains) at 96
* i18n is enabled, resourcestrings also exist in the code.
* I have my project committed in git, so I can immediately see if files changed.
* The project has 3 forms:
-> all of them have been saved with dockedformeditor
-> none of them contains LCLVersion
-> Client size is still correct in all forms.
* project is committed to git in exactly that state, so I can reset whenever I need.
* Lazarus is closed.
* I start Lazarus, it loads the project.
* run | build -> git diff shows no changes to any files
* Project | resave forms with i18n
-> LCLVersion inserted in all 3 forms,
-> 1 out of 3 forms has messed up client size (251*412 instead of 611*1092)
* close Lazarus
* git reset --hard
* I start Lazarus, it loads the project
* I rebuild Lazarus without DockedFormEditor
* It restarts and loads the project again
-> still no changes in git diff, project is still untouched
* Project | resave forms with i18n
-> LCLVersion inserted in all 3 forms
-> everything else remains untouched, no corruption
* close Lazarus
* git reset --hard
* I start Lazarus, it loads the project
* rebuild Lazarus with DockedFormEditor
* It restarts and loads the project again
-> project is still untouched
* Project | resave forms with i18n
-> LCLVersion inserted in all 3 forms
-> same form as above has the exact same wrong values in client size
(repeating the above steps as I type it)
The form has a TChart on it, a bunch of Buttons, some TStaticTexts, a TMemo and a TRadioGroup. Chart is anchored on all 4 sides, buttons are ancored bottom right, memo is anchored top, left, bottom. Radiogroup and TStaticTexts are anchored top,left.
The TRadioGroup also has ClientHeight and ClientWidth and these are also changed, but not as dramatic as the values of the form.
One of the other forms that did not corrupt (today) also has a tchart with anchors on all 4 sides on it.
----
I also have a small demo project with some elements on a form for trying to provoke the problem there, so far no success. I am making all kinds of changes there, playing with anchors and panels, closely watching the git diff after every step and committing every tiny little change, and as soon as I manage to get it into the same state where it corrupts right after opening I will post it and also file a bug, because then I can provide steps to reproduce. But so far no luck.