https://bugs.winehq.org/show_bug.cgi?id=40866
Bug ID: 40866 Summary: DigitalMicrograph: crashes when a new script is added to the menu Product: Wine Version: 1.9.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: niermann@physik.tu-berlin.de Distribution: ---
Created attachment 54885 --> https://bugs.winehq.org/attachment.cgi?id=54885 Wine output during crash
DigitalMicrograph by Gatan crashes when the "Install Script" dialog is closed. Independently of whether the dialog is opened via the "File->Install Script" or the "File->Install Script File" command.
To reproduce: Create new script (File->New Script) and try to install it (File->Install Script). In the "Install script" dialog simply press Enter without changing anything.
Bug occurs on DigitalMicrograph versions 1.8.3 and 2.3.0 (others not tested) and with wine 1.6.2 and wine-1.9.13 (others not tested).
From tracing the outputs and by debugging wine I found the reason for the crash
to be in dlls/user32/edit.c: The application calls EM_GETHANDLE and later WM_SETFONT on an edit control (without sending EM_SETHANDLE in between). During processing WM_SETFONT the es->text field is accessed, which at this point contains NULL due to the inhibited buffer locking after EM_GETHANDLE.