[Bug 48455] New: Native Instruments Native Access 1.9 installer hangs during installation of ISO Mounter driver (missing handling of architecture-specific SourceDisks{Names,Files} .inf sections)
https://bugs.winehq.org/show_bug.cgi?id=48455 Bug ID: 48455 Summary: Native Instruments Native Access 1.9 installer hangs during installation of ISO Mounter driver (missing handling of architecture-specific SourceDisks{Names,Files} .inf sections) Product: Wine Version: 5.0-rc5 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: setupapi Assignee: wine-bugs(a)winehq.org Reporter: focht(a)gmx.net Distribution: --- Hello folks, as it says. The driver sub-installer just hangs (churning cpu), blocking the main installer forever. Stable download link via Internet Archive: https://web.archive.org/web/20190227215247/https://www.native-instruments.co... --- snip --- $ wine ./Native\ Access\ 1.9.1\ Setup\ PC.exe ... --- snip --- Reduced case by calling driver sub-installer directly, after killing main installer: --- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Native Instruments/IsoDriver/x64 $ WINEDEBUG=+seh,+relay,+loaddll,+process,+setupapi wine ./NI-drvinst.exe instroot "root\NIWinCDEmu" "C:\Program Files (x86)\Native Instruments\IsoDriver\NIWinCDEmu.inf" >>log.txt 2>&1 ... 002d:trace:setupapi:SetupDiInstallDriverFiles devinfo 000000000011C1C0, device_data 000000000022F6C0. ... 002d:trace:setupapi:SetupOpenInfFileW L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver\\NIWinCDEmu.inf" -> 000000000011D990 ... 002d:trace:setupapi:SetupGetStringFieldW context 000000000011D990/000000000011D990/9/0 index 1 returning L"Drivers_Dir" ... 002d:trace:setupapi:SetupQueueCopySectionW queue 000000000011DDD0, src_root L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver", hinf 000000000011D990, hlist 000000000011D990, section L"Drivers_Dir", style 0x10000. ... 002d:trace:setupapi:SetupQueueCopyIndirectW root=L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver" path=(null) file=L"NIWinCDEmu.sys" -> dir=L"C:\\windows\\system32\\drivers" file=L"NIWinCDEmu.sys" descr=(null) tag=(null) ... 002d:trace:setupapi:SetupDefaultQueueCallbackW start copy L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver\\NIWinCDEmu.sys" -> L"C:\\windows\\system32\\drivers\\NIWinCDEmu.sys" ... 002d:trace:setupapi:queue_copy_file copying file L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver\\NIWinCDEmu.sys" -> L"C:\\windows\\system32\\drivers\\NIWinCDEmu.sys" ... 002d:trace:setupapi:do_file_copyW copy L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver\\NIWinCDEmu.sys" to L"C:\\windows\\system32\\drivers\\NIWinCDEmu.sys" style 0x10000 002d:Call KERNEL32.GetFileAttributesW(006fd540 L"C:\\windows\\system32\\drivers\\NIWinCDEmu.sys") ret=00259e09 ... 002d:Ret KERNEL32.GetFileAttributesW() retval=ffffffff ret=00259e09 002d:Call KERNEL32.CopyFileW(006fd4a0 L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver\\NIWinCDEmu.sys",006fd540 L"C:\\windows\\system32\\drivers\\NIWinCDEmu.sys",00000000) ret=0025a064 .... 002d:Call ntdll.NtCreateFile(0022e100,80100080,0022e128,0022e118,00000000,00000000,00000007,00000001,00000060,00000000,00000000) ret=7b0110a1 002d:Ret ntdll.NtCreateFile() retval=c0000034 ret=7b0110a1 002d:Call ntdll.RtlNtStatusToDosError(c0000034) ret=7b011190 002d:Ret ntdll.RtlNtStatusToDosError() retval=00000002 ret=7b011190 ... 002d:Ret KERNEL32.CopyFileW() retval=00000000 ret=0025a064 002d:warn:setupapi:do_file_copyW failed to copy, err 2 ... <repeats endlessly> ... 002d:trace:setupapi:SetupDefaultQueueCallbackW need media L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver" L"NIWinCDEmu.sys" ... 002d:trace:setupapi:SetupDefaultQueueCallbackW start copy L"C:\\Program Files (x86)\\Native Instruments\\IsoDriver\\NIWinCDEmu.sys" -> L"C:\\windows\\system32\\drivers\\NIWinCDEmu.sys" ... --- snip --- Content of 'NIWinCDEmu.inf': --- snip --- [Version] Signature="$WINDOWS NT$" Class=SCSIAdapter ClassGuid={4d36e97b-e325-11ce-bfc1-08002be10318} Provider=%NI_MFNAME% DriverVer= 08/05/2011, 1.0.0.2 CatalogFile=NIWinCDEmu.cat [DestinationDirs] DefaultDestDir = 12 [SourceDisksNames.x86] 1 = %DiskId1%,,, [SourceDisksNames.amd64] 1 = %DiskId1%,,, [SourceDisksFiles.x86] NIWinCDEmu.sys = 1,\x86 [SourceDisksFiles.amd64] NIWinCDEmu.sys = 1,\x64 [Manufacturer] %NI_MFNAME%=Standard, NTamd64 [Standard] %NIWinCDEmu.DeviceDesc%=NIWinCDEmu_Device, root\NIWinCDEmu [Standard.NTamd64] %NIWinCDEmu.DeviceDesc%=NIWinCDEmu_Device, root\NIWinCDEmu [NIWinCDEmu_Device.NT] CopyFiles=Drivers_Dir [Drivers_Dir] NIWinCDEmu.sys,,,2 ;-------------- Service installation [NIWinCDEmu_Device.NT.Services] AddService = NIWinCDEmu,%SPSVCINST_ASSOCSERVICE%, dev_Service_Inst ; -------------- busenum driver install sections [dev_Service_Inst] DisplayName = %dev.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\NIWinCDEmu.sys LoadOrderGroup = Extended Base [Strings] SPSVCINST_ASSOCSERVICE= 0x00000002 NI_MFNAME = "Native Instruments GmbH" DiskId1 = "ISO Mounter Installation Disk #1" NIWinCDEmu.DeviceDesc = "ISO Mounter" dev.SVCDESC = "ISO Mounter driver" --- snip --- The problem here is that Wine's 'get_source_info' doesn't take architecture-specific 'SourceDisksNames' and 'SourceDisksFiles' .inf sections into account. Wine source: https://source.winehq.org/git/wine.git/blob/b3abc343c373ee5fd0764a3ceedeef52... --- snip --- 289 static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARAMS_W *params, 290 WCHAR *src_root, WCHAR *src_path) 291 { 292 static const WCHAR SourceDisksNames[] = 293 {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s',0}; 294 static const WCHAR SourceDisksFiles[] = 295 {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s',0}; 296 297 INFCONTEXT file_ctx, disk_ctx; 298 INT id, diskid; 299 DWORD len; 300 301 /* find the SourceDisksFiles entry */ 302 if (!SetupFindFirstLineW( hinf, SourceDisksFiles, src_file, &file_ctx )) return; 303 if (!SetupGetIntField( &file_ctx, 1, &diskid )) return; 304 305 /* now find the diskid in the SourceDisksNames section */ 306 if (!SetupFindFirstLineW( hinf, SourceDisksNames, NULL, &disk_ctx )) return; 307 for (;;) 308 { 309 if (SetupGetIntField( &disk_ctx, 0, &id ) && (id == diskid)) break; 310 if (!SetupFindNextLine( &disk_ctx, &disk_ctx )) return; 311 } 312 313 if (SetupGetStringFieldW( &disk_ctx, 1, NULL, 0, &len ) && len > sizeof(WCHAR) 314 && (params->SourceDescription = heap_alloc( len * sizeof(WCHAR) ))) 315 SetupGetStringFieldW( &disk_ctx, 1, (WCHAR *)params->SourceDescription, len, NULL ); 316 317 if (SetupGetStringFieldW( &disk_ctx, 2, NULL, 0, &len ) && len > sizeof(WCHAR) 318 && (params->SourceTagfile = heap_alloc( len * sizeof(WCHAR) ))) 319 SetupGetStringFieldW( &disk_ctx, 2, (WCHAR *)params->SourceTagfile, len, NULL ); 320 321 if (SetupGetStringFieldW( &disk_ctx, 4, NULL, 0, &len ) && len > sizeof(WCHAR) 322 && len < MAX_PATH - lstrlenW( src_root ) - 1) 323 { 324 lstrcatW( src_root, backslashW ); 325 SetupGetStringFieldW( &disk_ctx, 4, src_root + lstrlenW( src_root ), 326 MAX_PATH - lstrlenW( src_root ), NULL ); 327 } 328 329 if (SetupGetStringFieldW( &file_ctx, 2, NULL, 0, &len ) && len > sizeof(WCHAR) && len < MAX_PATH) 330 { 331 SetupGetStringFieldW( &file_ctx, 2, src_path, MAX_PATH, NULL ); 332 params->SourcePath = src_path; 333 } 334 } --- snip --- Microsoft docs: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/inf-source... --- quote ---- ... To support distribution of driver files on multiple system architectures, you can specify an architecture-specific SourceDisksFiles section by adding an .x86, .ia64, .amd64, .arm, or .arm64 extension to SourceDisksFiles. Be aware that, unlike other sections such as a DDInstall section, the platform extensions for a SourceDisksFiles section are not .ntx86, .ntia64, or .ntamd64. For example, to specify a source disk names section for an x86-based system, use a SourceDisksFiles.x86 section, not a SourceDisksFiles.ntx86 section. Similarly, use a SourceDisksFiles.ia64 section to specify an Itanium-based system and a SourceDisksFiles.amd64 section to specify an x64-based system. During installation, SetupAPI functions look for architecture-specific SourceDisksFiles sections before using the generic section. For example, if, during installation on an x86-based platform, Windows is copying a file that is named driver.sys, it will look for the file's description in [SourceDisksFiles.x86] before looking in [SourceDisksFiles]. --- quote ---- In contrast, 'get_source_id' does it properly: https://source.winehq.org/git/wine.git/blob/f1b94dc16c35a5c477b6df8aa94c6d35... --- snip --- 372 static LPWSTR get_source_id( HINF hinf, PINFCONTEXT context, PCWSTR filename ) 373 { 374 DWORD size; 375 LPWSTR source_id; 376 377 if (!SetupFindFirstLineW( hinf, source_disks_files_platform, filename, context ) && 378 !SetupFindFirstLineW( hinf, source_disks_files, filename, context )) 379 return NULL; 380 381 if (!SetupGetStringFieldW( context, 1, NULL, 0, &size )) 382 return NULL; 383 384 if (!(source_id = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) 385 return NULL; 386 387 if (!SetupGetStringFieldW( context, 1, source_id, size, NULL )) 388 { 389 HeapFree( GetProcessHeap(), 0, source_id ); 390 return NULL; 391 } 392 393 if (!SetupFindFirstLineW( hinf, source_disks_names_platform, source_id, context ) && 394 !SetupFindFirstLineW( hinf, source_disks_names, source_id, context )) 395 { 396 HeapFree( GetProcessHeap(), 0, source_id ); 397 return NULL; 398 } 399 return source_id; 400 } --- snip --- $ sha1sum Native* 374f62fb373ceb02527b8a179c7e305268bab25c Native Access 1.9.1 Setup PC.exe 5a78d5850267d0ef6701bc5da7dc25e5b62b6031 Native_Access_Installer.zip $ du -sh Native* 70M Native Access 1.9.1 Setup PC.exe 69M Native_Access_Installer.zip $ wine --version wine-5.0-rc5 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer URL| |https://web.archive.org/web | |/20190227215247/https://www | |.native-instruments.com/fil | |eadmin/downloads/Native_Acc | |ess_Installer.zip -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Native Instruments Native |Multiple .inf driver |Access 1.9 installer hangs |installers hang due to |during installation of ISO |missing handling of |Mounter driver (missing |architecture-specific |handling of |SourceDisks{Names,Files} |architecture-specific |.inf sections (Native |SourceDisks{Names,Files} |Instruments Native Access |.inf sections) |1.9, WinCDEmu 4.1) --- Comment #1 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, refining summary to collect more installers here. Another one: 'WinCDEmu' (http://wincdemu.sysprogs.org/) https://github.com/sysprogs/WinCDEmu/releases/download/v4.1/WinCDEmu-4.1.exe 'BazisVirtualCDBus.inf': --- snip --- [Version] Signature="$WINDOWS NT$" Class=SCSIAdapter ClassGuid={4d36e97b-e325-11ce-bfc1-08002be10318} Provider=%BAZIS% DriverVer=06/02/2015, 4.01.0001 CatalogFile=BazisVirtualCDBus.cat [DestinationDirs] DefaultDestDir = 12 [SourceDisksNames.x86] 1 = %DiskId1%,,, [SourceDisksNames.amd64] 1 = %DiskId1%,,, [SourceDisksFiles.x86] BazisVirtualCDBus.sys = 1,\x86 [SourceDisksFiles.amd64] BazisVirtualCDBus.sys = 1,\x64 [Manufacturer] %BAZIS%=Standard, NTamd64 [Standard] %BazisVirtualCDBus.DeviceDesc%=BazisVirtualCDBus_Device, root\BazisVirtualCDBus [Standard.NTamd64] %BazisVirtualCDBus.DeviceDesc%=BazisVirtualCDBus_Device, root\BazisVirtualCDBus [BazisVirtualCDBus_Device.NT] CopyFiles=Drivers_Dir [Drivers_Dir] BazisVirtualCDBus.sys,,,2 ;-------------- Service installation [BazisVirtualCDBus_Device.NT.Services] AddService = BazisVirtualCDBus,%SPSVCINST_ASSOCSERVICE%, dev_Service_Inst ; -------------- busenum driver install sections [dev_Service_Inst] DisplayName = %dev.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\BazisVirtualCDBus.sys LoadOrderGroup = Extended Base [Strings] SPSVCINST_ASSOCSERVICE= 0x00000002 BAZIS = "SysProgs.org" DiskId1 = "WinCDEmu installation directory" BazisVirtualCDBus.DeviceDesc = "WinCDEmu Virtual Bus" dev.SVCDESC = "WinCDEmu Virtual Bus Driver" --- snip --- $ sha1sum WinCDEmu-4.1.exe 9ff4f2ed41d5bd09496d2cfb6e09c4b31659dc19 WinCDEmu-4.1.exe $ du -sh WinCDEmu-4.1.exe 1.6M WinCDEmu-4.1.exe $ wine --version wine-5.0-rc5 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 --- Comment #2 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- Created attachment 66268 --> https://bugs.winehq.org/attachment.cgi?id=66268 patch Thanks for the analysis Focht! Something like this seems to at least make it install (tested NA). -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 --- Comment #3 from Anastasius Focht <focht(a)gmx.net> --- Hello Gijs, it works for me as well. Any news on getting this in? I've encountered this issue again when checking other bug reports. I have a local branch with a rebased version due to recent changes (https://source.winehq.org/git/wine.git/commitdiff/32a2cde6c187ac3805303929a1...). I don't want to keep gazillions of (stacked) branches for re-testing other (unrelated) issues. --- snip --- $ find .wine -iname NIWinCDEmu.sys .wine/drive_c/windows/system32/drivers/NIWinCDEmu.sys .wine/drive_c/Program Files (x86)/Native Instruments/IsoDriver/x64/NIWinCDEmu.sys .wine/drive_c/Program Files (x86)/Native Instruments/IsoDriver/x86/NIWinCDEmu.sys .wine/drive_c/users/focht/Temp/miad136.tmp/data/OFFLINE/3017C53A/E448712F/NIWinCDEmu.sys .wine/drive_c/users/focht/Temp/miad136.tmp/data/OFFLINE/3017C53A/2E183588/NIWinCDEmu.sys .wine/drive_c/users/focht/Temp/miad136.tmp/data/OFFLINE/E1FC01CC/E448712F/NIWinCDEmu.sys .wine/drive_c/users/focht/Temp/miad136.tmp/data/OFFLINE/E1FC01CC/2E183588/NIWinCDEmu.sys $ file .wine/drive_c/windows/system32/drivers/NIWinCDEmu.sys .wine/drive_c/windows/system32/drivers/NIWinCDEmu.sys: PE32+ executable (native) x86-64, for MS Windows --- snip --- $ wine --version wine-5.3 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |taylorcompositor(a)gmail.com --- Comment #4 from Zebediah Figura <z.figura12(a)gmail.com> --- *** Bug 49466 has been marked as a duplicate of this bug. *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 prg(a)xannode.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |prg(a)xannode.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 --- Comment #5 from prg(a)xannode.com --- This bug also affects the latest stable version of Native Access, version 1.12.1. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 --- Comment #6 from prg(a)xannode.com --- I think my previous comment about this bug affecting Native Access can be disregarded. I was able to get the installer to work with a fresh wineprefix. Sorry for the noise! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #7 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, revisiting, still present. Adding 'patch' keyword. Tidbit: Few files of 'setupapi' component have undergone wide-char conversion. $ wine --version wine-6.0-rc6 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |778faf7562701bbab497e7f12d0 | |09fa9ed1f0e45 Status|NEW |RESOLVED CC| |z.figura12(a)gmail.com Resolution|--- |FIXED --- Comment #8 from Zeb Figura <z.figura12(a)gmail.com> --- Fixed upstream by 778faf7562701bbab497e7f12d009fa9ed1f0e45. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Andrew Nguyen <arethusa26(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |user.pecheniok(a)gmail.com --- Comment #9 from Andrew Nguyen <arethusa26(a)gmail.com> --- *** Bug 56005 has been marked as a duplicate of this bug. *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=48455 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 9.14. -- 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.
participants (1)
-
WineHQ Bugzilla