[Bug 14937] Astroplanner 1.6.1 crashes when closing "preferences" window ( TOOLTIPS_SubclassProc must be unsubclassed during WM_NCDESTROY)

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Dec 19 14:05:39 CST 2017


https://bugs.winehq.org/show_bug.cgi?id=14937

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Astroplanner 1.6.1 crashes  |Astroplanner 1.6.1 crashes
                   |when closing                |when closing "preferences"
                   |                            |window
                   |                            |(TOOLTIPS_SubclassProc must
                   |                            |be unsubclassed during
                   |                            |WM_NCDESTROY)

--- Comment #24 from Anastasius Focht <focht at gmx.net> ---
Hello again,

last comment was too fast typing ;-)

Anyway, Nikolay's analysis is quite spot on.

The problem with tooltips WM_DESTROY handler is the unsubclassing being done
there - too early. The app hook code still expects to be called, retrieving
instance data via 'GetProp()'.

Have the TOOLTIPS_SubclassProc handle WM_NCDESTROY and unsubclass there.

Related info: https://blogs.msdn.microsoft.com/oldnewthing/20031111-00/?p=41883
("The Old New Thing: Safer subclassing")

--- quote ---
Do not assume that subclasses are added and removed in a purely stack-like
manner. If you want to unsubclass and find that you are not the window
procedure at the top of the chain you cannot safely unsubclass. You will have
to leave your subclass attached until it becomes safe to unsubclass. Until that
time, you just have to keep passing the messages through to the previous
procedure. 
--- quote ---

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list