http://bugs.winehq.org/show_bug.cgi?id=35945
Bug ID: 35945 Summary: WM_NOTIFY (LVN_GETDISPINFO) message sent to destroyed owner-data list view Product: Wine Version: 1.6.2 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: martin@winscp.net
The default message handler for WM_DESTROY for list view with LVS_OWNERDATA sends WM_NOTIFY (LVN_GETDISPINFO) message to the control. This does not happen on Windows (tested on XP, Vista, 7 and 8).
This causes crash in WinSCP application as objects that are released on WM_DESTROY are accessed in WM_NOTIFY (LVN_GETDISPINFO) handler.
I'm attaching simple test application that show this. Press "Destroy view" button.
On Windows, you will see, in the log view on the left side:
Message [0002] - WM_DESTROY Destroyed Message [000E] - WM_GETTEXTLENGTH Message [0082] - WM_NCDESTROY
On Wine:
Message [0002] - WM_DESTROY Destroyed Message [000E] - WM_GETTEXTLENGTH Message [004E] - WM_NOTIFY WM_NOTIFY after WM_DESTROY Message [1004] Message [0082] - WM_NCDESTROY
http://bugs.winehq.org/show_bug.cgi?id=35945
--- Comment #1 from Martin Prikryl martin@winscp.net --- Created attachment 48010 --> http://bugs.winehq.org/attachment.cgi?id=48010 Test application
http://bugs.winehq.org/show_bug.cgi?id=35945
Martin Prikryl martin@winscp.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |martin@winscp.net
http://bugs.winehq.org/show_bug.cgi?id=35945
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Hi, Martin.
Thanks for your report. That's probably caused by this line in WM_DESTROY handler:
--- LISTVIEW_InvalidateList(infoPtr); ---
I'll see what I can do about it. You sure it's not a LVN_DELETEALLITEMS notification you get?
https://bugs.winehq.org/show_bug.cgi?id=35945
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
http://bugs.winehq.org/show_bug.cgi?id=35945
--- Comment #3 from Martin Prikryl martin@winscp.net --- Sorry, you are actually right. It's LVN_DELETEALLITEMS.
Though the report still stands.
I'm attaching updated test application.
On Windows, the log is still the same:
Message [0002] - WM_DESTROY Destroyed Message [000E] - WM_GETTEXTLENGTH Message [0082] - WM_NCDESTROY
On Wine:
Message [0002] - WM_DESTROY Destroyed Message [000E] - WM_GETTEXTLENGTH Message [004E] - WM_NOTIFY - Code [FF98] - LVN_DELETEALLITEMS WM_NOTIFY after WM_DESTROY Message [1004] Message [0082] - WM_NCDESTROY
http://bugs.winehq.org/show_bug.cgi?id=35945
Martin Prikryl martin@winscp.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #48010|0 |1 is obsolete| |
--- Comment #4 from Martin Prikryl martin@winscp.net --- Created attachment 48023 --> http://bugs.winehq.org/attachment.cgi?id=48023 Updated test application that show notification code of WM_NOTIFY message
http://bugs.winehq.org/show_bug.cgi?id=35945
Martin Prikryl martin@winscp.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|WM_NOTIFY (LVN_GETDISPINFO) |WM_NOTIFY |message sent to destroyed |(LVN_DELETEALLITEMS) |owner-data list view |message sent to destroyed | |owner-data list view
http://bugs.winehq.org/show_bug.cgi?id=35945
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- I sent a patch for that http://www.winehq.org/pipermail/wine-patches/2014-April/131725.html.
http://bugs.winehq.org/show_bug.cgi?id=35945
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d24095a7d1156928ab15844a544 | |38e1de966d9f4 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- Fixed with d24095a7d1156928ab15844a54438e1de966d9f4.
http://bugs.winehq.org/show_bug.cgi?id=35945
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|WM_NOTIFY |WM_NOTIFY |(LVN_DELETEALLITEMS) |(LVN_DELETEALLITEMS) |message sent to destroyed |message sent from |owner-data list view |owner-data list view being | |destroyed
http://bugs.winehq.org/show_bug.cgi?id=35945
--- Comment #7 from Martin Prikryl martin@winscp.net --- Thanks!
https://bugs.winehq.org/show_bug.cgi?id=35945
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.17.