https://bugs.winehq.org/show_bug.cgi?id=56698
Bug ID: 56698 Summary: SuddenStrike 3 crashes when opening the intro movie Product: Wine Version: 9.7 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: winegstreamer Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com Regression SHA1: e870f31d773376f3824c7803b5451f7025c3e92b Distribution: ArchLinux
Created attachment 76483 --> https://bugs.winehq.org/attachment.cgi?id=76483 terminal output
There is a short .avi file depicting the developer logo that is intended to play when you start the game. Wine crashes with an assertion in winegstreamer when trying to play that file.
Reverting commit e870f31d773376f3824c7803b5451f7025c3e92b fixes the problem for me.
The demo version doesn't contain any videos.
Still present in wine-9.9-17-ged9ec141d52
https://bugs.winehq.org/show_bug.cgi?id=56698
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://archive.org/downloa | |d/submarine-titans-demo/Sub | |marineTitans_demo.rar Keywords| |download
--- Comment #1 from Béla Gyebrószki gyebro69@gmail.com --- Also affects Submarine Titans. This one has a demo which can be used to reproduce the problem: https://archive.org/download/submarine-titans-demo/SubmarineTitans_demo.rar
After installation run stconfig.exe first, create a new player, go to <Configuration> tab and make sure 'Start logo' option is checked. Exit the config tool then start the game with st.exe. The demo crashes when logo1.avi is about to play.
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #2 from Rafał Mużyło galtgendo@o2.pl --- Perhaps CC the author of that MR (see bug 56491) ?
https://bugs.winehq.org/show_bug.cgi?id=56698
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |blubban@gmail.com
--- Comment #3 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Rafał Mużyło from comment #2)
Perhaps CC the author of that MR (see bug 56491) ?
Thanks, I just wasn't sure he was the author of the patch because the email address didn't match with the one in the commit. I added him now.
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #4 from Rafał Mużyło galtgendo@o2.pl --- Also, MEDIASUBTYPE_CVID...
While, in part this problem comes from that MR, this might lead to a discussion similar to those like in MR5627...
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #5 from blubban@gmail.com --- hi yes that's me, yeah, my identity at winehq is a mess
Yeah, not surprising for that commit to break 500 different things. Or rather, expose 500 previously-hidden bugs and missing features in assorted components.
The minimal testcase for this one is simply taking logo1.avi and dropping it into CLSID_FilterGraph::IGraphBuilder::RenderFile().
There's actually three different missing features here.
First up, nobody bothered implementing amt_to_wg_format_video_cinepak() in quartz_parser.c. That's easy to fix, and solves the assertion. https://gitlab.winehq.org/Alcaro/wine/-/commit/acdb6446af524d358aa799b647e99...
Second, GStreamer's AVI demuxer does not set PTS on the video frames in that file (DTS is set, but Wine ignores that), so the resulting IMediaSamples lack timestamps and are presented immediately, looking like the resulting video is just a still image. I don't know how to solve that one cleanly; maybe simply try to read DTS if PTS is absent? Would that break anything else?
Third, CLSID_AVIDec assumes the decompressor backend supports the CLJR, UYVY and YUY2 pixel formats. Our Cinepak decoder (dlls/iccvid/iccvid.c) does not; if you ask it for UYVY, it instead emits RGB16, and the resulting mixup is ... aesthetically unappealing. You can work around that by commenting out the offending formats in dlls/quartz/avidec.c, function avi_decompressor_source_get_media_type, but it's not the correct solution. (Why do we have a custom Cinepak decoder instead of using the one in GStreamer?)
Perhaps some of the above don't affect those games, I didn't check, I just grabbed the video and debugged that. But they'll definitely affect something, sooner or later.
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #6 from blubban@gmail.com --- Submitted https://gitlab.winehq.org/wine/wine/-/merge_requests/5744, please test.
I don't expect any surprises, but if there are any, I'd like to know about them sooner rather than later.
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #7 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to blubban from comment #6)
Submitted https://gitlab.winehq.org/wine/wine/-/merge_requests/5744, please test.
I don't expect any surprises, but if there are any, I'd like to know about them sooner rather than later.
Thanks for taking the time to have a look at it.
First of all, I couldn't apply the third patch from MR5744 on the wine source: [PATCH 3/5] quartz/tests: Add Cinepak test to avi splitter
patch -p1 <5744.patch gives me: patching file dlls/quartz/tests/avisplit.c patching file dlls/quartz/tests/rsrc.rc File dlls/quartz/tests/test_cinepak.avi: git binary diffs are not supported.
The rest of the patches applied successfully and I tested with some of my games that contain videos with the Cinepack codec. In some games the patch indeed fixes the crash (Alien Nations, Gabriel Knight 3). In the particular case of Sudden Strike 3 and Submarine Titans however the patch doesn't work flawlessly: the video file begins to play but only audio can be heard, the screen is black. After some seconds audio playback starts stuttering then stops entirely and the game becomes unresponsive: 0158:err:sync:RtlpWaitForCriticalSection section 003D3480 "../libs/strmbase/filter.c: strmbase_filter.stream_cs" wait timed out in thread 0158, blocked by 0150, retrying (60 sec)
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #8 from blubban@gmail.com --- Dropping that patch is fine, it just adds some tests to ensure future Wine development doesn't break anything. It doesn't affect the game itself. (I'm not sure why you're using not-Git for Git patches, but none of my business.)
Looks like I managed to break 16bit pixel formats; Wine's CI caught that just before you posted. Fixed, please retry. Sorry about that, I should've run more tests locally.
Let's hope that was the last broken piece.
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #9 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to blubban from comment #8)
Looks like I managed to break 16bit pixel formats; Wine's CI caught that just before you posted. Fixed, please retry. Sorry about that, I should've run more tests locally.
Let's hope that was the last broken piece.
Still occurs with the updated patch:
After some seconds audio playback starts stuttering then stops entirely and the game becomes unresponsive: 0158:err:sync:RtlpWaitForCriticalSection section 003D3480 "../libs/strmbase/filter.c: strmbase_filter.stream_cs" wait timed out in thread 0158, blocked by 0150, retrying (60 sec)
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #10 from blubban@gmail.com --- Okay, so it does. Then there's at least four bugs floating around that nobody found until now. The fourth one is a deadlock between avi_decompressor_sink_Receive and avi_decompressor_source_qc_Notify.
Pushed a fix for that too, same branch; Titans works for me now. Think there's anything unpleasant lurking in Strike too?
Good thing that commit went into an early wine-devel cycle, it would not be fun to have this many bugs anywhere near Wine 10.0.
https://bugs.winehq.org/show_bug.cgi?id=56698
--- Comment #11 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to blubban from comment #10)
Pushed a fix for that too, same branch; Titans works for me now. Think there's anything unpleasant lurking in Strike too?
This revision of the patch fixes the problem in Sudden Strike 3 and Submarine Titans. Thank you.
https://bugs.winehq.org/show_bug.cgi?id=56698
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |c4a162a8fe21f57e619df25dac1 | |1dbc3e5e49648
--- Comment #12 from Béla Gyebrószki gyebro69@gmail.com --- Fixed with https://source.winehq.org/git/wine.git/commit/c4a162a8fe21f57e619df25dac11db...
https://bugs.winehq.org/show_bug.cgi?id=56698
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.12.