https://bugs.winehq.org/show_bug.cgi?id=18985
--- Comment #27 from Damjan Jovanovic damjan.jov@gmail.com --- Created attachment 65697 --> https://bugs.winehq.org/attachment.cgi?id=65697 patch to debug return path
With this patch to enhance debugging, and a WINEDEBUG='+listview,+relay,+seh' trace, we get this:
0041:trace:listview:LISTVIEW_GetNextItem nItem=-1, uFlags=1, nItemCount=1 0041:Call msvcrt.memset(003181a0,00000000,00000018) ret=6373a719 0041:Ret msvcrt.memset() retval=003181a0 ret=6373a719 0041:err:listview:LISTVIEW_GetNextItem LISTVIEW_GetNextItem() returning -1 from mask not matching 0041:Ret window proc 0x63733f70 (hwnd=0x7010c,msg=LVM_GETNEXTITEM,wp=ffffffff,lp=00000001) retval=ffffffff 0041:Ret user32.CallWindowProcA() retval=ffffffff ret=0080daf5 0041:Ret window proc 0x1300176 (hwnd=0x7010c,msg=LVM_GETNEXTITEM,wp=ffffffff,lp=00000001) retval=ffffffff 0041:Ret user32.SendMessageA() retval=ffffffff ret=007f277f 0041:Call user32.InvalidateRect(00070206,0031aa08,00000000) ret=0080bb29 0041:Ret user32.InvalidateRect() retval=00000001 ret=0080bb29 0041:trace:seh:raise_exception code=c0000005 flags=0 addr=0x0 ip=00000000 tid=0041
So LISTVIEW_GetNextItem() returns -1 due to failing on:
if ((LISTVIEW_GetItemState(infoPtr, infoPtr->nFocusedItem, uMask) & uMask) != uMask) { ERR("LISTVIEW_GetNextItem() returning -1 from mask not matching\n"); return -1; }