* * *

Author Topic: Strange Bug: Restoring minimized Progs closes them  (Read 1167 times)

Pascal

  • Sr. Member
  • ****
  • Posts: 488
Strange Bug: Restoring minimized Progs closes them
« on: March 24, 2017, 01:46:05 pm »
I have a strange bug with lazarus trunk (54473) and FPC trunk (35650).
The IDE and other programs close when they are restored from minimized state.
WM_SHOWWINDOW also does WM_CLOSE.
When switching back to FPC 3.0.2 everything is okay again.
« Last Edit: March 24, 2017, 01:48:39 pm by Pascal »
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Pascal

  • Sr. Member
  • ****
  • Posts: 488
Re: Strange Bug: Restoring minimized Progs closes them
« Reply #1 on: March 24, 2017, 01:57:32 pm »
This is the stack trace at OnClose:

Code: Text  [Select]
  1. #0 TFORM1__FORMCLOSE(0x28402c8, CAFREE, <error reading variable>) at unit1.pas:33
  2. #1 TCUSTOMFORM__DOCLOSE(CAFREE, <error reading variable>) at .\include\customform.inc:966
  3. #2 TCUSTOMFORM__CLOSE(<error reading variable>) at .\include\customform.inc:2212
  4. #3 TCUSTOMFORM__WMCLOSEQUERY({MSG = 66622, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}, <error reading variable>) at .\include\customform.inc:2292
  5. #4 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
  6. #5 VMT_$FORMS_$$_TCUSTOMFORM at :0
  7. #6 ?? at :0
  8. #7 TWINCONTROL__WNDPROC({MSG = 66622, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}, <error reading variable>) at .\include\wincontrol.inc:5395
  9. #8 TCUSTOMFORM__WNDPROC({MSG = 66622, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}, <error reading variable>) at .\include\customform.inc:1474
  10. #9 DELIVERMESSAGE(0x28402c8, <error reading variable: Attempt to dereference a generic pointer.>) at lclmessageglue.pas:112
  11. #10 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2499
  12. #11 WINDOWPROC(4918112, 16, 0, 0) at .\win32\win32callback.inc:2672
  13. #12 CUSTOMFORMWNDPROC(4918112, 16, 0, 0) at .\win32\win32wsforms.pp:386
  14. #13 USER32!SetManipulationInputTarget at :0
  15. #14 USER32!DispatchMessageW at :0
  16. #15 USER32!EndTask at :0
  17. #16 ADJUSTFORMBOUNDS(0x27dd360, <error reading variable: Cannot access memory at address 0x60f1db5b>) at .\win32\win32wsforms.pp:305
  18. #17 USER32!SendMessageA at :0
  19. #18 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2023
  20. #19 WINDOWPROC(3213574, 19, 0, 0) at .\win32\win32callback.inc:2672
  21. #20 USER32!SetManipulationInputTarget at :0
  22. #21 USER32!DispatchMessageW at :0
  23. #22 USER32!DispatchMessageW at :0
  24. #23 USER32!MsgWaitForMultipleObjectsEx at :0
  25. #24 ntdll!KiUserCallbackDispatcher at :0
  26. #25 ?? at :0
  27. #26 USER32!SetRect at :0
  28. #27 UxTheme!OpenThemeData at :0
  29. #28 UxTheme!GetThemeBool at :0
  30. #29 USER32!DispatchMessageW at :0
  31. #30 TWINDOWPROCHELPER__DOSYSCMDRESTORE(<error reading variable>) at .\win32\win32callback.inc:1007
  32. #31 TWINDOWPROCHELPER__HANDLESYSCOMMAND(<error reading variable>) at .\win32\win32callback.inc:1043
  33. #32 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2318
  34. #33 WINDOWPROC(3213574, 274, 61728, 0) at .\win32\win32callback.inc:2672
  35. #34 USER32!SetManipulationInputTarget at :0
  36. #35 USER32!DispatchMessageW at :0
  37. #36 USER32!DispatchMessageW at :0
  38. #37 USER32!DispatchMessageW at :0
  39. #38 TWIN32WIDGETSET__APPPROCESSMESSAGES(<error reading variable>) at .\win32\win32object.inc:407
  40. #39 TAPPLICATION__HANDLEMESSAGE(<error reading variable>) at .\include\application.inc:1286
  41. #40 TAPPLICATION__RUNLOOP(<error reading variable>) at .\include\application.inc:1424
  42. #41 TWIDGETSET__APPRUN(0x422f80 <TAPPLICATION__RUNLOOP>, <error reading variable>) at .\include\interfacebase.inc:54
  43. #42 TAPPLICATION__RUN(<error reading variable>) at .\include\application.inc:1412
  44. #43 main at C:\Users\RIEKEN~1\AppData\Local\Temp\X-Lazarus\project1.lpr:19
  45.  

OnClose is fired a second time:
Code: Text  [Select]
  1. #0 TFORM1__FORMCLOSE(0x28402c8, CAFREE, <error reading variable>) at unit1.pas:33
  2. #1 TCUSTOMFORM__DOCLOSE(CAFREE, <error reading variable>) at .\include\customform.inc:966
  3. #2 TCUSTOMFORM__CLOSE(<error reading variable>) at .\include\customform.inc:2212
  4. #3 TCUSTOMFORM__WMCLOSEQUERY({MSG = 66622, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}, <error reading variable>) at .\include\customform.inc:2292
  5. #4 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
  6. #5 VMT_$FORMS_$$_TCUSTOMFORM at :0
  7. #6 ?? at :0
  8. #7 TWINCONTROL__WNDPROC({MSG = 66622, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}, <error reading variable>) at .\include\wincontrol.inc:5395
  9. #8 TCUSTOMFORM__WNDPROC({MSG = 66622, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}, <error reading variable>) at .\include\customform.inc:1474
  10. #9 DELIVERMESSAGE(0x28402c8, <error reading variable: Attempt to dereference a generic pointer.>) at lclmessageglue.pas:112
  11. #10 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2499
  12. #11 WINDOWPROC(4918112, 16, 0, 0) at .\win32\win32callback.inc:2672
  13. #12 CUSTOMFORMWNDPROC(4918112, 16, 0, 0) at .\win32\win32wsforms.pp:386
  14. #13 USER32!SetManipulationInputTarget at :0
  15. #14 USER32!DispatchMessageW at :0
  16. #15 USER32!EndTask at :0
  17. #16 ADJUSTFORMBOUNDS(0x27dd480, <error reading variable: Cannot access memory at address 0x60f1d8db>) at .\win32\win32wsforms.pp:305
  18. #17 USER32!SendMessageA at :0
  19. #18 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2023
  20. #19 WINDOWPROC(3213574, 19, 0, 0) at .\win32\win32callback.inc:2672
  21. #20 USER32!SetManipulationInputTarget at :0
  22. #21 USER32!DispatchMessageW at :0
  23. #22 USER32!DispatchMessageW at :0
  24. #23 USER32!MsgWaitForMultipleObjectsEx at :0
  25. #24 ntdll!KiUserCallbackDispatcher at :0
  26. #25 ?? at :0
  27. #26 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2308
  28. #27 WINDOWPROC(4918112, 24, 1, 0) at .\win32\win32callback.inc:2672
  29. #28 CUSTOMFORMWNDPROC(4918112, 24, 1, 0) at .\win32\win32wsforms.pp:386
  30. #29 USER32!SetManipulationInputTarget at :0
  31. #30 USER32!DispatchMessageW at :0
  32. #31 USER32!DispatchMessageW at :0
  33. #32 USER32!MsgWaitForMultipleObjectsEx at :0
  34. #33 ntdll!KiUserCallbackDispatcher at :0
  35. #34 ?? at :0
  36. #35 TWINDOWPROCHELPER__HANDLESYSCOMMAND(<error reading variable>) at .\win32\win32callback.inc:1043
  37. #36 TWINDOWPROCHELPER__DOWINDOWPROC(<error reading variable>) at .\win32\win32callback.inc:2318
  38. #37 WINDOWPROC(3213574, 274, 61728, 0) at .\win32\win32callback.inc:2672
  39. #38 USER32!SetManipulationInputTarget at :0
  40. #39 USER32!DispatchMessageW at :0
  41. #40 USER32!DispatchMessageW at :0
  42. #41 USER32!DispatchMessageW at :0
  43. #42 TWIN32WIDGETSET__APPPROCESSMESSAGES(<error reading variable>) at .\win32\win32object.inc:407
  44. #43 TAPPLICATION__HANDLEMESSAGE(<error reading variable>) at .\include\application.inc:1286
  45. #44 TAPPLICATION__RUNLOOP(<error reading variable>) at .\include\application.inc:1424
  46. #45 TWIDGETSET__APPRUN(0x422f80 <TAPPLICATION__RUNLOOP>, <error reading variable>) at .\include\interfacebase.inc:54
  47. #46 TAPPLICATION__RUN(<error reading variable>) at .\include\application.inc:1412
  48. #47 main at C:\Users\RIEKEN~1\AppData\Local\Temp\X-Lazarus\project1.lpr:19
  49.  
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Cyrax

  • Hero Member
  • *****
  • Posts: 540
Re: Strange Bug: Restoring minimized Progs closes them
« Reply #2 on: March 24, 2017, 05:08:32 pm »
I can't reproduce your problem. Both 32- and 64-bit Lazarus behaves normally when restoring from minimized state.

Do you have anchordocking package installed into your IDE?

Windows Server 2008 R2 SP1.

FPC trunk r35650, build with these options :
Quote
clean
all
install
OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -dTEST_WIN32_SEH
COMPILER_OPTIONS=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -dTEST_WIN32_SEH
OS_TARGET=win32
CPU_TARGET=i386
REVSTR=35650
UPXPROG=echo
IDE=1
NOWPOCYCLE=1
INSTALL_PREFIX=j:\free_pascal_and_lazarus_new4\fpc\i386\win32\binary\3.1.1\fpc_trunk\trunk
LOCAL_FPMAKE_OPT=--verbose
ALLTARGET=all


Lazarus trunk r54471, build with these options:
Quote
clean all "OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -gh -O- -Si- -vb -dHEAPTRC_WINDOW -dDBG_WITH_DEBUGGER_DEBUG" UPXPROG=echo USESVN2REVISIONINC=0

Pascal

  • Sr. Member
  • ****
  • Posts: 488
Re: Strange Bug: Restoring minimized Progs closes them
« Reply #3 on: March 27, 2017, 09:53:02 am »
Yes anchordocking is installed. But also simple App quits on restoring from minimized state.
I will try a clean checkout later.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

Pascal

  • Sr. Member
  • ****
  • Posts: 488
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

 

Recent

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