http://bugs.winehq.org/show_bug.cgi?id=33564
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com --- It looks like it crashes after some actions done by TVN_SELCHANGED handler:
--- 004f:trace:treeview:TREEVIEW_WindowProc hwnd 0x900aa msg 1101 wp=00000000 lp=112d2c08 004f:trace:treeview:TREEVIEW_DeleteItem 0x112d2c08 (L"Tagged Values") 004f:trace:treeview:TREEVIEW_DeleteItem newSelection = 0x116a81f8 004f:trace:treeview:TREEVIEW_RemoveItem 0x112d2c08, (L"Tagged Values") 004f:trace:treeview:TREEVIEW_SendTreeviewNotify code:-458 action:0 olditem:0x112d2c08 newitem:(nil) 004f:trace:treeview:TREEVIEW_SendRealNotify wParam=101, lParam=0x3737a88 004f:trace:dpa:DPA_DeletePtr (0x116a7c60 3) 004f:trace:dpa:DPA_DeletePtr -- move dest=0x116a70e4 src=0x116a70e8 size=8 004f:trace:treeview:TREEVIEW_DoSelectItem Entering item 0x116a81f8 (L"Properties"), flag 9, cause 0, state 96 004f:trace:treeview:TREEVIEW_DoSelectItem TVN_SELCHANGING prev=(nil), new=0x116a81f8 004f:trace:treeview:TREEVIEW_SendTreeviewNotify code:-450 action:0 olditem:(nil) newitem:0x116a81f8 004f:trace:treeview:TREEVIEW_SendRealNotify wParam=101, lParam=0x3737a78 004f:trace:treeview:TREEVIEW_GetVisibleCount client=630, item=16 004f:trace:treeview:TREEVIEW_EnsureVisible 0x116a81f8 (L"Properties") 0 - 0 viscount(39) 004f:trace:treeview:TREEVIEW_EnsureVisible -- << 004f:trace:treeview:TREEVIEW_DoSelectItem TVN_SELCHANGED prev=(nil), new=0x116a81f8 004f:trace:treeview:TREEVIEW_SendTreeviewNotify code:-451 action:0 olditem:(nil) newitem:0x116a81f8 004f:trace:treeview:TREEVIEW_SendRealNotify wParam=101, lParam=0x3737a78 004f:trace:treeview:TREEVIEW_WindowProc hwnd 0x900aa msg 110a wp=00000009 lp=00000000 004f:trace:treeview:TREEVIEW_GetNextItem flags:9, returns 0x116a81f8 004f:trace:treeview:TREEVIEW_WindowProc hwnd 0x900aa msg 113e wp=00000000 lp=03737608 004f:trace:treeview:TREEVIEW_GetItemT item 0x116a81f8 004f:trace:treeview:TREEVIEW_UpdateDispInfo mask=0x4, callbackmask=0x22 004f:trace:treeview:TREEVIEW_GetItemT item <0x116a81f8>, txt 0x14dac09, img 57898540, mask 4 004f:trace:treeview:TREEVIEW_WindowProc hwnd 0x900aa msg 113e wp=00000000 lp=03737608 004f:trace:treeview:TREEVIEW_GetItemT item 0x116a81f8 004f:trace:treeview:TREEVIEW_UpdateDispInfo mask=0x4, callbackmask=0x22 004f:trace:treeview:TREEVIEW_GetItemT item <0x116a81f8>, txt 0x14dac09, img 57898540, mask 4 004f:trace:treeview:TREEVIEW_WindowProc hwnd 0x900aa msg 113e wp=00000000 lp=03737608 004f:trace:treeview:TREEVIEW_GetItemT item 0x11685b28 004f:trace:treeview:TREEVIEW_ValidItem invalid item 0x11685b28 004f:trace:treeview:TREEVIEW_GetItemT got item from different tree 0x11685b20, called from 0x10ff1960 ---
earlier in a log:
--- 004f:trace:treeview:TREEVIEW_WindowProc hwnd 0x900aa msg 1101 wp=00000000 lp=11685b28 004f:trace:treeview:TREEVIEW_DeleteItem 0x11685b28 (L"General") 004f:trace:treeview:TREEVIEW_DeleteItem newSelection = 0x11685ba0 004f:trace:treeview:TREEVIEW_RemoveItem 0x11685b28, (L"General") ---
so item "General" somehow survived deletion.
It feels like application stored this 'selected' item for later use, and TVN_SELCHANGING/TVN_SELCHANGED don't properly notify about selection change - see 'prev=(nil)' - because if currently selected item is removed then selection is reset.
This will need some tests but idea is to check what TVN_SELCHANGING/TVN_SELCHANGED report on selected item delete request, notification sequence order is correct.