LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Games (https://www.linuxquestions.org/questions/linux-games-33/)
-   -   RPG Maker games crash on Wine due to gstreamer (https://www.linuxquestions.org/questions/linux-games-33/rpg-maker-games-crash-on-wine-due-to-gstreamer-4175583045/)

MirceaKitsune 06-25-2016 09:03 AM

RPG Maker games crash on Wine due to gstreamer
 
I've had a very annoying problem for a while: Whenever I play RPG Maker games on Wine, the game will occasionally crash. The crashes only happen in some games, at specific stages, and are usually random (the same scene will only crash sometimes). This makes it either impossible or annoying to play most games, so I decided to dig deeper into the problem today.

First of all, the issue is caused by gstreamer. The logs indicate it might be an architecture mixing problem (32bit vs 64bit). Here is an example of the full crash log:

Code:

mircea@linux-qz0r:~/Games/Small/RPG/Vore/Chocola Adventure> wine ./Game.exe
fixme:service:scmdatabase_autostart_services Auto-start service L"SecDrv" failed to start: 2
fixme:ntoskrnl:MmGetSystemRoutineAddress L"KdRefreshDebuggerNotPresent" not found
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 4d004 (device=4 access=3 func=401 method=0)
ATTENTION: default value of option force_glsl_extensions_warn overridden by environment.
ATTENTION: default value of option allow_glsl_extension_directive_midshader overridden by environment.
fixme:d3d:wined3d_adapter_find_polyoffset_scale No FBOs, assuming polyoffset scale of 2^23.
fixme:d3d:wined3d_adapter_find_polyoffset_scale No FBOs, assuming polyoffset scale of 2^23.
fixme:win:EnumDisplayDevicesW ((null),0,0x82b174,0x00000000), stub!
fixme:d3d:swapchain_init Add OpenGL context recreation support to context_validate_onscreen_formats
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:reg:RegQueryInfoKeyW security argument not supported.
fixme:gstreamer:GST_QueryInterface No interface for {37d84f60-42cb-11ce-8135-00aa004bb851}!
fixme:gstreamer:GST_QueryInterface No interface for {8e1c39a1-de53-11cf-aa63-0080c744528d}!
fixme:gstreamer:GST_QueryInterface No interface for {f90a6130-b658-11d2-ae49-0000f8754b99}!
fixme:gstreamer:GST_Connect Could not make source filter, are gstreamer-plugins-* installed for 32 bits?

(wine:1803): GStreamer-CRITICAL **: gst_element_set_bus: assertion 'GST_IS_ELEMENT (element)' failed
wine: Unhandled page fault on read access to 0xbaefb1fc at address 0x70fc9253 (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0xbaefb1fc in 32-bit code (0x70fc9253).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:70fc9253 ESP:008281c0 EBP:00828228 EFLAGS:00010286(  R- --  I S - -P- )
 EAX:71327c20 EBX:710aa000 ECX:baefb1fc EDX:00000001
 ESI:00208248 EDI:baefb1fc
Stack dump:
0x008281c0:  79fed0cc 00000000 00000000 70fb01cf
0x008281d0:  00000000 71487d98 70fc9239 71487000
0x008281e0:  00208248 00000000 00828228 714624e5
0x008281f0:  baefb1fc ea93e45f f75a77ab 71487000
0x00828200:  00208248 00000000 008282a8 00208248
0x00828210:  00000000 71487d98 7146246b 71487000
000c: sel=0067 base=00000000 limit=00000000 32-bit --x
Backtrace:
=>0 0x70fc9253 gst_pad_unlink+0x23() in libgstreamer-1.0.so.0 (0x00828228)
  1 0x714624e5 in winegstreamer (+0x124e4) (0x00828228)
  2 0x71462c24 in winegstreamer (+0x12c23) (0x008282a8)
  3 0x355294f4 in quartz (+0x294f3) (0x008282f8)
  4 0x355293b1 in quartz (+0x293b0) (0x00828324)
  5 0x35529342 in quartz (+0x29341) (0x0082833c)
  6 0x35538957 in quartz (+0x38956) (0x00828368)
  7 0x3553888a in quartz (+0x38889) (0x008283c8)
  8 0x35538799 in quartz (+0x38798) (0x00828620)
  9 0x3553842d in quartz (+0x3842c) (0x00828688)
  10 0x35538358 in quartz (+0x38357) (0x008286a4)
  11 0x35539b14 in quartz (+0x39b13) (0x00828704)
0x70fc9253 gst_pad_unlink+0x23 in libgstreamer-1.0.so.0: movl  0x0(%ecx),%edx
Modules:
Module  Address                Debug info      Name (187 modules)
PE        400000-  427000      Deferred        game
PE      10000000-10324000      Deferred        rgss300
PE      35500000-35708000      Export          quartz
ELF    705a6000-70638000      Deferred        liborc-0.4.so.0
ELF    70638000-70761000      Deferred        libglib-2.0.so.0
ELF    70e89000-70f01000      Deferred        libgstbase-1.0.so.0
ELF    70f01000-70f5e000      Deferred        libgobject-2.0.so.0
ELF    70f5e000-710ac000      Dwarf          libgstreamer-1.0.so.0
ELF    710ac000-71116000      Deferred        libgstaudio-1.0.so.0
ELF    71116000-711a6000      Deferred        libgstvideo-1.0.so.0
ELF    711f6000-71300000      Deferred        libasound.so.2
ELF    7140c000-7144b000      Deferred        libgsttag-1.0.so.0
ELF    7144b000-71488000      Dwarf          winegstreamer<elf>
  \-PE  71450000-71488000      \              winegstreamer
ELF    71488000-714b4000      Deferred        msvfw32<elf>
  \-PE  71490000-714b4000      \              msvfw32
ELF    714b4000-714cd000      Deferred        msacm32<elf>
  \-PE  714c0000-714cd000      \              msacm32
ELF    714cd000-714fe000      Deferred        winealsa<elf>
  \-PE  714d0000-714fe000      \              winealsa
ELF    79700000-79716000      Deferred        midimap<elf>
  \-PE  79710000-79716000      \              midimap
ELF    79716000-797d8000      Deferred        msvcrt<elf>
  \-PE  79730000-797d8000      \              msvcrt
ELF    797d8000-797ee000      Deferred        libgpg-error.so.0
ELF    797ee000-79806000      Deferred        libspeex.so.1
ELF    79806000-79892000      Deferred        libvorbisenc.so.2
ELF    79892000-798bf000      Deferred        libvorbis.so.0
ELF    798bf000-798c7000      Deferred        libogg.so.0
ELF    798c7000-7990d000      Deferred        libflac.so.8
ELF    7990d000-799c2000      Deferred        libgcrypt.so.20
ELF    799c2000-799f0000      Deferred        liblzma.so.5
ELF    799f0000-79a7f000      Deferred        libsndfile.so.1
ELF    79a7f000-79b1e000      Deferred        libsystemd.so.0
ELF    79b1e000-79b7b000      Deferred        libdbus-1.so.3
ELF    79b7b000-79c07000      Deferred        libpulsecommon-8.0.so
ELF    79c07000-79c63000      Deferred        libpulse.so.0
ELF    79c66000-79c7b000      Deferred        avicap32<elf>
  \-PE  79c70000-79c7b000      \              avicap32
ELF    79c7b000-79ca3000      Deferred        devenum<elf>
  \-PE  79c80000-79ca3000      \              devenum
ELF    79cb3000-79cdc000      Deferred        winepulse<elf>
  \-PE  79cc0000-79cdc000      \              winepulse
ELF    79cdc000-79cff000      Deferred        mmdevapi<elf>
  \-PE  79ce0000-79cff000      \              mmdevapi
ELF    7a800000-7a935000      Deferred        opengl32<elf>
  \-PE  7a820000-7a935000      \              opengl32
ELF    7a93a000-7a947000      Deferred        libjson-c.so.2
ELF    7a947000-7a992000      Deferred        dsound<elf>
  \-PE  7a950000-7a992000      \              dsound
ELF    7a9b4000-7a9ca000      Deferred        winejoystick<elf>
  \-PE  7a9c0000-7a9ca000      \              winejoystick
ELF    7a9ca000-7aa23000      Deferred        libllvmasmparser.so.3.8
ELF    7aa23000-7aa94000      Deferred        libllvminstrumentation.so.3.8
ELF    7aa94000-7aac2000      Deferred        libllvmbitwriter.so.3.8
ELF    7aac2000-7aafb000      Deferred        libllvmmcparser.so.3.8
ELF    7aafb000-7ab4b000      Deferred        libllvmx86asmprinter.so.3.8
ELF    7ab4b000-7abaa000      Deferred        libllvmvectorize.so.3.8
ELF    7abaa000-7abe3000      Deferred        libllvmprofiledata.so.3.8
ELF    7abe3000-7ac48000      Deferred        libllvmobject.so.3.8
ELF    7ac48000-7aceb000      Deferred        libllvminstcombine.so.3.8
ELF    7aceb000-7ad9e000      Deferred        libllvmtransformutils.so.3.8
ELF    7ad9e000-7afeb000      Deferred        libllvmselectiondag.so.3.8
ELF    7afeb000-7b20d000      Deferred        libllvmcodegen.so.3.8
ELF    7b20d000-7b280000      Deferred        libllvmasmprinter.so.3.8
ELF    7b400000-7b7e4000      Deferred        kernel32<elf>
  \-PE  7b420000-7b7e4000      \              kernel32
ELF    7b7f7000-7ba43000      Deferred        libllvmcore.so.3.8
ELF    7ba43000-7bc00000      Deferred        libllvmanalysis.so.3.8
ELF    7bc00000-7bcf9000      Deferred        ntdll<elf>
  \-PE  7bc10000-7bcf9000      \              ntdll
ELF    7bd03000-7bd0c000      Deferred        libffi.so.4
ELF    7bd0c000-7bd11000      Deferred        libgmodule-2.0.so.0
ELF    7bd11000-7bd2c000      Deferred        libllvmlinker.so.3.8
ELF    7bd2c000-7bd53000      Deferred        libllvmamdgpuasmprinter.so.3.8
ELF    7bd53000-7be38000      Deferred        libllvmsupport.so.3.8
ELF    7be38000-7bea4000      Deferred        libllvmmc.so.3.8
ELF    7bea4000-7c000000      Deferred        libllvmx86desc.so.3.8
ELF    7c000000-7c004000      Deferred        <wine-loader>
ELF    7c006000-7c00c000      Deferred        libtxc_dxtn.so
ELF    7c00c000-7c012000      Deferred        libllvmx86utils.so.3.8
ELF    7c012000-7c017000      Deferred        libllvmirreader.so.3.8
ELF    7c017000-7c01b000      Deferred        libllvmamdgpuutils.so.3.8
ELF    7c01b000-7c037000      Deferred        libgcc_s.so.1
ELF    7c037000-7c07e000      Deferred        libllvmruntimedyld.so.3.8
ELF    7c07e000-7c1b9000      Deferred        libllvmscalaropts.so.3.8
ELF    7c1b9000-7c400000      Deferred        libllvmx86codegen.so.3.8
ELF    7c406000-7c43e000      Deferred        libllvmbitreader.so.3.8
ELF    7c43e000-7c44b000      Deferred        libllvmtarget.so.3.8
ELF    7c44b000-7c467000      Deferred        libllvmexecutionengine.so.3.8
ELF    7c467000-7c473000      Deferred        libllvmmcjit.so.3.8
ELF    7c473000-7c476000      Deferred        libllvmx86info.so.3.8
ELF    7c476000-7c47d000      Deferred        libllvmmcdisassembler.so.3.8
ELF    7c47d000-7c5e4000      Deferred        libllvmx86disassembler.so.3.8
ELF    7c5e4000-7c5e7000      Deferred        libllvmamdgpuinfo.so.3.8
ELF    7c5e7000-7c6b9000      Deferred        libllvmamdgpudesc.so.3.8
ELF    7c6b9000-7c744000      Deferred        libllvmipo.so.3.8
ELF    7c744000-7c859000      Deferred        libllvmamdgpucodegen.so.3.8
ELF    7c859000-7c873000      Deferred        libelf.so.1
ELF    7c873000-7c87e000      Deferred        libdrm_amdgpu.so.1
ELF    7c87e000-7c88c000      Deferred        libdrm_radeon.so.1
ELF    7c88c000-7c896000      Deferred        libdrm_nouveau.so.2
ELF    7c896000-7cac4000      Deferred        libcrypto.so.1.0.0
ELF    7cac4000-7d67b000      Deferred        radeonsi_dri.so
ELF    7d67b000-7d6f1000      Deferred        libpcre.so.1
ELF    7d6f1000-7d6fa000      Deferred        librt.so.1
ELF    7d6fa000-7d700000      Deferred        libcap.so.2
ELF    7d700000-7d728000      Deferred        libselinux.so.1
ELF    7d728000-7d74d000      Deferred        libudev.so.1
ELF    7d84d000-7d85f000      Deferred        libdrm.so.2
ELF    7d85f000-7d865000      Deferred        libxcb-dri2.so.0
ELF    7d865000-7d8d8000      Deferred        libgl.so.1
ELF    7d928000-7da78000      Deferred        wined3d<elf>
  \-PE  7d940000-7da78000      \              wined3d
ELF    7da78000-7daec000      Deferred        ddraw<elf>
  \-PE  7da80000-7daec000      \              ddraw
ELF    7daec000-7dc20000      Deferred        oleaut32<elf>
  \-PE  7db00000-7dc20000      \              oleaut32
ELF    7dc20000-7dd1c000      Deferred        comctl32<elf>
  \-PE  7dc30000-7dd1c000      \              comctl32
ELF    7ddc1000-7dddd000      Deferred        libxcb-glx.so.0
ELF    7dddd000-7ddf9000      Deferred        libglapi.so.0
ELF    7ddf9000-7de22000      Deferred        iphlpapi<elf>
  \-PE  7de00000-7de22000      \              iphlpapi
ELF    7de22000-7de3e000      Deferred        wsock32<elf>
  \-PE  7de30000-7de3e000      \              wsock32
ELF    7de3e000-7de76000      Deferred        uxtheme<elf>
  \-PE  7de40000-7de76000      \              uxtheme
ELF    7de76000-7deb0000      Deferred        ws2_32<elf>
  \-PE  7de80000-7deb0000      \              ws2_32
ELF    7deb0000-7deda000      Deferred        msacm32<elf>
  \-PE  7dec0000-7deda000      \              msacm32
ELF    7deda000-7df5a000      Deferred        rpcrt4<elf>
  \-PE  7def0000-7df5a000      \              rpcrt4
ELF    7df5a000-7e094000      Deferred        ole32<elf>
  \-PE  7df70000-7e094000      \              ole32
ELF    7e094000-7e14d000      Deferred        winmm<elf>
  \-PE  7e0a0000-7e14d000      \              winmm
ELF    7e14d000-7e1c6000      Deferred        shlwapi<elf>
  \-PE  7e160000-7e1c6000      \              shlwapi
ELF    7e1c6000-7e403000      Deferred        shell32<elf>
  \-PE  7e1e0000-7e403000      \              shell32
ELF    7e512000-7e519000      Deferred        libxfixes.so.3
ELF    7e519000-7e525000      Deferred        libxcursor.so.1
ELF    7e525000-7e538000      Deferred        libxi.so.6
ELF    7e538000-7e53c000      Deferred        libxcomposite.so.1
ELF    7e53c000-7e549000      Deferred        libxrandr.so.2
ELF    7e549000-7e555000      Deferred        libxrender.so.1
ELF    7e555000-7e55c000      Deferred        libxxf86vm.so.1
ELF    7e55c000-7e560000      Deferred        libxinerama.so.1
ELF    7e560000-7e58a000      Deferred        libxcb.so.1
ELF    7e58a000-7e6d9000      Deferred        libx11.so.6
ELF    7e6da000-7e6dd000      Deferred        libx11-xcb.so.1
ELF    7e6dd000-7e6e1000      Deferred        libxdamage.so.1
ELF    7e6e1000-7e6e4000      Deferred        libxshmfence.so.1
ELF    7e6e4000-7e6ec000      Deferred        libxcb-sync.so.1
ELF    7e6ec000-7e6f0000      Deferred        libxcb-present.so.0
ELF    7e6f0000-7e6f4000      Deferred        libxcb-dri3.so.0
ELF    7e729000-7e7b9000      Deferred        winex11<elf>
  \-PE  7e730000-7e7b9000      \              winex11
ELF    7e7b9000-7e7dd000      Deferred        imm32<elf>
  \-PE  7e7c0000-7e7dd000      \              imm32
ELF    7e8d7000-7e902000      Deferred        libexpat.so.1
ELF    7e902000-7e946000      Deferred        libfontconfig.so.1
ELF    7e946000-7e987000      Deferred        libpng16.so.16
ELF    7e987000-7e999000      Deferred        libbz2.so.1
ELF    7e999000-7e9b1000      Deferred        libz.so.1
ELF    7e9b1000-7ea51000      Deferred        libfreetype.so.6
ELF    7ea51000-7ea7a000      Deferred        libtinfo.so.6
ELF    7ea7a000-7eaa7000      Deferred        libncurses.so.6
ELF    7eaa7000-7eaac000      Deferred        libxau.so.6
ELF    7eaac000-7eac1000      Deferred        libxext.so.6
ELF    7eaf7000-7eb6d000      Deferred        advapi32<elf>
  \-PE  7eb10000-7eb6d000      \              advapi32
ELF    7eb6d000-7ec8a000      Deferred        gdi32<elf>
  \-PE  7eb80000-7ec8a000      \              gdi32
ELF    7ec8a000-7eddd000      Deferred        user32<elf>
  \-PE  7eca0000-7eddd000      \              user32
ELF    7ef5b000-7efb0000      Deferred        libm.so.6
ELF    7efb1000-7efcb000      Deferred        version<elf>
  \-PE  7efc0000-7efcb000      \              version
ELF    f737a000-f737f000      Deferred        libdl.so.2
ELF    f737f000-f7535000      Deferred        libc.so.6
ELF    f7535000-f7552000      Deferred        libpthread.so.0
ELF    f75a2000-f775a000      Dwarf          libwine.so.1
ELF    f775b000-f7780000      Deferred        ld-linux.so.2
ELF    f7783000-f7784000      Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) I:\mircea\Games\Small\RPG\Vore\Chocola Adventure\Game.exe
        00000037    0
        00000036    0
        00000035    0
        00000034    0
        00000033    0
        00000032    0
        0000002e  15
        0000002d  15
        0000002c    0
        00000009    0 <==
0000000e services.exe
        00000024    0
        00000023    0
        0000001d    0
        00000014    0
        00000010    0
        0000000f    0
00000012 winedevice.exe
        0000001c    0
        00000019    0
        00000018    0
        00000013    0
0000001a plugplay.exe
        00000020    0
        0000001f    0
        0000001b    0
00000021 winedevice.exe
        00000026    0
        00000025    0
        00000022    0
00000027 explorer.exe
        0000002b    0
        0000002a    0
        00000029    0
        00000028    0
System information:
    Wine build: wine-1.9.12
    Platform: i386 (WOW64)
    Version: Windows 7
    Host system: Linux
    Host version: 4.6.2-1-default
mircea@linux-qz0r:~/Games/Small/RPG/Vore/Chocola Adventure>

What's most baffling is that the problem still occurs after gstreamer is disabled! I tried both ALSA and Pulse for the sound system in winetricks ("winetricks sound=pulse" and "winetricks sound=alsa"). Then in winecfg I used a library override to force winegstreamer to disabled. I also ran the game via both the wine and wine64 commands. Despite all this, it will still use gstreamer!

The only thing that worked was disabling gstreamer via an environment variable from the console session: export WINEDLLOVERRIDES="winegstreamer=d". Now the crashes are finally gone, whereas sound also works perfectly fine! I do however get the following error in the console, although it seems to be harmless and doesn't shut down the application:

Code:

err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\winegstreamer.dll"
What is the correct solution to this problem? If it's something as bad as a driver bug, why do only certain parts of the game crash, while most of the game works flawlessly... is this related to encoding and playing specific audio files perhaps? And why does Wine still use gstreamer when it's explicitly disabled through both winetricks and winecfg, though it does listen once I use WINEDLLOVERRIDES? I'm running openSUSE Tumbleweed.

elcore 06-26-2016 02:11 AM

It's compiled --with-gstreamer so you must meet the gstreamer version it was built with, or rebuild against the version you have.
I'd just build it without tbh.
Code:

  --with-alsa \
  --with-openal \
  --without-coreaudio \
  --without-gstreamer \
  --without-pulse \
  --without-oss \


MirceaKitsune 06-26-2016 07:25 AM

Quote:

Originally Posted by elcore (Post 5566403)
It's compiled --with-gstreamer so you must meet the gstreamer version it was built with, or rebuild against the version you have.
I'd just build it without tbh.

I don't compile Wine locally at the moment, but I'll keep that in mind. It's still surprising that the settings in winecfg would be ignored though.

Also I heard that Wine 1.9.2 will feature a new version of GStreamer (1.0). Is this true, and can I expect it to correct the issue?

elcore 06-26-2016 01:42 PM

In that case, contact your packager and make sure his package targets the same arch and set of libraries that you have.
If he's targeting a different template you're out of luck, so either clone the template of his target system or rebuild the package.
Third option would be convincing the packager to clone your target system so he can reproduce the issue, but this is going to take a while.

dugan 09-21-2017 02:59 PM

Quote:

The logs indicate it might be an architecture mixing problem (32bit vs 64bit).
Try explicitly creating a 32-bit prefix, then installing the game into that.

Code:

# $HOME/chocola does not exist; let WINE create it
export WINEPREFIX=$HOME/chocola
WINEARCH=win32 winecfg


MirceaKitsune 09-21-2017 03:05 PM

Quote:

Originally Posted by dugan (Post 5761399)
Try explicitly creating a 32-bit prefix, then installing the game into that.

Code:

# $HOME/chocola does not exist; let WINE create it
export WINEPREFIX=$HOME/chocola
WINEARCH=win32 winecfg


Hey there. I haven't been seeing this crash any more during the course of this year. If I notice it again however, I will keep this advice in mind and give it a try. Thanks for letting me know!

dugan 09-24-2017 06:45 PM

I just got cinematics working (as in not crashing) with Ys 1 Chronicles, which probably works similarly to these RPG Maker games. After installing the GOG version into a 32-bit prefix, the next steps were:

1. using "winecfg", add a library override to disable "winegstreamer"
2. "winetricks quartz amstream"
3. "wineboot -u"

Step 1 isn't needed if you built WINE without gstreamer support. Step 3 absolutely is needed.

My understanding is that this workaround should work for most Japanese indie games (and games using similar tech) where WINE has trouble playing cinematics. Some of them might need an additional override for devenum; this game in particular did not.


All times are GMT -5. The time now is 10:40 PM.