http://bugs.winehq.org/show_bug.cgi?id=12116
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |msi Summary|Progress bar does not |Multiple MSI-based |appear during installation |installers fail to advance | |progress bar in | |InstallFiles action | |(schedule_install_files | |already moves and clamps to | |max value + MSI integer | |overflow)
--- Comment #25 from Anastasius Focht focht@gmx.net 2011-06-16 10:20:43 CDT --- Hello,
the "Need for Speed: Underground" installer also suffers from this.
WINEDEBUG=+tid,+seh,+loaddll,+process,+msi wine /media/NFSUndercover/EASetup.exe
I added additional diagnostics - the internal progress bar control "max" and "current" values (float type) to the progress trace message to show the problem:
Initial setting of progress:
--- snip --- ... 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 800 L"1: 0 2: -1782320276 3: 0 4: 0 " 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"SetProgress" 0023:trace:msi:msi_dialog_handle_event progress: func 0, val 2512647020, pbar max 100.000000, pbar cur 0.000000 0023:trace:msi:msi_dialog_handle_event progress: func 0, val 2512647020, pbar max 2512646912.000000, pbar cur 0.000000 0023:trace:msi:msiobj_release object 0x638260 destroyed 0023:trace:msi:MSIDialog_WndProc 0x0084 0023:trace:msi:MSIDialog_WndProc 0x0020 0023:trace:msi:MSIDialog_WndProc 0x0200 0023:trace:msi:ACTION_InstallValidate Feature: L"MainGameFeature" Installed 2 Request 3 Action 3 0023:trace:msi:ACTION_InstallValidate Feature: L"MainApplicationFeature" Installed 2 Request 3 Action 3 0023:trace:msi:ACTION_InstallValidate Feature: L"InstallPb" Installed 2 Request 3 Action 3 0023:trace:msi:MSI_ProcessMessage 4000000 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 10 L"Action ended 16:36:05: InstallValidate. Return value 0." ... --- snip ---
First problem: MSI Integer overflow, use a datatype that can handle large values (possibly 64 bit). The accumulated size of all files is ~6.8 GiB.
At this point, the first part of "InstallFiles" action starts: determining install state and resolving target paths -> schedule_install_files
--- snip --- ... 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 10 L"Action start 16:36:05: InstallFiles." 0023:trace:msi:msiobj_release object 0x640c50 destroyed 0023:trace:msi:MSI_ProcessMessage a000000 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 800 L"1: 1 2: 1 3: 0 4: 0 " 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"SetProgress" 0023:trace:msi:msi_dialog_handle_event progress: func 1, val 1, pbar max 2512646912.000000, pbar cur 0.000000 0023:trace:msi:msi_dialog_handle_event progress: func 1, val 1, pbar max 2512646912.000000, pbar cur 0.000000 0023:trace:msi:msiobj_release object 0x171ba8 destroyed 0023:trace:msi:calculate_install_state file L"pbag" is missing 0023:trace:msi:MSI_ProcessMessage a000000 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 800 L"1: 2 2: 57344 3: 0 4: 0 " 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"SetProgress" 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 57344, pbar max 2512646912.000000, pbar cur 0.000000 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 57344, pbar max 2512646912.000000, pbar cur 57344.000000 0023:trace:msi:msiobj_release object 0x171ba8 destroyed 0023:trace:msi:calculate_install_state file L"pbcl" is missing ... 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 800 L"1: 2 2: 77548712 3: 0 4: 0 " 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"SetProgress" 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 77548712, pbar max 2512646912.000000, pbar cur 2479472640.000000 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 77548712, pbar max 2512646912.000000, pbar cur 2512646912.000000 0023:trace:msi:msiobj_release object 0x171ba8 destroyed 0023:trace:msi:calculate_install_state file L"MOVIESStorey_02_english_ntsc_vp6" is missing 0023:trace:msi:MSI_ProcessMessage a000000 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 800 L"1: 2 2: 6106332 3: 0 4: 0 " 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"SetProgress" 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 6106332, pbar max 2512646912.000000, pbar cur 2512646912.000000 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 6106332, pbar max 2512646912.000000, pbar cur 2512646912.000000 0023:trace:msi:msiobj_release object 0x171ba8 destroyed 0023:trace:msi:calculate_install_state file L"MOVIESStorey_03_english_ntsc_vp6" is missing ... --- snip ---
Note how the progress indicator already moved in this phase (nothing was extracted/copied yet). Worse, due to integer overflow the progress value stays clamped.
After the install state is determined and all the target paths are resolved, the real extraction/copying of files starts:
--- snip --- ... 0023:trace:msi:ACTION_InstallFiles copying L"Z:\media\NFSUndercover\PB\pbag.dll" to L"C:\Program Files\EA Games\Need for Speed Undercover\PB\pbag.dll" 0023:trace:msi:MSI_DatabaseOpenViewW L"SELECT * FROM `ActionText` WHERE `Action` = 'InstallFiles'" 0x33ef88 0023:trace:msi:MSI_ParseSQL Parse returned 0 0023:trace:msi:MSI_ViewExecute 0x640db0 (nil) 0023:trace:msi:MSI_ViewFetch 0x640db0 0x33ef8c 0023:trace:msi:msi_view_get_row 0x133468 0x641558 0 0x33ef8c 0023:trace:msi:MSI_ViewClose 0x640db0 0023:trace:msi:msiobj_release object 0x640db0 destroyed 0023:trace:msi:msiobj_release object 0x641598 destroyed 0023:trace:msi:MSI_FormatRecordW 0x14ac58 0x6412e0 0x33efc8 0x33f7c8 0023:trace:msi:MSI_FormatRecordW (L"Datei: [1], Verzeichnis: [9], Gr\00f6\00dfe: [6]") 0023:trace:msi:MSI_ProcessMessage 9000000 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 200 L"Datei: pbag.dll, Verzeichnis: PBFolder, Gr\00f6\00dfe: 57344" 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"ActionData" 0023:trace:msi:msiobj_release object 0x16f958 destroyed 0023:trace:msi:msiobj_release object 0x6412e0 destroyed 0023:trace:msi:MSI_ProcessMessage a000000 0023:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 800 L"1: 2 2: 57344 3: 0 4: 0 " 0023:trace:msi:ControlEvent_FireSubscribedEvent Firing Event L"SetProgress" 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 57344, pbar max 2512646912.000000, pbar cur 2512646912.000000 0023:trace:msi:msi_dialog_handle_event progress: func 2, val 57344, pbar max 2512646912.000000, pbar cur 2512646912.000000 0023:trace:msi:msiobj_release object 0x16f958 destroyed ... --- snip ---
Because the progress bar is already clamped from the first phase of "InstallFiles" action, nothing happens.
Code:
http://source.winehq.org/git/wine.git/blob/1ae309f98194f56b3734943cd63d8a798...
If you really want to track both phases with progress bar you need to reset the bar and (re)set max value again.
---
As sidestory, I found an example code snippet, demonstrating progress message handling using "MsiSetExternalUI":
MSDN: http://msdn.microsoft.com/en-us/library/aa368786.aspx
This could be useful for improving msi_dialog_handle_event a bit, for instance handling action info and direction.
Maybe