[Bug 35178] New: FL Studio 11.x 'DirectWave' plugin doesn't work (unsupported FSCTL_IS_VOLUME_MOUNTED ioctl)

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Dec 19 14:25:29 CST 2013


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 at winehq.org
          Reporter: focht at 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%29.aspx

--- 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/5ba7f79bad4f4832d98d0f2897aea6979a5740a9:/dlls/ntdll/file.c#l1495

--- 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

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list