* * *

Author Topic: Alt-G does not work any more  (Read 7322 times)

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #30 on: April 06, 2018, 11:21:30 am »
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
« Last Edit: April 06, 2018, 11:23:47 am by rvk »

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #31 on: April 06, 2018, 11:36:53 am »
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

  • Hero Member
  • *****
  • Posts: 5342
Re: Alt-G does not work any more
« Reply #32 on: April 06, 2018, 11:56:57 am »
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
« Last Edit: April 06, 2018, 12:14:50 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #33 on: April 06, 2018, 02:30:35 pm »
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

  • Jr. Member
  • **
  • Posts: 95
Re: Alt-G does not work any more
« Reply #34 on: April 06, 2018, 02:36:58 pm »
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.

"How'm I gonna get through?"
  -- Pet Shop Boys

GetMem

  • Hero Member
  • *****
  • Posts: 3205
Re: Alt-G does not work any more
« Reply #35 on: April 06, 2018, 02:41:53 pm »
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
Quote
Complete 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]
  1. procedure TProcedureListForm.FormResize(Sender: TObject);
  2. begin
  3.   StatusBar.Panels[0].Width := self.ClientWidth - 105;
  4.   if not TB.Visible then
  5.     TB.Visible := True;
  6. end;  
 
3. Rebuild

This should prevent the infinite loop. Again I cannot test.
« Last Edit: April 06, 2018, 02:49:35 pm by GetMem »

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #36 on: April 06, 2018, 02:52:03 pm »
Can 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.

GetMem

  • Hero Member
  • *****
  • Posts: 3205
Re: Alt-G does not work any more
« Reply #37 on: April 06, 2018, 02:58:42 pm »
@rvk
Quote
I 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.
« Last Edit: April 06, 2018, 03:00:57 pm by GetMem »

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #38 on: April 06, 2018, 03:20:56 pm »
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)
« Last Edit: April 06, 2018, 03:26:13 pm by rvk »

GetMem

  • Hero Member
  • *****
  • Posts: 3205
Re: Alt-G does not work any more
« Reply #39 on: April 06, 2018, 03:50:51 pm »
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

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #40 on: April 06, 2018, 03:54:24 pm »
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.
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.
« Last Edit: April 06, 2018, 03:57:38 pm by rvk »

GetMem

  • Hero Member
  • *****
  • Posts: 3205
Re: Alt-G does not work any more
« Reply #41 on: April 06, 2018, 04:05:26 pm »
@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

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #42 on: April 06, 2018, 04:44:00 pm »
ARGH....  >:D 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.
« Last Edit: April 06, 2018, 05:02:09 pm by rvk »

GetMem

  • Hero Member
  • *****
  • Posts: 3205
Re: Alt-G does not work any more
« Reply #43 on: April 06, 2018, 05:08:10 pm »
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%.
« Last Edit: April 06, 2018, 05:21:31 pm by GetMem »

rvk

  • Hero Member
  • *****
  • Posts: 3467
Re: Alt-G does not work any more
« Reply #44 on: April 06, 2018, 05:22:24 pm »
https://bugs.freepascal.org/view.php?id=33575

Edit: Also confirmed on Windows 10.
« Last Edit: April 06, 2018, 05:26:40 pm by rvk »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus