WineHQ
Bug Tracking Database – Bug 23934

 Bugzilla

 

Last modified: 2015-09-29 05:35:46 CDT  

Stronghold Kingdoms: loops after update (CreateProcess does not prioritize the working directory over the system search path)

Bug 23934 - Stronghold Kingdoms: loops after update (CreateProcess does not prioritize the working directory over the system search path)
Stronghold Kingdoms: loops after update (CreateProcess does not prioritize th...
Status: STAGED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: kernel32
1.3.0
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://appdb.winehq.org/objectManager...
: patch
Depends on:
Blocks: 35420
  Show dependency tree
 
Reported: 2010-08-07 04:15 CDT by Pavel Prochazka
Modified: 2015-09-29 05:35 CDT (History)
14 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset: https://github.com/wine-compholio/wine-staging/tree/master/patches/kernel32-NeedCurrentDirectoryForExePath


Attachments
behavior with dotnet20 and after update stronghold kingdoms' data (2.56 KB, text/plain)
2010-08-07 04:17 CDT, Pavel Prochazka
Details
shell32: Avoid searching the parent process location when the directory is specified. (2.40 KB, patch)
2010-08-08 09:47 CDT, Andrew Nguyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Prochazka 2010-08-07 04:15:29 CDT
Update process is written in C# and with some .NET components, so the dotnet20 must be installed with winetricks. First time when application downloads data from server all seems well - everythning is downloaded correctly. But when it checks again the game is getting into infinite loop. See the attachment.
Comment 1 Pavel Prochazka 2010-08-07 04:17:44 CDT
Created attachment 30044 [details]
behavior with dotnet20 and after update stronghold kingdoms' data
Comment 2 Andrew Nguyen 2010-08-08 09:47:00 CDT
Created attachment 30052 [details]
shell32: Avoid searching the parent process location when the directory is specified.

Does this patch help? It requires unit tests and is probably not completely correct, but it does resolve the launcher looping issue.
Comment 3 Pavel Prochazka 2010-08-08 16:48:50 CDT
Thanks your patch fixes this problem.
Comment 4 Andrea Lazzarotto 2010-12-25 03:57:52 CST
This bug affects me too and I confirm the patch works. Somebody should really change this from unconfirmed to new!
Comment 5 Wylda 2010-12-25 08:07:37 CST
Confirmed per comment #4.
Comment 6 Frédéric Delanoy 2011-10-25 03:18:07 CDT
(In reply to comment #2)
> Created attachment 30052 [details]
> shell32: Avoid searching the parent process location when the directory is
> specified.
> 
> Does this patch help? It requires unit tests and is probably not completely
> correct, but it does resolve the launcher looping issue.

You might want to rebase/send your patch to wine-patches so it can be merged.
See http://wiki.winehq.org/SubmittingPatches for instructions.
Comment 7 frankster 2012-03-14 01:44:40 CDT
this patch solved the looping problem for me with the beta version of stronghold kingdoms on steam (though there are still other fundamental problems running the game later in the launch process)
Comment 8 NickNill 2012-08-19 13:30:12 CDT
please, someone add this patch to wine-patches to merge it in main codebase
Comment 9 Paul The Tall 2012-11-17 03:00:33 CST
Issue is still here in 1.5.16, anyone able to fix it in the main code?
Comment 10 Frédéric Delanoy 2013-06-09 10:56:53 CDT
Is this still an issue with recent wine (1.6-rc1 or later)?
Comment 11 mrboese 2013-07-05 11:02:58 CDT
(In reply to comment #10)
> Is this still an issue with recent wine (1.6-rc1 or later)?

Stronghold Kingdoms shows the same behaviour on 1.6-rc1 (and rc2) (Kubuntu 13.04), but I found a way to skip the updater:

The updater downloads the real application to .../ApplicationData/Firefly/Stronghold Kingdoms.

Usually you can't start StrongholdKingdoms.exe (It checks some parameters)

By using ILSpy, I found the startup parameters:

StrongholdKingdoms.exe -InstallerVersion 116 de

Note: 116 will change on next Stronghold Kingdoms update, so you have to look at the public static int CurrentInstallerBuild = 116; attribute in class Kingdoms.Program
Comment 12 mrboese 2013-07-05 11:03:40 CDT
(In reply to comment #11)
> (In reply to comment #10)
> > Is this still an issue with recent wine (1.6-rc1 or later)?
> 
> Stronghold Kingdoms shows the same behaviour on 1.6-rc1 (and rc2) (Kubuntu
> 13.04), but I found a way to skip the updater:
> 
> The updater downloads the real application to
> .../ApplicationData/Firefly/Stronghold Kingdoms.
> 
> Usually you can't start StrongholdKingdoms.exe (It checks some parameters)
> 
> By using ILSpy, I found the startup parameters:
> 
> StrongholdKingdoms.exe -InstallerVersion 116 de
> 
> Note: 116 will change on next Stronghold Kingdoms update, so you have to look
> at the public static int CurrentInstallerBuild = 116; attribute in class
> Kingdoms.Program

Addition: Change de to en ... etc (Your language)
Comment 13 Ian 2013-10-27 20:02:40 CDT
Bug is still present under 1.7.4, tested with steam version
Comment 14 Erich E. Hoover 2015-01-22 12:49:34 CST
I took a look into this issue and I'm not confident that the currently proposed patch is correct, digging into it I believe that it has to do with CreateProcess's priority for different folders:
https://github.com/wine-compholio/wine-staging/tree/master/patches/kernel32-NeedCurrentDirectoryForExePath


Hosted By CodeWeavers