osxmidi / LinVst

Linux Windows vst wrapper/bridge
GNU General Public License v3.0
682 stars 41 forks source link

Unhandled exception with lin-vst-servertrack.exe and SINE Player #137

Closed jens-r closed 3 years ago

jens-r commented 4 years ago

For me, SINE Player from Orchestral Tools works really well in Wine 5.4-staging. I can use all functions without problems.

SINE Player works well with LinVst and Ardour 5.12. I have tested several tracks with different instruments and MIDI functions.

However, if I save an Ardour session with two SINE Player tracks, it will not open again.

Steps to reproduce:

  1. Open Ardour 5.12.
  2. Create two SINE Player tracks (can be empty)
  3. Save the session and close Ardour.
  4. Open the session again = Crash.
Unhandled exception: C++ exception(object = 0x22d628, type = 0x1814b2318, base = 0x180000000), invalid program stack in 64-bit code (0x000000007b00facd).
Register dump:
 rip:000000007b00facd rsp:000000000022d3c0 rbp:000000000022d500 eflags:00000206 (   - --  I   - -P- )
 rax:000000000022d3e0 rbx:00000001814b2318 rcx:000000000022d3e0 rdx:000000000022d400
 rsi:000000000022d500 rdi:000000000022d420  r8:0000000000000004  r9:000000000022d4e0 r10:0000000001842000
 r11:000000000022d4a0 r12:00007fec8052ac50 r13:000000000063a1b8 r14:000000000064a750 r15:000000000064a960
Stack dump:
0x000000000022d3c0:  000000000022d3e0 0000000000000000
0x000000000022d3d0:  0000000000000000 0000000000000000
0x000000000022d3e0:  00000009e06d7363 0000000000000000
0x000000000022d3f0:  000000007b00facd 0000000000000004
0x000000000022d400:  0000000019930520 000000000022d628
0x000000000022d410:  00000001814b2318 0000000180000000
0x000000000022d420:  0000000000000000 0000000000000000
0x000000000022d430:  000000000022d510 000000000022d628
0x000000000022d440:  000000000022d490 000000007bc99df8
0x000000000022d450:  fffffffffffffffe 00000001803e0000
0x000000000022d460:  0000000000000060 0000000000000000
0x000000000022d470:  000000000000000f 00000000001147d0
Backtrace:
=>0 0x000000007b00facd RaiseException+0x65(code=<is not available>, flags=<is not available>, count=<is not available>, args=<is not available>) [Z:\builddir\build\BUILD\wine-5.4\wine64-build\dlls\kernelbase\..\..\..\dlls\kernelbase\debug.c:329] in kernelbase (0x000000000022d500)
  1 0x000000018093a095 EntryPoint+0x10001faec() in sine player (0x000000000022d500)
  2 0x00000001803f0b07 EntryPoint+0xffad655e() in sine player (0x000000000022d610)
  3 0x00000001803d8932 EntryPoint+0xffabe389() in sine player (0x000000000022d7e0)
  4 0x000000018078a4cd EntryPoint+0xffe6ff24() in sine player (0x0000000000000001)
  5 0x0000000180757b00 EntryPoint+0xffe3d557() in sine player (0x000000000022d9a9)
  6 0x000000018076f84d EntryPoint+0xffe552a4() in sine player (0x000000000022db10)
0x000000007b00facd RaiseException+0x65 [Z:\builddir\build\BUILD\wine-5.4\wine64-build\dlls\kernelbase\..\..\..\dlls\kernelbase\debug.c:329] in kernelbase: nop  
Unable to access file 'Z:\builddir\build\BUILD\wine-5.4\wine64-build\dlls\kernelbase\..\..\..\dlls\kernelbase\debug.c'
Modules:
Module  Address                 Debug info  Name (131 modules)
PE            450000-          473000   Deferred        aclui
PE            4a0000-          4ad000   Deferred        api-ms-win-core-fibers-l1-1-1
PE            4b0000-          4be000   Deferred        api-ms-win-core-localization-l1-2-1
PE          61340000-        6134d000   Deferred        api-ms-win-core-localization-obsolete-l1-2-0
PE          62600000-        626c5000   Deferred        usp10
PE          637c0000-        6391f000   Deferred        winmm
PE          64940000-        64981000   Deferred        shcore
PE          65000000-        65519000   Deferred        ole32
PE          65680000-        6568e000   Deferred        api-ms-win-core-sysinfo-l1-2-1
PE          65780000-        6579c000   Deferred        version
PE          66500000-        6658c000   Deferred        rsaenh
PE          66600000-        6660d000   Deferred        api-ms-win-core-datetime-l1-1-1
PE          66780000-        6678d000   Deferred        api-ms-win-core-string-l1-1-0
PE          68a40000-        68b5f000   Deferred        shlwapi
PE          6a700000-        6a897000   Deferred        setupapi
PE          6b2c0000-        6b463000   Deferred        wininet
PE          6b6c0000-        6b8dc000   Deferred        comdlg32
PE          6bd00000-        6bd1d000   Deferred        schannel
PE          6bec0000-        6bf05000   Deferred        imm32
PE          6c100000-        6c10e000   Deferred        api-ms-win-appmodel-runtime-l1-1-2
PE          6c9c0000-        6ca52000   Deferred        dbgeng
PE          6d9c0000-        6da0d000   Deferred        mpr
PE          6e340000-        6e34e000   Deferred        api-ms-win-core-synch-l1-2-0
PE          6e6c0000-        6ea74000   Deferred        comctl32
PE          6fbc0000-        6fdad000   Deferred        rpcrt4
PE          7b000000-        7b2a7000   Dwarf           kernelbase
ELF         7b400000-        7b67c000   Deferred        kernel32<elf>
  \-PE          7b410000-        7b67c000   \               kernel32
ELF         7bc00000-        7bd9c000   Deferred        ntdll<elf>
  \-PE          7bc20000-        7bd9c000   \               ntdll
ELF         7c000000-        7c004000   Deferred        <wine-loader>
PE         180000000-       181842000   Export          sine player
ELF     7fec76994000-    7fec76a9c000   Deferred        crypt32<elf>
  \-PE      7fec769a0000-    7fec76a9c000   \               crypt32
ELF     7fec76a9c000-    7fec76ac4000   Deferred        dnsapi<elf>
  \-PE      7fec76aa0000-    7fec76ac4000   \               dnsapi
ELF     7fec76ac4000-    7fec76af8000   Deferred        iphlpapi<elf>
  \-PE      7fec76ad0000-    7fec76af8000   \               iphlpapi
ELF     7fec76af8000-    7fec76b40000   Deferred        netapi32<elf>
  \-PE      7fec76b00000-    7fec76b40000   \               netapi32
ELF     7fec76b40000-    7fec76b91000   Deferred        secur32<elf>
  \-PE      7fec76b50000-    7fec76b91000   \               secur32
ELF     7fec76f1a000-    7fec7713b000   Deferred        libgpg-error.so.0
ELF     7fec7713b000-    7fec77457000   Deferred        libgcrypt.so.20
ELF     7fec77457000-    7fec7765d000   Deferred        libcap.so.2
ELF     7fec7765d000-    7fec77874000   Deferred        liblz4.so.1
ELF     7fec77874000-    7fec77a9b000   Deferred        liblzma.so.5
ELF     7fec77a9b000-    7fec77d40000   Deferred        libsystemd.so.0
ELF     7fec77d40000-    7fec77f49000   Deferred        libffi.so.6
ELF     7fec77f49000-    7fec7819d000   Deferred        libdbus-1.so.3
ELF     7fec7819d000-    7fec78435000   Deferred        libgmp.so.10
ELF     7fec78435000-    7fec78665000   Deferred        libhogweed.so.4
ELF     7fec78665000-    7fec7889e000   Deferred        libnettle.so.6
ELF     7fec7889e000-    7fec78ab1000   Deferred        libtasn1.so.6
ELF     7fec78ab1000-    7fec78e32000   Deferred        libunistring.so.2
ELF     7fec78e32000-    7fec79050000   Deferred        libidn2.so.0
ELF     7fec79050000-    7fec79383000   Deferred        libp11-kit.so.0
ELF     7fec79383000-    7fec79587000   Deferred        libkeyutils.so.1
ELF     7fec79587000-    7fec79a65000   Deferred        libcrypto.so.1.1
ELF     7fec79a65000-    7fec79c76000   Deferred        libkrb5support.so.0
ELF     7fec79c76000-    7fec79e9f000   Deferred        libcrypt.so.1
ELF     7fec79e9f000-    7fec7a0b1000   Deferred        libavahi-client.so.3
ELF     7fec7a0b1000-    7fec7a2be000   Deferred        libavahi-common.so.3
ELF     7fec7a2be000-    7fec7a67a000   Deferred        libgnutls.so.30
ELF     7fec7a67a000-    7fec7a87e000   Deferred        libcom_err.so.2
ELF     7fec7a87e000-    7fec7aa9a000   Deferred        libk5crypto.so.3
ELF     7fec7aa9a000-    7fec7ad8a000   Deferred        libkrb5.so.3
ELF     7fec7ad8a000-    7fec7afda000   Deferred        libgssapi_krb5.so.2
ELF     7fec7afda000-    7fec7b272000   Deferred        libcups.so.2
ELF     7fec7b275000-    7fec7b291000   Deferred        kerberos<elf>
  \-PE      7fec7b280000-    7fec7b291000   \               kerberos
ELF     7fec7b291000-    7fec7b2e2000   Deferred        uxtheme<elf>
  \-PE      7fec7b2a0000-    7fec7b2e2000   \               uxtheme
ELF     7fec7b2e2000-    7fec7b4e8000   Deferred        libxfixes.so.3
ELF     7fec7b4e8000-    7fec7b6f3000   Deferred        libxcursor.so.1
ELF     7fec7b784000-    7fec7b9bf000   Deferred        libexpat.so.1
ELF     7fec7b9bf000-    7fec7bc04000   Deferred        libfontconfig.so.1
ELF     7fec7bc04000-    7fec7be1b000   Deferred        libz.so.1
ELF     7fec7be1b000-    7fec7c050000   Deferred        libpng16.so.16
ELF     7fec7c050000-    7fec7c261000   Deferred        libbz2.so.1
ELF     7fec7c261000-    7fec7c51d000   Deferred        libfreetype.so.6
ELF     7fec7c51d000-    7fec7c72e000   Deferred        libxi.so.6
ELF     7fec7c72e000-    7fec7c931000   Deferred        libxcomposite.so.1
ELF     7fec7c931000-    7fec7cb3c000   Deferred        libxrandr.so.2
ELF     7fec7cb3c000-    7fec7cd47000   Deferred        libxrender.so.1
ELF     7fec7cd47000-    7fec7cf4d000   Deferred        libxxf86vm.so.1
ELF     7fec7cf4d000-    7fec7d150000   Deferred        libxinerama.so.1
ELF     7fec7d150000-    7fec7d354000   Deferred        libxau.so.6
ELF     7fec7d354000-    7fec7d57d000   Deferred        libxcb.so.1
ELF     7fec7d57d000-    7fec7d8c0000   Deferred        libx11.so.6
ELF     7fec7d8c0000-    7fec7dad3000   Deferred        libxext.so.6
ELF     7fec7dad3000-    7fec7db9a000   Deferred        winex11<elf>
  \-PE      7fec7dae0000-    7fec7db9a000   \               winex11
ELF     7fec7db9a000-    7fec7dbdc000   Deferred        ws2_32<elf>
  \-PE      7fec7dba0000-    7fec7dbdc000   \               ws2_32
ELF     7fec7dbdc000-    7fec7dc04000   Deferred        bcrypt<elf>
  \-PE      7fec7dbe0000-    7fec7dc04000   \               bcrypt
ELF     7fec7dc04000-    7fec7dc63000   Deferred        winspool<elf>
  \-PE      7fec7dc10000-    7fec7dc63000   \               winspool
ELF     7fec7dc63000-    7fec7e6d4000   Deferred        shell32<elf>
  \-PE      7fec7dc80000-    7fec7e6d4000   \               shell32
ELF     7fec7e7d4000-    7fec7ea58000   Deferred        libpcre2-8.so.0
ELF     7fec7ea58000-    7fec7ec83000   Deferred        libselinux.so.1
ELF     7fec7ec83000-    7fec7ee8b000   Deferred        libuuid.so.1
ELF     7fec7ee8b000-    7fec7f0dd000   Deferred        libblkid.so.1
ELF     7fec7f0dd000-    7fec7f337000   Deferred        libmount.so.1
ELF     7fec7f337000-    7fec7f551000   Deferred        libnss_myhostname.so.2
ELF     7fec7f551000-    7fec7f768000   Deferred        libresolv.so.2
ELF     7fec7f768000-    7fec7f96f000   Deferred        libnss_dns.so.2
ELF     7fec7f96f000-    7fec7fb81000   Deferred        libnss_files.so.2
ELF     7fec7fba0000-    7fec7fd4e000   Deferred        gdi32<elf>
  \-PE      7fec7fbc0000-    7fec7fd4e000   \               gdi32
ELF     7fec7fd4e000-    7fec7fe3a000   Deferred        msvcrt<elf>
  \-PE      7fec7fd70000-    7fec7fe3a000   \               msvcrt
ELF     7fec7fe3a000-    7fec7fecf000   Deferred        advapi32<elf>
  \-PE      7fec7fe50000-    7fec7fecf000   \               advapi32
ELF     7fec7fecf000-    7fec80160000   Deferred        user32<elf>
  \-PE      7fec7fef0000-    7fec80160000   \               user32
ELF     7fec80514000-    7fec8053b000   Deferred        lin-vst-servertrack<elf>
  \-PE      7fec80520000-    7fec8053b000   \               lin-vst-servertrack
ELF     7fec80e40000-    7fec81049000   Deferred        libnss_sss.so.2
ELF     7fec8e1fe000-    7fec8e416000   Deferred        libgcc_s.so.1
ELF     7fec8e416000-    7fec8e798000   Deferred        libm.so.6
ELF     7fec8e798000-    7fec8e9a1000   Deferred        librt.so.1
ELF     7fec8e9a3000-    7fec8eba7000   Deferred        libdl.so.2
ELF     7fec8ebb2000-    7fec8ebc6000   Deferred        wow64cpu<elf>
  \-PE      7fec8ebc0000-    7fec8ebc6000   \               wow64cpu
ELF     7fec8ebc6000-    7fec8ef89000   Deferred        libc.so.6
ELF     7fec8ef89000-    7fec8f1a9000   Deferred        libpthread.so.0
ELF     7fec8f1a9000-    7fec8f53b000   Dwarf           libwine.so.1
ELF     7fec8f53d000-    7fec8f768000   Deferred        ld-linux-x86-64.so.2
Threads:
process  tid      prio (all id:s are in hex)
0000000e services.exe
    [C:\windows\system32\services.exe]
    00000023    0
    0000001c    0
    00000015    0
    00000010    0
    0000000f    0
00000011 plugplay.exe
    [C:\windows\system32\plugplay.exe]
    00000019    0
    00000018    0
    00000012    0
00000013 explorer.exe
    [C:\windows\system32\explorer.exe /desktop]
    00000029    0
    00000028    0
    00000027    0
    00000014    0
0000001a winedevice.exe
    [C:\windows\system32\winedevice.exe]
    00000020    0
    0000001f    0
    0000001e    0
    0000001d    0
    0000001b    0
00000021 winedevice.exe
    [C:\windows\system32\winedevice.exe]
    00000026    0
    00000025    0
    00000024    0
    00000022    0
0000002a lin-vst-servertrack.exe
    ["Z:\usr\bin\lin-vst-servertrack.exe.so" "/home/user/.wine/drive_c/Program Files/VstPlugins/SINE Player.dll,QSXCaszf9BU7GXIXGDpGq5lYM3ITvB8bhVBfb0i8q26WQEHk"]
    0000004d    2
    0000004c    1
    00000049    0
    00000044    0
    00000043    0
    00000042    0
    00000041    0
    00000040    0
    0000003f    0
    0000003e    0
    0000003d    0
    0000003c    0
    0000003b    0
    0000003a    0
    00000039    0
    00000038    0
    00000037    0
    00000036    0
    00000035    0
    00000034    0
    00000033    0
    00000032    0
    00000031  -15
    00000030  -15
    0000002f    0
    0000002e  -15
    0000002d  -15
    0000002c  -15
    0000002b    0
00000050 (D) Z:\usr\bin\lin-vst-servertrack.exe
    ["Z:\usr\bin\lin-vst-servertrack.exe.so" "/home/user/.wine/drive_c/Program Files/VstPlugins/SINE Player.dll,Hg7RIFtWsMlFMDguN46RPv0WBxtWVv6qB36awpUM13hDunV7"]
    00000070    0
    0000006d    2
    00000069    0
    00000068    0
    00000067    0
    00000066    0
    00000065    0
    00000064    0
    00000063    0
    00000062    0
    00000061    0
    00000060    0
    0000005f    0
    0000005e    0
    0000005d    0
    0000005c    0
    0000005b    0
    0000005a    0
    00000059    0
    00000058    0
    00000057  -15
    00000056  -15
    00000055    0
    00000054  -15
    00000053  -15
    00000052  -15
    00000051    0 <==
00000071 explorer.exe
    [C:\windows\system32\explorer.exe /desktop]
    00000075    0
    00000074    0
    00000073    0
    00000072    0
System information:
    Wine build: wine-5.4 (Staging)
    Platform: x86_64
    Version: Windows 10
    Host system: Linux
    Host version: 4.18.0-147.5.1.el8_1.x86_64

Can I do something to help?

Update: The same error can happen with only one, empty, SINE Player track.

osxmidi commented 4 years ago

It happens with Reaper as well.

I'll look into it, it could be due to Wine.

jens-r commented 4 years ago

New SINE Player version (1.0.2) just released: https://orchestraltools.helpscoutdocs.com/article/366-sine-player-changelog

Some of my test Ardour sessions work now. Others do not work. I'll test more later.

jens-r commented 4 years ago

Test with Ardour 5.12, SINE Player 1.0.2, Wine 5.4-staging and LinVst (latest from git):

One empty SINE Player track: I can open it every time.

Two empty SINE Player tracks: Crash.

osxmidi commented 4 years ago

It seems to be a Wine problem and/or a bug in the plugin.

Airwave gives the same results for the plugin, one plugin is ok, 2 plugins crash Airwave.

jens-r commented 4 years ago

Thanks for the help and thanks for LinVst! I'm pretty used to debugging in Windows and Linux (even in Wine). But with this problem, I don't even know where to start...

osxmidi commented 4 years ago

Wine can get some things wrong but there is also the case that Wine can get some things too right, and bugs in a Windows app might still result in it running ok on Windows but the bug causes problems with Wine.

Windows seems to have some workarounds for some common Windows apps bugs but Wine doesn't have all of those workarounds built in, so a bug might be ok with Windows but not with Wine.

For instance, the Waves plugins (and some other plugins) had a paint bug that would lock up Wine but the paint bug was ok on Windows.

Seeing that the programmers just test the Windows code using Windows, some bugs can get left in if it happens to work ok on Windows.

keybreak commented 4 years ago

@osxmidi Also, theoretically it is possible that it's purely plugin fault, same case as it was for anything made with SynthEdit prior to some really early version...

It had exactly same bug, where you can run single instance of same plugin perfectly fine, but in order to use multiple the only way was to rename .dll and load it separately for new instance :sweat_smile:

@jens-r I have noticed Version: Windows 10. can you please try to run it in Win 7 mode (which is generally recommended) and see if it helps?

Win 10 can be quite messy and introduce additional bugs with some Wine software.

jens-r commented 4 years ago

@keybreak Thanks for the suggestion. I'm going to use Windows 7 by default. Unfortunately, that didn't solve the problem with SINE Player. I've also tested with Wine 5.5-staging.

mattias-ohlsson commented 4 years ago

SINE Player works better with LinVst-X. This is my solution in CentOS 8 (I've only been testing for a few hours today):

yum install https://download.teknik.tv/pub/eldaw/eldaw-release-latest-8.noarch.rpm
yum install linvst-x ardour5 wine

Install SINE Player and copy .so file.

cp /usr/share/linvst-x/linvstx.so ".wine/drive_c/Program Files/VstPlugins/SINE Player.so"

Preload the LinVst-X server.

wine /usr/bin/lin-vst-server-x.exe.so

Start Ardour, add multiple SINE Player tracks, save session, open session...

Thanks so much, @osxmidi 👍 🌼