http://bugs.winehq.org/show_bug.cgi?id=16543
Summary: PopCap: FATAL ERROR: Invalid command line parameter Product: Wine Version: 1.1.10 Platform: PC URL: http://appdb.winehq.org/objectManager.php?sClass=version &iId=13115 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P3 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: kennybobs@o2.co.uk
Created an attachment (id=18008) --> (http://bugs.winehq.org/attachment.cgi?id=18008) Screenshot
This is an odd one.
Some PopCap games will not load (see the screenshot).
The .exe file to start the games extracts another .exe usually named popcapgame1.exe. The original .exe should load the second, but a FATAL ERROR occurs and exits.
Running popcapgame1.exe directly works fine.
This worked fine for me under Ubuntu Hardy, currently running Ubuntu Intrepid and works fine under Windows XP. The initial .exe has been changed since I was running Hardy, however.
Have tried with wine versions 1.0.0, 0.9.57 and 0.9.51 to confirm this is not a regression.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #1 from Ken Sharp kennybobs@o2.co.uk 2008-12-17 03:50:19 --- Created an attachment (id=18009) --> (http://bugs.winehq.org/attachment.cgi?id=18009) Terminal output 1.1.10
http://bugs.winehq.org/show_bug.cgi?id=16543
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2008-12-17 06:35:45 --- http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
http://bugs.winehq.org/show_bug.cgi?id=16543
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #3 from Ken Sharp kennybobs@o2.co.uk 2008-12-17 07:39:16 --- (In reply to comment #2)
Indeed.
http://bugs.winehq.org/show_bug.cgi?id=16543
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2008-12-17 09:14:04 --- Looks like .net app. Did you install dotnet? No this is normal. Multiple versions of the same program are not "wide range of applications".
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #5 from Ken Sharp kennybobs@o2.co.uk 2008-12-17 10:32:01 --- (In reply to comment #4)
Looks like .net app. Did you install dotnet?
No I didn't, but I have just tried .net 1.1 and 2.0 and nothing changed.
No this is normal. Multiple versions of the same program are not "wide range of applications".
I believe you, simple mistake.
http://bugs.winehq.org/show_bug.cgi?id=16543
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #6 from Dan Kegel dank@kegel.com 2008-12-17 11:16:22 --- Turns out you can play the game by just running that inner exe directly with no commandline arguments.
It would be interesting to see what arguments the outer exe invokes the inner exe with on Windows.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #7 from Ken Sharp kennybobs@o2.co.uk 2008-12-17 11:26:57 --- Indeed you can run the inner exe directly, this gets around the "copy protection" also which is why I have not put it in the appdb as a workaround.
http://bugs.winehq.org/show_bug.cgi?id=16543
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #8 from Anastasius Focht focht@gmx.net 2008-12-22 05:47:16 --- Hello,
I downloaded multiple games from http://www.popcap.com/allgames.php and can't reproduce any of the problems here.
The games don't require .NET Framework at all - what makes you think they do?
State *exactly* which game, downloaded location and steps to reproduce this bug. Otherwise close this bug.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #9 from Vitaliy Margolen vitaliy@kievinfo.com 2008-12-22 08:47:42 --- (In reply to comment #8)
The games don't require .NET Framework at all - what makes you think they do?
Good question. Not sure why I thought it was a .net app.
http://bugs.winehq.org/show_bug.cgi?id=16543
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #10 from Dan Kegel dank@kegel.com 2008-12-22 09:58:33 --- I'm still seeing the problem with Bookworm Adventure, the game linked to in the URL above. Confirming.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #11 from Ken Sharp kennybobs@o2.co.uk 2008-12-22 13:14:12 --- (In reply to comment #8)
State *exactly* which game, downloaded location and steps to reproduce this bug.
http://appdb.winehq.org/viewbugs.php?bug_id=16543
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #12 from Anastasius Focht focht@gmx.net 2008-12-22 14:29:34 --- Hello,
-- quote --- http://appdb.winehq.org/viewbugs.php?bug_id=16543 -- quote ---
Ok, I get it now. I downloaded the game setup files using "free trial" links directly from their official website.
Interestingly their official website they don't link to those in appdb. Maybe they redesigned it and the files/packages referenced in appdb are most likely leftovers from earlier versions.
Example game bookworm:
Appdb links:
http://downloads.popcap.com/www/popcap_downloads/BWASetup.exe http://downloads.popcap.com/www/popcap_downloads/BookwormSetup.exe
Offical link (1.13):
http://downloads.popcap.com/www/popcap_downloads/BookwormSetup-en.exe
From a quick glance, this looks like another heap abuse.
I've dissected some heap abuses in other bug reports, unfortunately they are time consuming to analyze properly.
The command line is not supposed to contain anything other than "popcapgame1.exe" with full path to temporarily extracted executable. Windows tolerates much app brain damage, hence the app bug probably doesn't unearth there.
In the newer version I downloaded the problem is fixed. The command line for CreateProcess() call is properly built.
Actually I don't feel obliged to waste time on now obsolete buggy app versions.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #13 from Ken Sharp kennybobs@o2.co.uk 2008-12-23 21:28:03 --- (In reply to comment #12)
Interestingly their official website they don't link to those in appdb.
Yes they do.
Maybe they redesigned it and the files/packages referenced in appdb are most likely leftovers from earlier versions.
Not when I go there they are not.
Example game bookworm:
Appdb links:
http://downloads.popcap.com/www/popcap_downloads/BWASetup.exe http://downloads.popcap.com/www/popcap_downloads/BookwormSetup.exe
These are the official links from the official sites.
http://www.popcap.com/games/bookworm http://www.popcap.com/games/bookwormadventures
The links provided are exactly the same as going in from the "web" side. http://www.popcap.com/games/free/bookworm
Offical link (1.13):
http://downloads.popcap.com/www/popcap_downloads/BookwormSetup-en.exe
I don't know where that comes from but it is clearly a valid link also, and it is the same version as the direct links in the appdb. What browser are you using? I got the same result using Firefox, Opera and IE.
In the newer version I downloaded the problem is fixed.
There is no newer version.
Actually I don't feel obliged to waste time on now obsolete buggy app versions.
The links in the appdb are the current, up-to-date versions of these apps. I would not have bothered opening a bug report for obsolete apps.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #14 from Ken Sharp kennybobs@o2.co.uk 2009-02-06 15:59:39 --- Error still exists in latest git wine-1.1.14-248-gcb57ebc
http://bugs.winehq.org/show_bug.cgi?id=16543
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #15 from Anastasius Focht focht@gmx.net 2009-04-13 13:19:57 --- Hello,
why did you add obfuscation keyword here? There is nothing related here. Just to catch attention is bad manners ...
There are working and broken versions of the game - they have even the same version 1.13 but are built at different dates.
You can compare both 1.13 install directories for differences (Bookworm.exe).
working -> http://downloads.popcap.com/www/popcap_downloads/BookwormSetup-en.exe Build Date: April 24, 2008
broken -> http://downloads.popcap.com/www/popcap_downloads/BookwormSetup.exe Build Date: September 25, 2008
Whoever wrote the broken versions was most likely on drugs.
When the wrapper "bookworm.exe" is started, it parses the initial command line and prepares the process create parameters for the child.
When started with *full* path *and* a whitespace (or alternatively "" as param) the parent (wrapper) will not pass any parameters to child (popcapgame1.exe) -> child will succeed. In all other cases the father will copy its own complete command line and pass it to child leading to this error (because the child does not expect any non-empty params)
This should also fail with Windows. You might test it by opening a console window, cd to program directory and manually call the wrapper with:
1. short path ("bookworm.exe") 2. long path (quotes) 3. long path (quotes) + additional whitespace or "" as single parameter
Only 3. should succeed.
For Wine you might use empty quote param because trailing whitespace will get stripped, e.g.:
--- snip --- $ wine "C:\Program Files\PopCap Games\Bookworm Deluxe\Bookworm.exe" "" --- snip ---
Anyway .. there is nothing to fix for Wine here. It's just horribly broken software.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16543
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|obfuscation |
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #16 from Ken Sharp kennybobs@o2.co.uk 2009-04-14 04:54:40 --- OK, I will look into this asap and report back.
I looked at the keywords and obfuscation refers to "copy protection". Fair enough if it's intended use does not include this, just a mistake.
http://bugs.winehq.org/show_bug.cgi?id=16543
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://appdb.winehq.org/obje%7Chttp://downloads.popcap.com/ |ctManager.php?sClass=version|www/popcap_downloads/Bookwor |&iId=13115 |mSetup.exe
--- Comment #17 from Ken Sharp kennybobs@o2.co.uk 2009-04-14 06:29:21 --- Originally, there were more games attached to this bug, but some of them have been changed, and the bug went away. There are currently four attached.
All four fail with this bug under Wine, and work fine under Windows XP.
Although there are two builds (and probably more), users can be directed to the failing one, as shown whenever I visit the PopCap page.. As they work under Windows, it's still a Wine bug.
Workaround is to use a different game build. The problem being I have no idea how to find them, but I will update the relevant games in the appdb to reflect this.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #18 from Ken Sharp kennybobs@o2.co.uk 2009-04-14 07:00:31 --- OK, easy to find as it happens, just change *.exe to *-en.exe This works for all but Peggle Nights. The -en.exe also fails with this bug. So that can not be used as a workaround in this case. http://downloads.popcap.com/www/popcap_downloads/PeggleNightsSetup-en.exe
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #19 from Ken Sharp kennybobs@o2.co.uk 2009-05-03 14:49:41 --- Running from inside a command prompt under Windows XP causes the same error.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #20 from Anastasius Focht focht@gmx.net 2009-05-03 15:18:27 --- Hello,
just as I suspected .. that game is bugged (comment #15). That leaves the problem most likely to shellexecute(). Can you do the following in your Windows (with the game already installed):
1) Download the "Process Explorer" tool from: http://technet.microsoft.com/de-de/sysinternals/bb896653.aspx (former infamous sysinternals) 2) Start the game wrapper as usual, using Explorer (don't start the real game yet by clicking on button)
(I tested the following in Wine, should be similar in Windows)
3) Start "Process Explorer" tool, find the process, select/highlight it. 4) Right click, do "properties", select "image" tab if not already selected 5) Extend the "command line" field until _everything_ is visible. 6) Select/mark the whole command line edit field with mouse and be sure you select everything (blue) 7) Make a screenshot and/or tell me if there are any additional command line arguments/trailing characters (whitespace, quotes) after image path and attach to this bug report. Thanks.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #21 from Ken Sharp kennybobs@o2.co.uk 2009-05-03 15:26:54 --- '"C:\Program Files\PopCap Games\Bookworm Deluxe\Bookworm.exe" '
In other words, there is a rogue space after the command line.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #22 from Anastasius Focht focht@gmx.net 2009-05-03 16:49:28 --- Hello,
--- quote --- '"C:\Program Files\PopCap Games\Bookworm Deluxe\Bookworm.exe" '
In other words, there is a rogue space after the command line. --- quote ---
So this trailing whitespace character (0x20) also applies to all other explorer/shell spawned processes. That "lpCmd" parameter passed to CreateProcess(W) must already contain that whitespace to let the command line show up that way in process explorer.
That leaves the question where it gets added. The most likely candidate is ShellExecute(Ex)(W). Maybe someone can extend "shlexec" part of shell32 test suite and verify this behaviour in Windows. Alternatively you could try native shell32 and friends overrides and do relay log.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #23 from Jeff Zaroyko jeffz@jeffz.name 2009-05-07 20:12:10 --- (In reply to comment #22)
Hello,
--- quote --- '"C:\Program Files\PopCap Games\Bookworm Deluxe\Bookworm.exe" '
In other words, there is a rogue space after the command line. --- quote ---
So this trailing whitespace character (0x20) also applies to all other explorer/shell spawned processes. That "lpCmd" parameter passed to CreateProcess(W) must already contain that whitespace to let the command line show up that way in process explorer.
That leaves the question where it gets added. The most likely candidate is ShellExecute(Ex)(W). Maybe someone can extend "shlexec" part of shell32 test suite and verify this behaviour in Windows. Alternatively you could try native shell32 and friends overrides and do relay log.
Regards
Hello
Then this looks like a duplicate of bug 13617. Applying the linked patch[1] and using wine start /Unix Bookworm.exe makes the program work.
the /Unix flag is supposed to implement the quirks observed when starting processes as they would be through explorer.exe on Windows as some programmers rely on the always quoted commandline that explorer adds and now also the trailing whitespace.
1. http://www.winehq.org/pipermail/wine-patches/2008-June/055520.html
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #24 from Ken Sharp kennybobs@o2.co.uk 2009-05-08 07:58:29 --- OK, but more work needs to be done so that a user doesn't have to use the /Unix flag. Typically, an end user won't know about that flag, nor should they have to really.
When Bug 13617 is fixed, this bug will still be a problem, so not a duplicate.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #25 from Ken Sharp kennybobs@o2.co.uk 2009-05-08 07:59:24 --- ...it will provide a workaround though.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #26 from Jeff Zaroyko jeffz@jeffz.name 2009-05-08 08:07:50 --- (In reply to comment #24)
OK, but more work needs to be done so that a user doesn't have to use the /Unix flag. Typically, an end user won't know about that flag, nor should they have to really.
Yes, that's part of Desktop integration, currently any program which is associated with Wine (see tools/wine.desktop) is run using wine start /Unix, so this is implicit for the end user.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #27 from Ken Sharp kennybobs@o2.co.uk 2009-05-08 08:13:11 --- Does that include the shortcuts that are created in the Gnome (for example) menu?
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #28 from Ken Sharp kennybobs@o2.co.uk 2009-05-08 08:24:13 --- Doesn't seem so, this is the command from the shortcut created by menubuilder: env WINEPREFIX="/home/test/.wine" wine "C:\Program Files\PopCap Games\Bookworm Deluxe\Bookworm.exe"
So if the wine.desktop file starts with /Unix, then I guess this needs to be changed in the menubuilder too?
http://source.winehq.org/source/programs/winemenubuilder/winemenubuilder.c#L...
Jeff, was your patch commited?
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #29 from Ken Sharp kennybobs@o2.co.uk 2009-05-08 09:09:30 --- Patch didn't work when I tried it.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #30 from Jeff Zaroyko jeffz@jeffz.name 2009-05-08 09:40:42 --- (In reply to comment #28)
Doesn't seem so, this is the command from the shortcut created by menubuilder: env WINEPREFIX="/home/test/.wine" wine "C:\Program Files\PopCap Games\Bookworm Deluxe\Bookworm.exe"
So if the wine.desktop file starts with /Unix, then I guess this needs to be changed in the menubuilder too?
http://source.winehq.org/source/programs/winemenubuilder/winemenubuilder.c#L...
Probably.
Jeff, was your patch commited?
No, I looked at this a long time ago and haven't revisited it.
(In reply to comment #29)
Patch didn't work when I tried it.
works for me...
cd git/wine wget http://www.winehq.org/pipermail/wine-patches/attachments/20080603/f6fbdff5/a... patch -p1 < attachment.patch cd programs/start make WINEPREFIX=~/wine-bookworm ~/git/wine/wine start /Unix ~/wine-bookworm/drive_c/Program\ Files/PopCap\ Games/Bookworm\ Deluxe/Bookworm.exe
Program starts, hit play and the game loads instead of the fatal error message.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #31 from Vitaliy Margolen vitaliy@kievinfo.com 2009-05-08 10:03:32 --- How's the lnk file looks like on windows?
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #32 from Ken Sharp kennybobs@o2.co.uk 2009-05-10 07:23:46 --- Are you using the version from the URL field, or the version with the -en.exe ending? The latter doesn't have the problem.
The .lnk in Windows is how you would expect it, just c:\blah\blah\program.exe
The outer .exe calls the inner .exe remember, I doubt the outer .exe cares about MIME types when launching .exes.
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #33 from Jeff Zaroyko jeffz@jeffz.name 2009-05-10 09:02:18 --- (In reply to comment #32)
Are you using the version from the URL field, or the version with the -en.exe ending? The latter doesn't have the problem.
The .lnk in Windows is how you would expect it, just c:\blah\blah\program.exe
The outer .exe calls the inner .exe remember, I doubt the outer .exe cares about MIME types when launching .exes.
The one from the URL field obviously, it exhibits the problem unless I patch start /Unix to add an additional space.
ef9e73c9a3ad21376b8f131e011deee4c423e478 BookwormSetup.exe
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #34 from Anastasius Focht focht@gmx.net 2009-05-10 09:41:29 --- Hello,
what's the point of this discussion now?
I don't see the need of introducing some start.exe /unix hack. It's ShellExecute() that needs to be fixed to match Windows behaviour.
For the time being, the versions of the game that depend on trailing space can be started anyway from console or shortcut by adding a single "" (empty quotes) parameter to command line. Just add a hint to appdb and all is fine.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16543
--- Comment #35 from Jeff Zaroyko jeffz@jeffz.name 2009-05-10 09:44:57 --- (In reply to comment #34)
Hello,
what's the point of this discussion now?
I don't see the need of introducing some start.exe /unix hack. It's ShellExecute() that needs to be fixed to match Windows behaviour.
For the time being, the versions of the game that depend on trailing space can be started anyway from console or shortcut by adding a single "" (empty quotes) parameter to command line. Just add a hint to appdb and all is fine.
Regards
Yes sorry, I was just about to post that it does look like the additional space comes from ShellExecuteEx rather than explorer as I earlier thought, it also looks like the other bug is that ShellExecuteEx quotes the first argument of the commandline unconditionally, ie if there is any space to be escaped or not and Wine doesn't quote at all.
http://bugs.winehq.org/show_bug.cgi?id=16543
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #36 from Ken Sharp kennybobs@o2.co.uk 2010-02-27 19:40:20 --- Fixed in 1.1.38
http://bugs.winehq.org/show_bug.cgi?id=16543
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #37 from Alexandre Julliard julliard@winehq.org 2010-03-05 12:42:46 --- Closing bugs fixed in 1.1.40.