Hi!

I've succesfully compiled lmms with vst support on amd64.
I've added -m32 flag to wineg++, so it compiles 32bit code to wine and
all of the other parts of the software will be 64bit mode.

When I load a VSTi plugin (I've tried z3ta+, Vanguard), it loads sucessfully,
but when you push a button on the piano keyboard or you play a sound
in beat/bassline editor,
lvsl_server.exe crashes:

wine: Unhandled page fault on read access to 0x0000001c at address 0x7ed8c989 (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x0000001c in 32-bit code (0x7ed8c989).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7ed8c989 ESP:0034fdf0 EBP:0034fe48 EFLAGS:00010246(   - 00      -RIZP1)
 EAX:00000000 EBX:7ed901a0 ECX:7ed8e15e EDX:7c0b8960
 ESI:7c0b8940 EDI:7c0b89d4
Stack dump:
0x0034fdf0:  00000001 0034fe20 00000002 f7d7079b
0x0034fe00:  f7e2dff4 f7e2f120 7c0b8940 0034fe28
0x0034fe10:  f7d70cc7 f7e2f120 7c0b8940 00000000
0x0034fe20:  7c0b8940 7c0b8930 0034fe38 7ed26161
0x0034fe30:  7c0b8940 7ed52ff4 7ed8c87b 7ed901a0
0x0034fe40:  7c0b8940 7c0b8930 0034fed8 7ed8e16e
Backtrace:
=>1 0x7ed8c989 _ZN9VSTPlugin7processEv+0x119() in lvsl_server (0x0034fe48)
  2 0x7ed8e16e main+0x2fe() in lvsl_server (0x0034fed8)
  3 0x7ed8e66b in lvsl_server (+0xe66b) (0x0034ff08)
  4 0x7ee42d1c in kernel32 (+0x52d1c) (0x0034ffe8)
  5 0xf7e70157 wine_switch_to_stack+0x17() in libwine.so.1 (0x00000000)
0x7ed8c989 _ZN9VSTPlugin7processEv+0x119 in lvsl_server: movzbl 0x1c(%eax),%eax
Modules:
Module  Address                 Debug info      Name (83 modules)
PE      10000000-100f5000       Deferred        z3ta+
ELF     7bf00000-7bf03000       Deferred        <wine-loader>
ELF     7cd18000-7cd2c000       Deferred        winejoystick<elf>
  \-PE  7cd20000-7cd2c000       \               winejoystick
ELF     7ce3d000-7ce53000       Deferred        midimap<elf>
  \-PE  7ce40000-7ce53000       \               midimap
ELF     7ce53000-7ce79000       Deferred        msacm32<elf>
  \-PE  7ce60000-7ce79000       \               msacm32
ELF     7ce79000-7cf37000       Deferred        libasound.so.2
ELF     7cf37000-7cf6c000       Deferred        winealsa<elf>
  \-PE  7cf40000-7cf6c000       \               winealsa
ELF     7cf6c000-7cf9a000       Deferred        libcrypt.so.1
ELF     7cf9a000-7cfc8000       Deferred        libcups.so.2
ELF     7cfcf000-7cfe7000       Deferred        msacm32<elf>
  \-PE  7cfe0000-7cfe7000       \               msacm32
ELF     7d014000-7d033000       Deferred        iphlpapi<elf>
  \-PE  7d020000-7d033000       \               iphlpapi
ELF     7d033000-7d08a000       Deferred        rpcrt4<elf>
  \-PE  7d040000-7d08a000       \               rpcrt4
ELF     7d08a000-7d12c000       Deferred        ole32<elf>
  \-PE  7d0a0000-7d12c000       \               ole32
ELF     7d12c000-7d15f000       Deferred        uxtheme<elf>
  \-PE  7d130000-7d15f000       \               uxtheme
ELF     7d15f000-7d1ee000       Deferred        winmm<elf>
  \-PE  7d170000-7d1ee000       \               winmm
ELF     7d1ee000-7d222000       Deferred        winspool<elf>
  \-PE  7d200000-7d222000       \               winspool
ELF     7d222000-7d2c4000       Deferred        comdlg32<elf>
  \-PE  7d230000-7d2c4000       \               comdlg32
ELF     7d2c4000-7d394000       Deferred        comctl32<elf>
  \-PE  7d2d0000-7d394000       \               comctl32
ELF     7d394000-7d490000       Deferred        shell32<elf>
  \-PE  7d3a0000-7d490000       \               shell32
ELF     7d720000-7d77a000       Deferred        shlwapi<elf>
  \-PE  7d730000-7d77a000       \               shlwapi
ELF     7d77a000-7d783000       Deferred        libxcursor.so.1
ELF     7d789000-7d79b000       Deferred        libresolv.so.2
ELF     7d7a2000-7d7a5000       Deferred        libxinerama.so.1
ELF     7d7a7000-7d7c4000       Deferred        imm32<elf>
  \-PE  7d7b0000-7d7c4000       \               imm32
ELF     7dd77000-7e6e9000       Deferred        libglcore.so.1
ELF     7e6e9000-7e77d000       Deferred        libgl.so.1
ELF     7e77d000-7e868000       Deferred        libx11.so.6
ELF     7e868000-7e876000       Deferred        libxext.so.6
ELF     7e876000-7e88d000       Deferred        libice.so.6
ELF     7e890000-7e895000       Deferred        libxfixes.so.3
ELF     7e895000-7e899000       Deferred        iso8859-2.so
ELF     7e89a000-7e89e000       Deferred        libxrandr.so.2
ELF     7e89e000-7e8a6000       Deferred        libxrender.so.1
ELF     7e8ac000-7e94b000       Deferred        winex11<elf>
  \-PE  7e8c0000-7e94b000       \               winex11
ELF     7e96d000-7e98c000       Deferred        libexpat.so.0
ELF     7e98c000-7e9b6000       Deferred        libfontconfig.so.1
ELF     7e9b6000-7e9c8000       Deferred        libz.so.1
ELF     7e9c8000-7ea2d000       Deferred        libfreetype.so.6
ELF     7ea31000-7ea36000       Deferred        libxdmcp.so.6
ELF     7ea4c000-7eb96000       Deferred        user32<elf>
  \-PE  7ea70000-7eb96000       \               user32
ELF     7eb96000-7ebde000       Deferred        advapi32<elf>
  \-PE  7eba0000-7ebde000       \               advapi32
ELF     7ebde000-7ec78000       Deferred        gdi32<elf>
  \-PE  7ebf0000-7ec78000       \               gdi32
ELF     7ed5a000-7ed5f000       Deferred        libxxf86vm.so.1
ELF     7ed79000-7ed9a000       Export          lvsl_server<elf>
  \-PE  7ed80000-7ed9a000       \               lvsl_server
ELF     7edcd000-7eef9000       Export          kernel32<elf>
  \-PE  7edf0000-7eef9000       \               kernel32
ELF     7eef9000-7ef03000       Deferred        libnss_files.so.2
ELF     7ef03000-7ef0d000       Deferred        libnss_nis.so.2
ELF     7ef0d000-7ef23000       Deferred        libnsl.so.1
ELF     7ef23000-7ef48000       Deferred        libm.so.6
ELF     7ef49000-7ef4b000       Deferred        libnvidia-tls.so.1
ELF     7ef4b000-7ef54000       Deferred        libsm.so.6
ELF     7ef54000-7ef5e000       Deferred        libgcc_s.so.1
ELF     7ef67000-7f000000       Deferred        ntdll<elf>
  \-PE  7ef80000-7f000000       \               ntdll
ELF     f7d00000-f7d03000       Deferred        libxau.so.6
ELF     f7d08000-f7d0c000       Deferred        libdl.so.2
ELF     f7d0c000-f7e32000       Deferred        libc.so.6
ELF     f7e32000-f7e49000       Deferred        libpthread.so.0
ELF     f7e60000-f7e68000       Deferred        libnss_compat.so.2
ELF     f7e68000-f7f7a000       Export          libwine.so.1
ELF     f7f7b000-f7f97000       Deferred        ld-linux.so.2
Threads:
process  tid      prio (all id:s are in hex)
0000000a
        0000000b    0
00000008 (D) Z:\usr\local\lib\lmms\lvsl_server.exe
        0000000c    0
        00000009    0 <==


I think it might be a problem with variable sizes in the lvsl_client and it sends something wrong to
lvsl_server.

--
Dj Costhezz
djcosthezz@gmail.com