Regression in msvideo patch
Hi, [Following on from a thread on wine-users] I've had some problems recently with running the VirtualDub video post-processing package on Wine. It used to work, but then stopped working (it no longer displays the frame previews when seeking in a video file) recently. I've done a regression test and narrowed the problem down to the patch described in: http://www.winehq.com/hypermail/wine-cvs/2002/11/0187.html Before this patch (2002-11-20 13:47:00 CST), frame preview works normally in VirtualDub. Afterwards, vdub crashes when seeking. Later cvs versions don't crash but don't display frames either. The console output from Wine includes: fixme:msvideo:DrawDibRealize (0x1, 0x8f4, 0), stub just once before a load of messages similar to: fixme:psapi:EnumProcessModules (hProcess=0xffffffff, 0x425cf000, 4096, 0x405c0038) fixme:psapi:GetModuleBaseNameA (hProcess=0xffffffff, hModule=0x400000, "", 65212): stub fixme:psapi:GetModuleBaseNameA (hProcess=0xffffffff, hModule=0x425e0000, "", 65212): stub fixme:psapi:GetModuleBaseNameA (hProcess=0xffffffff, hModule=0x78000000, "", 65212): stub ... when a crash occurs; the later non-crashing versions just display loads of messages similar to the first one about DrawDibRealize. If you like, I can try to track down when the crashing behaviour changed to simple non-drawing. Regards, Stephen
Stephen Mollett wrote:
Hi,
[Following on from a thread on wine-users]
I've had some problems recently with running the VirtualDub video post-processing package on Wine. It used to work, but then stopped working (it no longer displays the frame previews when seeking in a video file) recently.
It might also be worth mentioning that VirtualDub is a free download and under 1MB. With some initial tinkering, it at least plays mpegs great, though I really have not yet figured out how else to work it.
Stephen Mollett wrote:
Hi,
[Following on from a thread on wine-users]
I've had some problems recently with running the VirtualDub video post-processing package on Wine. It used to work, but then stopped working (it no longer displays the frame previews when seeking in a video file) recently.
I've done a regression test and narrowed the problem down to the patch described in: could yc could you send me the two traces (before and after the patch) with -debugmsg +msvideo... (if you have a large band connection - or you can put it on a server somewhere - having another pair of traces with -debugmsg +relay,+msvideo would be just fine)
A+ -- Eric Pouech
On Sunday 29 Dec 2002 16:40, Eric Pouech wrote:
could you send me the two traces (before and after the patch) with -debugmsg +msvideo... (if you have a large band connection - or you can put it on a server somewhere - having another pair of traces with -debugmsg +relay,+msvideo would be just fine)
Hi, Here are the basic -debugmsg +msvideo logs. The ones with +relay are at: http://www.cantoris.demon.co.uk/before-relay.log.bz2 (690,270 B) http://www.cantoris.demon.co.uk/after-relay.log.bz2 (1,476,695 B) so as not to explode anyone's mailbox. :-) They will expand to about 300MB (!) total. Basically, they just record me opening VirtualDub, opening an AVI and pulling the position scroller along a bit. Using the version after the patch, Wine just hangs when the console output is redirected rather than trying to start the debugger. top shows wineserver using about 75% CPU and wine using the rest, until I interrupt the process. Regards, Stephen
Here are the basic -debugmsg +msvideo logs. The ones with +relay are at:
http://www.cantoris.demon.co.uk/before-relay.log.bz2 (690,270 B) http://www.cantoris.demon.co.uk/after-relay.log.bz2 (1,476,695 B)
so as not to explode anyone's mailbox. :-) They will expand to about 300MB (!) total. thanx does the attached patch fix your issue ? A+
-- Eric Pouech Index: dlls/msvideo/drawdib.c =================================================================== RCS file: /home/cvs/cvsroot/wine/wine/dlls/msvideo/drawdib.c,v retrieving revision 1.19 diff -u -r1.19 drawdib.c --- dlls/msvideo/drawdib.c 15 Dec 2002 01:14:21 -0000 1.19 +++ dlls/msvideo/drawdib.c 30 Dec 2002 14:33:18 -0000 @@ -64,11 +64,11 @@ { WINE_HDD* hdd; - for (hdd = HDD_FirstHdd; hdd != NULL && hdd->hSelf != hdd; hdd = hdd->next); + for (hdd = HDD_FirstHdd; hdd != NULL && hdd->hSelf != hd; hdd = hdd->next); return hdd; } -static DWORD HDD_HandleRef = 1; +static DWORD HDD_HandleRef = 0x1000; /*********************************************************************** * DrawDibOpen [MSVFW32.@] @@ -80,7 +80,6 @@ TRACE("(void)\n"); whdd = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_HDD)); - TRACE("=> %p\n", whdd); while (MSVIDEO_GetHddPtr((HDRAWDIB)HDD_HandleRef) != NULL) HDD_HandleRef++; whdd->hSelf = (HDRAWDIB)HDD_HandleRef++; @@ -88,6 +87,8 @@ whdd->next = HDD_FirstHdd; HDD_FirstHdd = whdd; + TRACE("=> %p (%p)\n", whdd->hSelf, whdd); + return whdd->hSelf; } @@ -97,12 +98,22 @@ BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) { WINE_HDD* whdd = MSVIDEO_GetHddPtr(hdd); + WINE_HDD** p; TRACE("(%p)\n", hdd); if (!whdd) return FALSE; if (whdd->begun) DrawDibEnd(hdd); + + for (p = &HDD_FirstHdd; *p != NULL; p = &((*p)->next)) + { + if (*p == whdd) + { + *p = whdd->next; + break; + } + } HeapFree(GetProcessHeap(), 0, whdd);
participants (3)
-
Duane Clark -
Eric Pouech -
Stephen Mollett