https://bugs.winehq.org/show_bug.cgi?id=41171
Bug ID: 41171 Summary: Segfault on cinepak movie playback in War Wind Product: Wine-staging Version: 1.9.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: wine-tester@yandex.ru CC: erich.e.hoover@wine-staging.com, michael@fds-team.de, sebastian@fds-team.de Distribution: ---
Created attachment 55403 --> https://bugs.winehq.org/attachment.cgi?id=55403 backtrace
War Wind crashes on start while trying to play the intro logo, which is an AVI file with ffcvid codec. Here is the error message (backtrace is attached):
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream fixme:x11drv:X11DRV_desktop_SetCurrentMode Cannot change screen BPP from 32 to 8 fixme:x11drv:X11DRV_desktop_SetCurrentMode Cannot change screen BPP from 32 to 8 fixme:ddraw:ddraw7_WaitForVerticalBlank iface 0x13dae0, flags 0x1, event (nil) stub! fixme:ddraw:ddraw_surface7_Flip Ignoring flags 0x1. fixme:iccvid:ICCVID_DriverProc Unknown message: 401e 3539192 3539240 err:iccvid:decode_cinepak CVID: corruption 29700 (QT/AVI) != 13158 (CV) wine: Unhandled page fault on write access to 0x003f8070 at address 0x7d4f688f (thread 0009), starting debugger... preloader: Warning: failed to reserve range 00010000-00110000
https://bugs.winehq.org/show_bug.cgi?id=41171
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- Could you please check if this issue also occurs in the development version of Wine?
https://bugs.winehq.org/show_bug.cgi?id=41171
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- It does not crash for me with staging or not, but I can see the corruption messages and the video is not rendered correctly in neither wine version.
https://bugs.winehq.org/show_bug.cgi?id=41171
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Can you confirm if we have the same CD version? These are the sha1sum from the AVI files in the CD:
58274b479c7a13aaaa0eeb82ff4baa82bd246555 CD:/WARWIND/DATA/VIDS/OPEN/LOGOS.AVI d084e27d9b3f9705644da6c10eb4b4a5d8c8b257 CD:/WARWIND/DATA/VIDS/OPEN/WWOPEN.AVI
https://bugs.winehq.org/show_bug.cgi?id=41171
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Although I cannot confirm the crash I can see 2 problems: 1 - Wine iccvid does not support 8 bit stream decoding; 2 - Wine iccvid does not support GET PALETTE.
The game skips DECOMPRESS_QUERY and jumps directly to DECOMPRESS_BEGIN, this is the output with native iccvid (which works and displays video correctly):
ICOpen (vidc,cvid,0x00000002) ICOpen => 0x1 MSVIDEO_SendMessage (0x8fb188,ICM_DECOMPRESS_GET_PALETTE,0x003500e8,0x00350118) MSVIDEO_SendMessage -> ICERR_OK MSVIDEO_SendMessage (0x8fb188,ICM_DECOMPRESS_BEGIN,0x003500e8,0x00350118) MSVIDEO_SendMessage -> ICERR_OK MSVIDEO_SendMessage (0x8fb188,ICM_DECOMPRESSEX,0x0032f838,0x00000034) MSVIDEO_SendMessage -> ICERR_OK ...
This is with wine:
ICOpen (vidc,cvid,0x00000002) ICOpen => 0x1 MSVIDEO_SendMessage (0x8fb0b8,ICM_DECOMPRESS_GET_PALETTE,0x003500e8,0x00350118) MSVIDEO_SendMessage -> ICERR_UNSUPPORTED MSVIDEO_SendMessage (0x8fb0b8,ICM_DECOMPRESS_BEGIN,0x003500e8,0x00350118) MSVIDEO_SendMessage -> ICERR_OK MSVIDEO_SendMessage (0x8fb0b8,ICM_DECOMPRESSEX,0x0032f838,0x00000034) MSVIDEO_SendMessage -> ICERR_OK ...
The decompress function blindly attempts to decompress the data because it defaults to 24 bit decoding (remainder to remove the variable initialization and add a default case in the select to return error).
https://bugs.winehq.org/show_bug.cgi?id=41171
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |iccvid Product|Wine-staging |Wine
https://bugs.winehq.org/show_bug.cgi?id=41171
--- Comment #5 from wine-tester@yandex.ru --- (In reply to Sebastian Lackner from comment #1)
Could you please check if this issue also occurs in the development version of Wine?
The same problem occurs in 1.9.16 (x86-64) and in stable 1.8.0 (i386).
(In reply to Bruno Jesus from comment #3)
Can you confirm if we have the same CD version? These are the sha1sum from the AVI files in the CD:
I am using the digital version from GOG.com. The sha1sum for these files is the same in this version to the ones you provided.
https://bugs.winehq.org/show_bug.cgi?id=41171
art.sormy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |art.sormy@gmail.com
--- Comment #6 from art.sormy@gmail.com --- I had exactly the same issue with Earth 2150 game and I was able to solve issues with cinepak codec installation.
Codec could be downloaded here: http://www.probo.com/cinepak.php
Just unpack and replace ICCVID.DLL in wine system32 folder with file from archive.
Don't forget to enable "*iccvid" native library override in "winecfg".
PS: I'm going to submit PR to winetricks to enable command "winetricks cinepak"
By the way, internal wine's iccvid has very limited compatibility with original cinepak codec.
https://bugs.winehq.org/show_bug.cgi?id=41171
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|iccvid |msvfw32
https://bugs.winehq.org/show_bug.cgi?id=41171
Bartosz gang65@poczta.onet.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gang65@poczta.onet.pl
https://bugs.winehq.org/show_bug.cgi?id=41171
--- Comment #7 from Bartosz gang65@poczta.onet.pl --- The error is in method: cvid_v1_24 The line which is causing crash: vptr[y*row_inc + x*3 + 0] = cb->b[x/2+(y/2)*2];
https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/iccvid/iccvid.c#L219
In the logs the EXCEPTION_ACCESS_VIOLATION error message: warn:seh:dispatch_exception EXCEPTION_ACCESS_VIOLATION exception (code=c0000005) raised trace:seh:call_stack_handlers calling handler at 0049DB9C code=c0000005 flags=0 trace:string:wvsnprintfA 0074EFA0 1024 "The instruction at %08lx referenced memory at %08lx\nThe memory could not be %s" trace:string:wvsnprintfA "The instruction at 7c403a91 referenced memory at 0e078070\nThe memory could not be written"
So it is not possible to write to data which is pointed by vptr pointer.
https://bugs.winehq.org/show_bug.cgi?id=41171
--- Comment #8 from Bartosz gang65@poczta.onet.pl --- After installing Cinepak Codec from Radius (iccvid.dll):
$ winetricks cinepak
the problem is gone.
The line which is causing the crash (with writing using `vptr` pointer): https://gitlab.winehq.org/wine/wine/-/blob/wine-7.18/dlls/iccvid/iccvid.c#L2...
The tickets: https://bugs.winehq.org/show_bug.cgi?id=49961 and https://bugs.winehq.org/show_bug.cgi?id=52262
is a duplication of this one.