http://bugs.winehq.org/show_bug.cgi?id=35178
Bug ID: 35178 Summary: FL Studio 11.x 'DirectWave' plugin doesn't work (unsupported FSCTL_IS_VOLUME_MOUNTED ioctl) Product: Wine Version: 1.7.8 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Classification: Unclassified
Hello folks,
a user in #winehq reported this.
I was able to reproduce the problem with the demo version of FL 11 using the following recipe (quoting IRC log):
--- quote --- <alexmarkley> i am running into an issue with FL Studio 11 running on Linux under Wine 1.7.8 <alexmarkley> most everything appears to be working, but there are a couple of important software instrument plugins that fail to load any sounds ... <alexmarkley> focht: File -> New from template -> Minimal -> Basic with limiter <alexmarkley> focht: sub-window "Pattern 1", right click "Kick" -> Insert -> DirectWave <alexmarkley> focht: in the DirectWave window which appears, click the down arrow next to "Select Preset" <alexmarkley> focht: if you don't have any DirectWave presets, you can download a free one <alexmarkley> from within the GUI there <alexmarkley> anyway, once you select the preset you will see it loads the program, but clicking the piano keys results in no sound <alexmarkley> focht: you will also notice that, in the loaded program, each entry in the "Size" column is zero <alexmarkley> focht: which is bad... in native windows (running in VirtualBox) i see non-zero values for every one of those entries --- quote ---
Relevant part of trace log:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Image-Line/FL Studio 11
$ WINEDEBUG=+tid,+seh,+relay wine ./FL.exe >>log.txt 2>&1 ... 0024:Call KERNEL32.LoadLibraryW(006ec0fc L"C:\Program Files\Image-Line\FL Studio 11\Plugins\Fruity\Generators\DirectWave\DirectWave.dll") ret=00e4a66a 0024:Call PE DLL (proc=0xbe7eca6,module=0xbe20000 L"DirectWave.dll",reason=PROCESS_ATTACH,res=(nil)) ... 0024:Call KERNEL32.ExpandEnvironmentStringsA(02a447c8 "C:\Program Files\Image-Line\FL Studio 6\Data\Patches\Packs\SampleFusion\Orchestral\Strings\Mellotron_02\SYM_STR_C_2.wav",0033a07c,00000fff) ret=0be383ea 0024:Ret KERNEL32.ExpandEnvironmentStringsA() retval=00000078 ret=0be383ea ... 0024:Call KERNEL32.CreateFileA(0033ae28 "\\.\C:",80000000,00000007,00000000,00000003,00000000,00000000) ret=0be59e4d ... 0024:Ret KERNEL32.CreateFileA() retval=000001f0 ret=0be59e4d ... 0024:Call KERNEL32.DeviceIoControl(000001f0,00090028,00000000,00000000,00000000,00000000,0033ae24,00000000) ret=0be59e8e ... 0024:Ret KERNEL32.DeviceIoControl() retval=00000000 ret=0be59e8e ... 0024:Call KERNEL32.GetLastError() ret=0be59e98 0024:Ret KERNEL32.GetLastError() retval=00000032 ret=0be59e98 --- snip ---
The 'DirectWave' plugin library uses FSCTL_IS_VOLUME_MOUNTED ioctl to check if the specified volume is mounted before accessing each file (track).
Wine doesn't implement/stub that ioctl hence the failure, resulting in tracks listed with zero size (as reported).
MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364574%28v=vs.85%2...
--- quote --- FSCTL_IS_VOLUME_MOUNTED control code
Determines whether the specified volume is mounted, or if the specified file or directory is on a mounted volume.
To perform this operation, call the DeviceIoControl function with the following parameters.
BOOL DeviceIoControl( (HANDLE) hDevice, // handle to device FSCTL_IS_VOLUME_MOUNTED, // dwIoControlCode NULL, // lpInBuffer 0, // nInBufferSize NULL, // lpOutBuffer 0, // nOutBufferSize (LPDWORD) lpBytesReturned, // number of bytes returned (LPOVERLAPPED) lpOverlapped // OVERLAPPED structure );
...
Return value
If the volume is currently mounted, DeviceIoControl returns a nonzero value.
Otherwise, DeviceIoControl returns zero (0). To get extended error information, call GetLastError. Remarks
The NTFS file system treats a locked volume as a dismounted volume. Therefore, this call returns zero (0) after a volume is locked on the NTFS file system. --- quote ---
For quick test I short-circuited the ioctl handling on the client side (ntdll) like the existing FSCTL_LOCK_VOLUME and FSCTL_UNLOCK_VOLUME cases, returning 'success'. It made the plugin happy and the wav files were correctly loaded/processed. A more thorough solution is probably enhancing server/mountmgr.
Source: http://source.winehq.org/git/wine.git/blob/5ba7f79bad4f4832d98d0f2897aea6979...
--- snip --- 1495 NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, 1496 PVOID apc_context, PIO_STATUS_BLOCK io, ULONG code, 1497 PVOID in_buffer, ULONG in_size, PVOID out_buffer, ULONG out_size) 1498 { ... 1509 switch(code) 1510 { 1511 case FSCTL_DISMOUNT_VOLUME: ... 1517 case FSCTL_PIPE_PEEK: 1518 { ... 1590 case FSCTL_LOCK_VOLUME: 1591 case FSCTL_UNLOCK_VOLUME: 1592 FIXME("stub! return success - Unsupported fsctl %x (device=%x access=%x func=%x method=%x)\n", 1593 code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3); 1594 status = STATUS_SUCCESS; 1595 break; ... 1619 case FSCTL_PIPE_LISTEN: 1620 case FSCTL_PIPE_WAIT: 1621 default: 1622 status = server_ioctl_file( handle, event, apc, apc_context, io, code, 1623 in_buffer, in_size, out_buffer, out_size ); 1624 break; 1625 } 1626 1627 if (status != STATUS_PENDING) io->u.Status = status; 1628 return status; 1629 } --- snip ---
$ sha1sum flstudio_11.0.4.exe f9bdc2fb0b8d18ffce90e048b12a0c196d0b82d0 flstudio_11.0.4.exe
$ du -sh flstudio_11.0.4.exe 301M flstudio_11.0.4.exe
$ wine --version wine-1.7.8-278-g53dc001
Regards
http://bugs.winehq.org/show_bug.cgi?id=35178
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://downloads.image-line | |.com/flstudio/flstudio_11.0 | |.4.exe
http://bugs.winehq.org/show_bug.cgi?id=35178
Alex Markley alex@malexmedia.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alex@malexmedia.net
--- Comment #1 from Alex Markley alex@malexmedia.net --- Thanks a million to Focht for tracking this down! This bug is a showstopper for me, but I can confirm that Focht's patch solves the problem.
http://bugs.winehq.org/show_bug.cgi?id=35178
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=35178
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0dac887f48f2067f90c4556cb5b | |082345b0ad403 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/0dac887f48f2067f90c4556cb5b...
Thanks Austin
Regards
https://bugs.winehq.org/show_bug.cgi?id=35178
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.9.
https://bugs.winehq.org/show_bug.cgi?id=35178
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
https://bugs.winehq.org/show_bug.cgi?id=35178
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Removing 1.6.x milestone from bugs included in 1.6.2.
https://bugs.winehq.org/show_bug.cgi?id=35178
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |ntdll
https://bugs.winehq.org/show_bug.cgi?id=35178
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://downloads.image-line |https://web.archive.org/web |.com/flstudio/flstudio_11.0 |/20131208151255/http://demo |.4.exe |download.image-line.com/fls | |tudio/flstudio_11.0.4.exe