Crash in TWIindowProcHelper.DoWindowProc when using TCalendarPopupForm
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
Place a TCalendarEdit on a form.
Run
Click on the button to make the calendar pop up.
Pres Alt-Key
Calendar popup form disappears (which is unexpected to me)
Now press any key or click the mouse anywhere: crash in TWIindowProcHelper.DoWindowProc (win32callback.inc).
Steps to reproduce:
Build and run attached sample.
Follow steps describe above.
Alternatively
- Press button that says: "Popup"
- Pres Alt-Key
- Press any key or click mouse
C:\Users\Bart\LazarusProjecten\bugs\PopupForm>project1
TForm1.FormCreate
TForm1.FormActivate
TForm1.FormDeActivate
TGeneralPopupForm.FormDeactivate
TGeneralPopupForm.FormClose
TForm1.FormActivate
TApplication.HandleException Access violation
Stack trace:
$0040AF58
$004DAE18 TWINDOWPROCHELPER__DOWINDOWPROC, line 2545 of ./win32/win32callback.inc
$004DB11A WINDOWPROC, line 2608 of ./win32/win32callback.inc
$0055D685 CUSTOMFORMWNDPROC, line 395 of ./win32/win32wsforms.pp
Additional information:
The unit "generalpopop.pas" in the sampleproject contains a stripped down version that reproduces the behaviour (and crash) of the calendar popup form.
It also contains a workaround (supply "--fix" (without quotes) as first runtime parameter to the application).
I'll attach a sample Delphi project (D7) with the same functionality as the "generalpopupform', which does not crash.
I noticed that in Delphi when I press the Alt-Key, visually the focus seems to go to the mainform, but TGeneralPopupForm.FormDeactivate is NOT called in this case (and the form does not get closed and freed), nor is the MainForms's OnActivate.
Mantis conversion info:
- Mantis ID: 28404
- OS: Window
- OS Build: Win7
- Build: r48930
- Platform: i386
- Version: 1.5 (SVN)
- Fixed in version: 2.2
- Fixed in revision: 63507 (#d031209b)
- Target version: 2.2