http://bugs.winehq.org/show_bug.cgi?id=14882
Summary: UpdateResource fails to delete a resource Product: Wine Version: 1.1.2 Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: johnlen7+wine@gmail.com
UpdateResource should, according to MSDN, delete a resource if (!lpData)&&(!cbData). This is actually the way applications can delete resources and various resource-related application, like InnoSetup, use it.
However wine's current implementation of UpdateResourceW unconditionally calls allocate_resource_data, which will fail if either lpData or cbData is NULL.
I hope I can fix it, but I will need to familiarize myself with kernel32 code first.
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #1 from Lei Zhang thestig@google.com 2008-08-16 15:52:04 --- Please start by writing a test case in dlls/kernel32/tests/resource.c.
Which InnoSetup installer is having the issue?
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #2 from Evgeny Fraimovitch johnlen7+wine@gmail.com 2008-08-16 15:55:20 --- I will write a test case. InnoSetup installers don't have this issue, as far as I know, that's the InnoSetup compiler itself which has.
http://bugs.winehq.org/show_bug.cgi?id=14882
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS/Version|All |other Platform|All |Other
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #3 from Austin English austinenglish@gmail.com 2009-02-16 02:31:13 --- Is this still an issue in current (1.1.15 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #4 from Evgeny Fraimovitch johnlen7+wine@gmail.com 2009-04-29 09:02:28 --- It still happens on wine-1.1.20.
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #5 from Austin English austinenglish@gmail.com 2009-11-19 12:07:40 --- Probably still present.
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #6 from Fritz Elfert fritz@fritz-elfert.de 2010-02-11 16:06:13 --- Created an attachment (id=26216) --> (http://bugs.winehq.org/attachment.cgi?id=26216) Minimalistic InnoSetup script
This script triggers the bug, when compiling with InnoSetup like this:
wine /mnt/winxp/Program..../ISCC.exe updateresbug.iss
http://bugs.winehq.org/show_bug.cgi?id=14882
Fritz Elfert fritz@fritz-elfert.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fritz@fritz-elfert.de
--- Comment #7 from Fritz Elfert fritz@fritz-elfert.de 2010-02-11 16:08:55 --- Still fails with latest InnoSetup 5.3.7 running under wine 1.1.32 when compiling a setup script which contains a SetupIconFile directive. Minimalistic example script attached.
-Fritz
http://bugs.winehq.org/show_bug.cgi?id=14882
Joerg Bergmann email@jbergmann.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #8 from Joerg Bergmann email@jbergmann.de 2010-04-19 01:12:00 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=14882
Joerg Bergmann email@jbergmann.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |email@jbergmann.de
--- Comment #9 from Joerg Bergmann email@jbergmann.de 2010-04-19 01:51:01 --- QSetup (an install composer too) seems to fail exactly by this bug.
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #10 from Joerg Bergmann email@jbergmann.de 2010-05-30 00:19:40 --- Still fails with QSetup 10.0.1.6 under wine 1.1.38 (Fedora 13).
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #11 from Fritz Elfert fritz@fritz-elfert.de 2010-07-24 17:41:49 --- Just tried with wine 1.2.0 in Fedora: Still not fixed
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #12 from Fritz Elfert fritz@fritz-elfert.de 2010-07-24 21:01:17 --- Created an attachment (id=29820) --> (http://bugs.winehq.org/attachment.cgi?id=29820) patch to fix 14882
In conjunction with Andrey Turkin's enhancements of EndUpdateResouce, the attached patch fixes this issue. Link to Andrey Turkin's commit diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=a610fc17d8dd215651d272...
http://bugs.winehq.org/show_bug.cgi?id=14882
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |dank@kegel.com
--- Comment #13 from Dan Kegel dank@kegel.com 2010-08-18 01:31:57 --- Said to affect Adventure Game Studio, see http://www.bigbluecup.com/yabb/index.php?topic=41584.0
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #14 from Dan Kegel dank@kegel.com 2010-09-30 22:09:38 CDT --- Fritz, can you submit a test for this? Looks like Mike McCormack was going to back in 2006 - the function update_resources_delete() in kernel32/tests/resource.c is an exact copy of update_resources_none(), he probably meant to test exactly this area.
http://bugs.winehq.org/show_bug.cgi?id=14882
Björn Kautler Bjoern@Kautler.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Bjoern@Kautler.net
--- Comment #15 from Björn Kautler Bjoern@Kautler.net 2010-12-10 19:32:29 CST --- This problem is still present in wine-1.3.8 and the attached patch still fixes the problem
http://bugs.winehq.org/show_bug.cgi?id=14882
--- Comment #16 from Björn Kautler Bjoern@Kautler.net 2011-01-26 19:19:38 CST --- This bug got finally fixed in commit d5cb11a45a3aab5ac372e571b55e1fc35709f13d which was first included in wine 1.3.10. With that version, InnoSetup works just fine and I guess all other apps do also. But I think the test from comment #14 was not touched, but I don't know if it needed touching. But I guess yes as the bug was not fixed that long time I guess the test didn't fail and thus was not correct.
http://bugs.winehq.org/show_bug.cgi?id=14882
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #17 from Dan Kegel dank@kegel.com 2011-01-26 20:09:52 CST --- Marking fixed.
http://bugs.winehq.org/show_bug.cgi?id=14882
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Alexandre Julliard julliard@winehq.org 2011-02-04 13:21:37 CST --- Closing bugs fixed in 1.3.13.
http://bugs.winehq.org/show_bug.cgi?id=14882
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.2.x
http://bugs.winehq.org/show_bug.cgi?id=14882
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.2.x |---
https://bugs.winehq.org/show_bug.cgi?id=14882
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d5cb11a45a3aab5ac372e571b55 | |e1fc35709f13d CC| |focht@gmx.net