Alt-G does not work any more lazarus / 9-Editor ---------------------------------------------------------------------- Relativity · 2018-04-05 09:33 Recently I have installed Lazarus 1.8.2 on my new Computer. It is the first time that I install Lazarus on this Computer. I have copied my projects, developed with old Lazarus versions (I guess it was Lazarus 1.6.0) on my old Computer, to the new one, to carry them on. Everything looks ok, but when I press Alt-g or I call List Procedures from the menu, I get the following message: TControl.InvalidatePreferresSize loop detected TB:TToolBar Bounds=|=0,t=0,r=1188,b=32. Press OK to ignore and risk data corruption. Press Abort to kill the program Then I select "Abort". Lazarus is closed and I get the following message: Access Violation Access Violation Is that maybe a bug in Lazarus 1.8.2 ? ---------------------------------------------------------------------- Martin_fr · 2018-04-05 11:21 OS ? Did you add any package to the IDE? It works fine for me on Windows Vista (still...) ---------------------------------------------------------------------- Relativity · 2018-04-05 11:44 Martin_fr, thank you very much for your help. I have Windows 7. I didn't add any package to the IDE. ---------------------------------------------------------------------- rvk · 2018-04-05 12:18 What happens if you do the same in a new empty project? If that works open up your other project (in which alt+g failed) and try to strip code until it works. It could be related to the following bug: https://bugs.freepascal.org/view.php?id=32951 If it's your config you can go to %localappdata%\lazarus (in your explorer) and look in envronmentoptions.xml. What is the value of Width and Height of ? You could try renaming that file and restarting lazarus to get a fresh clean version. ---------------------------------------------------------------------- Relativity · 2018-04-05 12:40 If I open a new project and I do Alt-G as first action after having opened the project, I immediately get the over-mentioned error. ---------------------------------------------------------------------- dsyrios · 2018-04-05 13:58 Hi, I have the same problem. So... I stopped to use Alt-G  Laz 1.8.2/FPC 3.0.4/win32 ---------------------------------------------------------------------- rvk · 2018-04-05 13:59 Please refer to what the values are mentioned earlier... Quote from: rvk on April 05, 2018, 02:18:54 pmIf it's your config you can go to %localappdata%\lazarus (in your explorer) and look in envronmentoptions.xml. What is the value of Width and Height of ? You could try renaming that file and restarting lazarus to get a fresh clean version. If you rename envronmentoptions.xml, does it work after that? If so, you can rename it back and post the original envronmentoptions.xml here. ---------------------------------------------------------------------- dsyrios · 2018-04-05 14:01 for me... on win7 ---------------------------------------------------------------------- dsyrios · 2018-04-05 14:05 @rvk You are right !!! Now it's ok! thanks ---------------------------------------------------------------------- rvk · 2018-04-05 14:06 Quote from: dsyrios on April 05, 2018, 04:05:44 pmNow it's ok! Those values worked for me fine. Maybe it depends on the resolution of your screen 1920x1080 for me. What worked for you now? Renaming the file? Maybe just deleting that section mentioning those values (or adjusting those values) is sufficient. ---------------------------------------------------------------------- dsyrios · 2018-04-05 14:10 @rvk Yes... renaming the file. ---------------------------------------------------------------------- dsyrios · 2018-04-05 14:21 Ooops ! It came again. ---------------------------------------------------------------------- rvk · 2018-04-05 14:30 Quote from: dsyrios on April 05, 2018, 04:21:35 pmOoops ! It came again. Could you try removing the tags containing the TProcedureListForm values. Does that help. If it helps we need to know the values and the resolution of your screen. Did you happen to maximize that screen? You're not using the docking-packages by any chance, are you? ---------------------------------------------------------------------- Relativity · 2018-04-05 14:30 In my environmentoptions file I don't have that entry () at all. I renamed environmentoptions to environmentoptionsOLD, then I opened Lazarus again, but ALT-g still doesn't work and Lazarus doesn't create a new environmentoptions file. Here is the content of my environmentoptions file:                                                     Thank you rvk for your time. ---------------------------------------------------------------------- rvk · 2018-04-05 14:32 Quote from: Relativity on April 05, 2018, 04:30:46 pmI renamed environmentoptions to environmentoptionsOLD, then I opened Lazarus again, but ALT-g still doesn't work and Lazarus doesn't create a new environmentoptions file.In that case you might have installed Lazarus 1.8.2 with the option to put the configuration files somewhere else. (because Laz should always recreate that file) Check the C:\Lazarus\lazarus.cfg for any option as to where your configuration files are located. ---------------------------------------------------------------------- Relativity · 2018-04-05 14:38 I can not find any lazarus.cfg file in C:\lazarus ---------------------------------------------------------------------- rvk · 2018-04-05 14:49 Quote from: Relativity on April 05, 2018, 04:38:52 pmI can not find any lazarus.cfg file in C:\lazarus Ok, that's weird. Where does the shortcut for your Lazarus startup point to? C:\Lazarus or some other directory? (Maybe you already installed it to some alternative directory) You need to find the correct environmentoptions.xml. Lazarus doesn't work without it (or it will create a new one). ---------------------------------------------------------------------- Relativity · 2018-04-05 14:52 It points to C:\lazarus\lazarus.exe ---------------------------------------------------------------------- rvk · 2018-04-05 14:56 If you run Lazarus 1.8.2 and open up Tools > Code Templates. What is the directory and file that's listed there. The directory should be the same as your config-directory. If you open the explorer and paste %localappdata% you should see a lazarus directory. In there, there should be a environmentoptions.xml. PS. Lazarus might only recreate the file when it exits. ---------------------------------------------------------------------- Relativity · 2018-04-05 15:08 The directory and file listed there are: C:\Users\A.Conti\AppData\Local\Lazarus\lazarus.dci Actually on my Computer there is no C:\Users Folder, because I am in Germany and here we have C:\Benutzer instead of C:\Users, because "Benutzer" in German means "users". So it points to a non-existing directory. I installed the german version of Lazarus 1.8.2. ---------------------------------------------------------------------- rvk · 2018-04-05 15:16 Quote from: Relativity on April 05, 2018, 05:08:35 pmActually on my Computer there is no C:\Users Folder, because I am in Germany and here we have C:\Benutzer instead of C:\Users, because "Benutzer" in German means "users". So it points to a non-existing directory. No, Explorer shows you Benutzer but it is actually Users. You can even type C:\Users in the explorer and it will put you in (what you think is) C:\Benutzer. Anyway... %localappdata% is a shortcut to C:\Users\A.Conti\AppData\Local\ (or C:\Benutzer\A.Conti\AppData\Local\) and it has the Lazarus directory. (AppData itself is also normally hidden) If you exit Lazarus it should contain a environmentoptions.xml now. If you rename it and start Lazarus again, go to the code-editor and press Alt+G, does that work? ---------------------------------------------------------------------- Relativity · 2018-04-05 15:38 You are right. I pasted %localappdata% in Explorer and I got C:\Users\A.Conti\AppData\Local\. There was the lazarus directory and in the lazarus directory was the environmentoptions.xml file. I renamed it to environmentoptionsOLD and I restarted Lazarus but Alt-g still gives the error. However Lazarus created a new environmentoptions file. In attachment there is a copy of environmentoptions as .txt file. ---------------------------------------------------------------------- rvk · 2018-04-05 15:57 Quote from: Relativity on April 05, 2018, 05:38:21 pmIn attachment there is a copy of environmentoptions as .txt file. Your environmentoptions.xml worked fine here. But I'm missing some coordinates in your xml (for and etc). Did you have the docking-packages installed? (I already asked but got no answer) What screen-resolution are you on? ---------------------------------------------------------------------- Relativity · 2018-04-05 16:14 My screen resolution in this moment is 1920 x 1080. I don't remember having installed any extra package apart from the default Lazarus version. In any case I checked under Package - Install/Uninstall packages... and I don't see any "docking" package or so listed under the installed packages. ---------------------------------------------------------------------- rvk · 2018-04-05 16:18 They are called AnchorDockingDsgn 0.5 and sparta_DockedFormEditor 0.0. You could try moving all the files in the config directory to a subdirectory named old. All config files should then be recreated. I can't think of anything else (if the Docking packages are not installed). Here it is working correctly on 1920x1080. ---------------------------------------------------------------------- Relativity · 2018-04-05 16:35 The packages you mention are not installed here. They are only signalled as available for installation, but they are definitely not installed. I moved all the files of the config directory in a new subdirectory named "old" and I restarted Lazarus: It works but when I do Alt-g I still get the error. ---------------------------------------------------------------------- balazsszekely · 2018-04-05 19:08 You should debug the IDE. Please do the following: 1. Go to ($LazarusDir)\IDE folder 2. Open project lazarus.lpi 3. Open unit procedurelist.pas, put a breakpoint to FormCreate first line 4. Click the Run button, ignore any error might occur, wait until another instance of Lazarus appears then press Alt + G  5. Press F8 until you see the "InvalidatePreferresSize loop detected" error. I need a line number PS: You can switch to Debug IDE if you like, but is not necessary at this point. ---------------------------------------------------------------------- dsyrios · 2018-04-06 04:30 @GetMem I have the same problem. Following your instructions I got exception... In file '.\include\control.inc' at line 5576 ---------------------------------------------------------------------- balazsszekely · 2018-04-06 06:26 @dsyrios QuoteI have the same problem. Following your instructions I got exception... OK. This is the exception itself, but from which line of procedurelist.pas is coming from? I would debug it myself but I cannot reproduce the error. Please do the following, debug the IDE again(as in the above post) and when the exception appears, go to View-->Debug Windows-->Call Stack, or press: Ctrl + Alt + S, then make a screenshot and post it here. ---------------------------------------------------------------------- dsyrios · 2018-04-06 08:44 @GetMem I have NOT any experience on debug, but... Do you mean this attachment? ---------------------------------------------------------------------- rvk · 2018-04-06 09:21 YIKES. Yes, confirmed on Windows 7 Virtualbox with CLASSIC THEME !!! Edit: Mmm, it also crashes under Normal Theme. Maybe it's Windows 7 general. Lazarus 1.8.2 r57369 FPC 3.0.4 x86_64-win64-win32/win64 ---------------------------------------------------------------------- rvk · 2018-04-06 09:36 Complete call-stack (at least to 50) Code: [Select]#0 fpc_raiseexception at :0 #1 RAISELOOP(0x102e5d0) at include\control.inc:5576 #2 INVALIDATEPREFERREDSIZE(0x7763410) at include\control.inc:5592 #3 DOSETBOUNDS(0x7765e30, 129, 0, 6, 28) at include\control.inc:750 #4 CHANGEBOUNDS(0x7765e30, 129, 0, 6, 28, true) at include\control.inc:680 #5 SETBOUNDSKEEPBASE(0x7765e30, 129, 0, 6, 28) at include\control.inc:5423 #6 DOPOSITION(0x102eb80, 0x7765e30, ALNONE, 6) at include\wincontrol.inc:3023 #7 DOALIGN(0x102eb80, ALNONE) at include\wincontrol.inc:3136 #8 ALIGNCONTROLS(0x7763410, 0x0, {LEFT = 1, TOP = 0, RIGHT = 1188, BOTTOM = 32, TOPLEFT = {X = 1, Y = 0}, BOTTOMRIGHT = {X = 1188, Y = 32}, VECTOR = {1, 0, 1188, 32}}) at include\wincontrol.inc:3216 #9 ALIGNCONTROL(0x7763410, 0x0) at include\wincontrol.inc:6406 #10 AUTOSIZECONTROL(0x102ed40, 0x7763410) at include\control.inc:2986 #11 AUTOSIZECONTROL(0x102ed40, 0x45f5240) at include\control.inc:2988 #12 DOALLAUTOSIZE(0x45f5240) at include\control.inc:3036 #13 DOALLAUTOSIZE(0x45f5240) at include\wincontrol.inc:3524 #14 ENABLEAUTOSIZING(0x45f5240) at include\control.inc:5686 #15 fin$604(0x102eea0) at :4510 #16 SETVISIBLE(0x45f5240, true) at include\customform.inc:492 #17 SHOW(0x45f5240) at include\customform.inc:2317 #18 SHOWMODAL(0x45f5240) at include\customform.inc:2988 #19 EXECUTEPROCEDURELIST(0x1212960) at procedurelist.pas:151 #20 MNUSEARCHPROCEDURELIST(0x1212960, 0x1212960) at main.pp:3040 #21 PROCESSIDECOMMAND(0x1212960, 0x65f0870, 1019, true) at main.pp:3342 #22 PROCESSPARENTCOMMAND(0x65f0870, 0x6400ae0, 1019, '', 0x0, true) at sourceeditor.pp:8499 #23 PROCESSUSERCOMMAND(0x6400ae0, 0x65f8f50, 1019, '', 0x0) at sourceeditor.pp:3915 #24 DOONPROCESSCOMMAND(0x65f8f50, 1019, '', 0x0) at synedit.pp:7093 #25 COMMANDPROCESSOR(0x65f8f50, 1019, '', 0x0, []) at synedit.pp:6453 #26 KEYDOWN(0x65f8f50, 0, [SSALT]) at synedit.pp:2931 #27 KEYDOWNBEFOREINTERFACE(0x65f8f50, 0, [SSALT]) at include\wincontrol.inc:5667 #28 DOKEYDOWNBEFOREINTERFACE(0x65f8f50, {MSG = 48388, UNUSEDMSG = 0, CHARCODE = 0, UNUSED = 0, UNUSED2 = 0, KEYDATA = 539099137, RESULT = 0}, false) at include\wincontrol.inc:5798 #29 CNSYSKEYDOWN(0x65f8f50, {MSG = 48388, UNUSEDMSG = 0, CHARCODE = 0, UNUSED = 0, UNUSED2 = 0, KEYDATA = 539099137, RESULT = 0}) at include\wincontrol.inc:7164 #30 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0 #31 ?? at :0 #32 CALLNOTIFYEVENTS(0x65f8f50, 0x673b608) at lazmethodlist.pas:306 #33 WNDPROC(0x65f8f50, {MSG = 48388, WPARAM = 0, LPARAM = 539099137, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {FILLER = {0, 0, 0, 0}}, LPARAMLO = 1, LPARAMHI = 8226, LPARAMFILLER = {FILLER = {0, 0, 0, 0}}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {FILLER = {0, 0, 0, 0}}}) at include\wincontrol.inc:5397 #34 WNDPROC(0x65f8f50, {MSG = 48388, WPARAM = 0, LPARAM = 539099137, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {FILLER = {0, 0, 0, 0}}, LPARAMLO = 1, LPARAMHI = 8226, LPARAMFILLER = {FILLER = {0, 0, 0, 0}}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {FILLER = {0, 0, 0, 0}}}) at synedit.pp:6034 #35 DELIVERMESSAGE(0x65f8f50, 0) at lclmessageglue.pas:112 #36 DOWINDOWPROC(0x673b530) at win32\win32callback.inc:2513 #37 WINDOWPROC(15073658, 260, 71, 539099137) at win32\win32callback.inc:2671 #38 UnregisterPowerSettingNotification at :0 #39 ?? at :0 #40 ?? at :0 #41 ?? at :0 #42 ?? at :0 #43 USER32!PtInRect at :0 #44 ?? at :0 #45 ?? at :0 ---------------------------------------------------------------------- taazz · 2018-04-06 09:56 not here. Although I never use it, I just tried and it works. Default theme with custom colors and no sounds. could it be a screen resolution thing? I'm on 1920x1080 ---------------------------------------------------------------------- rvk · 2018-04-06 12:30 In mij virtualbox with Windows 7 Ultimate I'm also on 1920x1080. Even when switching to a lower resolution it keeps happening. I also don't use it but it's defenitly a bug. It seems like with the resizing of the TProcedureListForm the toolbar TB keeps the cfAutoSizeNeeded in Form.FControlFlags which is why the loop exists. At least it is the AutoSizeControl(AWinControl.Controls[i]); for TB which puts the cfAutoSizeNeeded back for the form. My debugging skills are not that advanced to pinpoint the exact reason (especially with the poor info from the gdb debugger). It happens in line 2988 (AutoSizeControl) for I=1 (for the TB control). I can imagine if you can't reproduce the error it's almost impossible to find the problem. ---------------------------------------------------------------------- Relativity · 2018-04-06 12:36 I am now using another computer than the one on which I found the problem: it's a computer provided by the customer I work for. Here I have Lazarus 1.8.0 and Windows 7 Enterprise and the resolution is 1920 x 1080: Alt-g perfectly works. ---------------------------------------------------------------------- balazsszekely · 2018-04-06 12:41 Quote@dsyrios I have NOT any experience on debug, but... Do you mean this attachment? Yes. You did a great job. Thanks. Unfortunately the screenshot does not help. The bug is not originating from procedurelist.pas. @rvk QuoteComplete call-stack (at least to 50)Thanks. Despite my best efforts, I'm still unable to reproduce the bug, everything works fine in my win7 machine. According to the call stack + a small debug, it looks like a TToolButton resize triggers a TToolBar resize, which triggers again a TToolButton resize, and so on. Why is happening only to you I have no idea. Do you use high DPI? Can you please try the following: 1. Set TB visibility to false(ProcedureListForm) on design time 2. On Form resize: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TProcedureListForm.FormResize(Sender: TObject);begin  StatusBar.Panels[0].Width := self.ClientWidth - 105;  if not TB.Visible then     TB.Visible := True;end;     3. Rebuild This should prevent the infinite loop. Again I cannot test. ---------------------------------------------------------------------- rvk · 2018-04-06 12:52 Quote from: GetMem on April 06, 2018, 02:41:53 pmCan you please try the following: 1. Set TB visibility to false(ProcedureListForm) on design time 2. On Form resize: 3. Rebuild I did a clean & rebuild each time. Just setting visible for the TB already did the trick. Adding the visible := true in OnResize made the TB appear again without problems. Mmm, setting visible to true again the Alt+G still works now  I undid all the changes and it keeps working  I think I need to reinstall again, for the 3rd time. ---------------------------------------------------------------------- balazsszekely · 2018-04-06 12:58 @rvk QuoteI think I need to reinstall again, for the 3rd time.If you reinstall, please copy procedurelist.lfm and procedurelist.pas somewhere else so you can always reproduce the bug. I suspect a particular size(width/height) triggers the error. Once you manage to start the form at least once, the bug is gone. I might be wrong though. ---------------------------------------------------------------------- rvk · 2018-04-06 13:20 Ok, reinstalled and saved ide\procedurelist.* (actually made a complete copy of C:\Lazarus) First confirmed Alt+G crashes (it does) Then did a Tools > Clean up + Rebuild all to be sure it's still there Opened lazarus.lpi Ctrl+F12 and opened Procedurelist.pas F12 to view form (TB.Top=0 TB.Left=0) Toggles visible of TB to off and to on F12, File save Tools > Clean up + Rebuild all Lazarus restarted and Alt+G worked  Appearantly nobody touched procedurelist.lfm since LCLVersion = '1.7' The newly saved version for 1.8.2 also has new properties and the sizes are indeed changed (but I didn't resize the form itself, I just toggled TB.visible off and on) Also BorderSpacing.Around changed from 1.7 to 1.8.2 and that maybe that could also cause some problems if the default values changed. Attached is a patch between new and old procedurelist.lfm. (I'll try a trunk compile in that VM to see if it is fixed) ---------------------------------------------------------------------- balazsszekely · 2018-04-06 13:50 I just did a quick compare, procedurelist(pas and dfm) in 1.8 and trunk are almost the same. The bug should be present in trunk too. ---------------------------------------------------------------------- rvk · 2018-04-06 13:54 Quote from: GetMem on April 06, 2018, 03:50:51 pmI just did a quick compare, procedurelist(pas and dfm) in 1.8 and trunk are almost the same. The bug should be present in trunk too. Yes, I see on my normal machine the procedurelist.lfm also has LCLVersion 1.7 in trunk. So if it also fails on trunk I'll request a touch-up with lazarus.ide for that .lfm. (unless somebody wants to dive in and find out which value really f's up at runtime ) (my building script is really really slow downloading trunk at the moment in that VM) @Relativity and @dsyrios, If you want this working in Lazarus 1.8.2 just open up procedurelist.pas (with lazarus.lpi open), goto the form (F12) and toggle something and save it again. Rebuild the Lazarus ide again and it should work. ---------------------------------------------------------------------- balazsszekely · 2018-04-06 14:05 @rvk I can commit the changes if the bug is present in trunk too. Please let me know when you're done with testing(it works for me without any change in trunk). ---------------------------------------------------------------------- rvk · 2018-04-06 14:44 ARGH....  I noticed I was on 125% dpi (120DPI) in my VM (for testing purposes with another program). In 125% trunk also had the problem. I made a change in procedurelist.lfm and recompiled and the Alt+G was solved. I made a patch and noticed the DesignTimePPI = 120  Set it back to 100%, reverted the changes and in trunk Alt+G worked. So went back to the Laz 1.8.2 (original install), expecting it to work there too, and it did. So question for @Relativity and @dsyrios, are you on something other than 100%? Edit: Although Laz 1.8.2 at 100% worked I still edited the procedurelist.lfm and recompiled. At 100% it worked, switched to 125% and... it crashed again. So it has something to do with the display @ 125% and designtime @ 100%. Yep. After switching back to 125% I tried the working trunk on 100% (still with LCLVersion 1.7) and it crashed too. ---------------------------------------------------------------------- balazsszekely · 2018-04-06 15:08 OK then. This bug should go to @Ondrej. He is the one who developed the High DPI feature, he will know what to do. PS: I can reproduce with 125%. ---------------------------------------------------------------------- rvk · 2018-04-06 15:22 https://bugs.freepascal.org/view.php?id=33575 Edit: Also confirmed on Windows 10. ---------------------------------------------------------------------- dsyrios · 2018-04-06 15:28 @rvk You are right... QuoteIf you want this working in Lazarus 1.8.2 just open up procedurelist.pas (with lazarus.lpi open), goto the form (F12) and toggle something and save it again. Rebuild the Lazarus ide again and it should work.When I change any xxx% DPI, it crashes and I have to do the above solution again. ---------------------------------------------------------------------- dsyrios · 2018-04-06 15:48 @rvk I saw your report at bugtracker that you refer only 125% DPI. I noticed that NOT only at 125%, but any time I change the current xxx% DPI, it crashes and I have to follow your... QuoteIf you want this working in Lazarus 1.8.2 just open up procedurelist.pas (with lazarus.lpi open), goto the form (F12) and toggle something and save it again. Rebuild the Lazarus ide again and it should work ---------------------------------------------------------------------- rvk · 2018-04-06 15:50 Quote from: dsyrios on April 06, 2018, 05:48:49 pmI saw your report at bugtracker that you refer only 125% DPI. I noticed that NOT only at 125%, but any time I change the current xxx% DPI, it crashes It happens at 125% when it is designed for 100%. It could be that if you design it @ 125% (save it) it could crash at 100% again. Did you try it at 100% (with a saved procedurelist.lfm @ 125%)? ---------------------------------------------------------------------- balazsszekely · 2018-04-06 15:52 125% was just an example. The point is if the design time dpi is different from the runtime dpi the IDE crashes. ---------------------------------------------------------------------- rvk · 2018-04-06 15:54 Yes, it could be as simple as a rounding problem. The toolbar needing to be put at a position but it can't be put there because of a rounding problem (because different designtime/runtime dpi). In that case the toolbar is not at the expected position and the loop starts over again. (Maybe, but it was hard to trace/diagnose) ---------------------------------------------------------------------- Relativity · 2018-04-06 19:13 I can only say that through Control Panel > Appearance and Personalization > Display I coud see that I am on 125 % and this is indicated as default. That is, 125 % is the default. rvk, I don't understand much of your posts, because they are far beyond the limits of my knowledge, sorry. I only wanted to ask: what do you mean by design time dpi ? How do you explain that it crashes also when I create a new project and I do alt-g ? Is in that case the runtime not the same as the design time ? ---------------------------------------------------------------------- rvk · 2018-04-06 20:26 Quote from: Relativity on April 06, 2018, 09:13:04 pmI can only say that through Control Panel > Appearance and Personalization > Display I coud see that I am on 125 % and this is indicated as default. That is, 125 % is the default.For me 100% is default and recommended. But that might depend on the size and resolution of your screen. QuoteI only wanted to ask: what do you mean by design time dpi ?With design-time I meant in which dpi setting the IDE is designed. It's the IDE that crashes on 125% dpi because it was originally designed at 100%. Most designers design at 100% because designing at another setting could cause problems when running on 100% (and it was designed on something different). Since the IDE (and procedurelist.lfm) was designed at 100%, when displaying at 125% it needs to resize during runtime. Perhaps there is some roundoff where it can't put the toolbar correctly at the top and it gets stuck in a loop. You can fix this quite easily yourself. Open up ide\lazarus.lpi project. Press Ctrl+F12 and open procedurelist.pas Press F12 to view the form Resize it slightly (it doesn't really matter) Press F12 again to view the code Choose File > Save (or Ctrl+S) to save it Now choose Tools > Configure Builds Choose Clean up + Build all at the top Choose Build at the bottom Lazarus will now recompile itself with your changed form and the ProcedureList will work This is because you changed the procedurelist form, it is now saved with a setting of 120DPP in designtime and resizing the form work correctly now. Of course this is a bug which still exists in trunk (development version) so it has to be corrected in the original release by someone. (hence the bug-report I submitted) ---------------------------------------------------------------------- rvk · 2018-04-20 08:51 Fixed in trunk revision 57674 by Ondrej. Fix is also targeted for Lazarus 1.8.4. https://bugs.freepascal.org/view.php?id=33575 ---------------------------------------------------------------------- zamtmn · 2018-04-23 20:55 r57674 have bad consequences. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs,  ComCtrls,StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    procedure _onCreateHandler(Sender: TObject);  private   public   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1._onCreateHandler(Sender: TObject);var  tb:TToolBar;  cb:TComboBox;begin  tb:=TToolBar.Create(self);  cb:=TComboBox.Create(tb);  cb.Align:=alRight;  cb.Parent:=tb;  tb.Parent:=self;end; end. with r57673 - ComboBox located right side with r57674 - ComboBox located left side windows 7, trunk Lazarus and trunk FPC ---------------------------------------------------------------------- rvk · 2018-04-24 09:44 Quote from: zamtmn on April 23, 2018, 10:55:05 pmr57674 have bad consequences.I don't think TToolButton is supposed to contain a right aligned TComboBox. It is for TToolButtons which, when they are added to the point they overflow at the right, they continue on a new line. In Delphi a TComboBox dropped on a TToolbar also can't be aligned right. ---------------------------------------------------------------------- univan · 2018-05-11 03:19 Quote from: rvk on April 06, 2018, 10:26:01 pmQuote from: Relativity on April 06, 2018, 09:13:04 pmI can only say that through Control Panel > Appearance and Personalization > Display I coud see that I am on 125 % and this is indicated as default. That is, 125 % is the default.For me 100% is default and recommended. But that might depend on the size and resolution of your screen. QuoteI only wanted to ask: what do you mean by design time dpi ?With design-time I meant in which dpi setting the IDE is designed. It's the IDE that crashes on 125% dpi because it was originally designed at 100%. Most designers design at 100% because designing at another setting could cause problems when running on 100% (and it was designed on something different). Since the IDE (and procedurelist.lfm) was designed at 100%, when displaying at 125% it needs to resize during runtime. Perhaps there is some roundoff where it can't put the toolbar correctly at the top and it gets stuck in a loop. You can fix this quite easily yourself. Open up ide\lazarus.lpi project. Press Ctrl+F12 and open procedurelist.pas Press F12 to view the form Resize it slightly (it doesn't really matter) Press F12 again to view the code Choose File > Save (or Ctrl+S) to save it Now choose Tools > Configure Builds Choose Clean up + Build all at the top Choose Build at the bottom Lazarus will now recompile itself with your changed form and the ProcedureList will work This is because you changed the procedurelist form, it is now saved with a setting of 120DPP in designtime and resizing the form work correctly now. Of course this is a bug which still exists in trunk (development version) so it has to be corrected in the original release by someone. (hence the bug-report I submitted) fix it on windows 10 . Screen DPI 125% ---------------------------------------------------------------------- rvk · 2018-05-11 03:26 Quote from: univan on May 11, 2018, 05:19:32 amfix it on windows 10 . Screen DPI 125% It's already fixed. See my previous post. Quote from: rvk on April 20, 2018, 10:51:48 amFixed in trunk revision 57674 by Ondrej. Fix is also targeted for Lazarus 1.8.4. https://bugs.freepascal.org/view.php?id=33575 If you can't wait for 1.8.4 you can fix it yourself. (Also see my last post, the one you quoted).