http://bugs.winehq.org/show_bug.cgi?id=12838
Summary: Spiceworks IT Desktop 2.1: Wine corrupts bitmap files during extraction from installer Product: Wine Version: 0.9.60 Platform: PC URL: http://spiceworks.com OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dimaki@rocketmail.com
When the installer Spiceworks.exe is ran it temporarily unpacks its files into the windows/temp directory. Among the files extracted are bmp files which are used in the installer wizard itself, including the very first page of the wizard.
Under Wine, most of the bitmap files get extracted in corrupted form which results in none of the bitmaps showing up on the first page of the wizard and some not showing up on other pages of the wizard.
Spiceworks uses an NSIS installer, the contents of which can be extracted using 7zip. I have compared the files extracted by Wine with those actually in the installer and they are of different size and binary content which clearly indicates corruption of data by Wine. This problem does not occur under windows.
http://bugs.winehq.org/show_bug.cgi?id=12838
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=12838
scguy318 nodisgod@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nodisgod@yahoo.com
--- Comment #1 from scguy318 nodisgod@yahoo.com 2008-10-03 00:52:49 --- I'm confirming this bug with today's Git (wine-1.1.5-399-g82f77cc).
http://bugs.winehq.org/show_bug.cgi?id=12838
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Lei Zhang thestig@google.com 2008-10-03 13:50:23 --- confirming then
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #3 from dimaki@rocketmail.com 2008-10-27 21:13:11 --- I am confirming that this problem still exists with the latest verion of Spiceworks and the latest version of Wine(1.1.7)
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #4 from dimaki dimaki@rocketmail.com 2008-11-22 23:26:27 --- bug 14387 is a duplicate of this bug
http://bugs.winehq.org/show_bug.cgi?id=12838
dimaki dimaki@rocketmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Spiceworks IT Desktop 2.1: |Spiceworks IT Desktop: Wine |Wine corrupts bitmap files |corrupts bitmap files during |during extraction from |extraction from installer |installer |
--- Comment #5 from dimaki dimaki@rocketmail.com 2008-11-23 00:00:42 --- Confirming problem still present with Wine 1.1.9 and latest version of Spiceworks.
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #6 from dimaki dimaki@rocketmail.com 2008-11-23 00:05:13 --- Created an attachment (id=17413) --> (http://bugs.winehq.org/attachment.cgi?id=17413) Attached bitmaps extracted from installer in Windows and in Wine
Bitmaps with 2 at the end get extracted by the installer in Wine while those without are extracted in Windows. Most of the ones extracted by installer in Wine are corrupted.
http://bugs.winehq.org/show_bug.cgi?id=12838
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14387
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #7 from dimaki dimaki@rocketmail.com 2008-11-23 20:12:47 --- Created an attachment (id=17423) --> (http://bugs.winehq.org/attachment.cgi?id=17423) WINEDEBUG=+all wine Spiceworks.exe &>all.log
Attached only the partial log, but I believe it should contain the relevant information. The whole thing would be too bug to attach.
http://bugs.winehq.org/show_bug.cgi?id=12838
dimaki dimaki@rocketmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |kernel32
--- Comment #8 from dimaki dimaki@rocketmail.com 2008-11-29 19:39:41 --- I have isolated the problem to kernel32.dll, profile.c implementation.
For some strange reason the installer makes these types of calls to WritePrivateProfileStringA("Settings", "RTL", 0, path to bmp file). What's unusual about this is that the last parameter is supposed to be a path to an ini file and certainly not to a bmp file. Making this type of call on Windows with the bitmap already existing results in the file staying the same with the exception of an updated timestamp. In Wine on the other hand this results in the bmp file being read in and then written out in a corrupted form. This is what corrupts the bitmaps extracted by this installer.
I don't think I will be able to write a patch to fix this behaviour, but at least I helped out with pinpointing the problem.
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #9 from dimaki dimaki@rocketmail.com 2009-01-03 01:28:29 --- Looked into this a bit further. What I found is that I was a little bit off as to one of the paramters passed into WritePrivateProfileStringA and what actually happens. For the third parameter, a pointer to the following character string is passed:"0" making the actual call WritePrivateProfileStringA("Settings", "RTL", "0", path to bmp file). This results in the following actually being written a the end of the bmp files in question on a Windows system: [Settings] RTL=0
The bitmap files remains viewable afterwards and get displayed in the installer's wizard.
In Wine on the other hand the bmp files gets corrupted and are outputted by the call to this function much smaller then they originally were, instead of being slightly larger. Because the files are corrupted, they do not display in the installer's wizard.
http://bugs.winehq.org/show_bug.cgi?id=12838
dimaki dimaki@rocketmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |truiken@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #10 from dimaki dimaki@rocketmail.com 2009-03-24 14:00:29 --- This problem is still present in today's GIT.
The bug here comes down to the way Wine's ini handling functions handle NULL (0x00) bytes within data that comes before the first section in files being read in as ini files. Windows reads in this data incuding the NULL bytes and writes it back out the same way while Wine treats them as the end of a string resulting in the output file being corrupted.
I noticed James Hawkins started working on profile.c which is where the ini processing functions reside. I added him as a CC to this bug. Perhaps he will be able to help out with addressing it.
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #11 from dimaki dimaki@rocketmail.com 2009-03-25 20:23:52 --- James Hawkins had unblocked his ability to receive emails from Bugzilla so I adding this comment to see if it reaches him so he is aware of this bug.
http://bugs.winehq.org/show_bug.cgi?id=12838
James Hawkins truiken@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|truiken@gmail.com |
--- Comment #12 from James Hawkins truiken@gmail.com 2009-03-25 20:39:30 --- I was just fixing a coverity bug. It shouldn't be hard for someone to write a test case for this bug and submit a fix based on it.
http://bugs.winehq.org/show_bug.cgi?id=12838
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks|14387 | CC| |hytek3000@yahoo.com
--- Comment #13 from Dmitry Timoshkov dmitry@codeweavers.com 2009-07-22 20:14:59 --- *** Bug 14387 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #14 from dimaki dimaki@rocketmail.com 2010-04-20 22:35:04 --- Still present in 1.1.43 and current git.
http://bugs.winehq.org/show_bug.cgi?id=12838
Wolfram Sang wolfram@the-dreams.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wolfram@the-dreams.de
--- Comment #15 from Wolfram Sang wolfram@the-dreams.de 2010-05-16 23:14:00 --- So, when loading a profile Windows skips (and later restores) any data before an initial "["? Even if it is not binary data, but just text?
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #16 from dimaki dimaki@rocketmail.com 2010-05-17 15:18:46 --- (In reply to comment #15)
So, when loading a profile Windows skips (and later restores) any data before an initial "["? Even if it is not binary data, but just text?
Hi Wolfram and thank you very much for looking into this.
The main problem here is a design flaw in Wine's profile.c This module contains so called "Profile" functions which deal with reading and writing from/to .ini files. Wine's profile.c internally stores parsed ini file data as null terminated strings. In fact this is wrong, because these Profile functions on Windows do not strip out NULL bytes/characters from an original ini file, but rather leave them in place when the ini file gets written back after modification. To do this one of course cannot use NULL bytes/characters for termination to store the parsed data strings before possibly modifying the data and writing it back.
What happens in this particular case is that the Spiceworks installer for some braindead reason uses WritePrivateProfileStringA which is one of the Profile functions in question to write some ini crap to the end of a bunch of BMP files used in the installer wizard. Due to the fact that these bitmap files are of course binary files that contain NULL bytes and profile.c parsing code is incapable of parsing and internally storing NULLs bytes properly, the resulting files are badly currupted and don't display in the installer.
Hope this clears things up a bit.
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #17 from dimaki dimaki@rocketmail.com 2010-05-17 15:28:44 --- (In reply to comment #15)
So, when loading a profile Windows skips (and later restores) any data before an initial "["? Even if it is not binary data, but just text?
In attempt to better explain the situation I forgot to directly answer your question. Yes, you are correct. In fact, not only data before the first section is left as is, but everything in other sections that are not supposed to be modified in the called function is left as is as well. That includes any possible NULL bytes/characters that exist in them. With regards to NULLs, this is something Wine's current implementation is inherently incapable of doing.
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #18 from Wolfram Sang wolfram@the-dreams.de 2010-05-19 20:06:23 --- So, to sum it up in my own words:
What WINE does:
- During PROFILE_Load, the complete ini-file is parsed to an internal structure. - the entry is added to the internal structure - During PROFILE_Save, the complete ini-file is rewritten from scratch according to the internal structure.
That means in this case, a number of entries are dropped as WINE couldn't parse them when loading. Also, they might get modified (removing unnecessary spaces).
What Windows seems to do:
- look for the entry in the file, ignoring everything else - update or append the entry - leave the rest as is
Correct? Hmm, that would need a bit of effort then :(
http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #19 from dimaki dimaki@rocketmail.com 2010-05-19 23:45:11 --- (In reply to comment #18)
You are absolutely correct both with regards to what happens and with your statement that it would take a significant amount of effort to resolve this.
I do think that whoever does put in the effort and skill to rewrite the internals of profile.c to work as expected deserves to add his own entry next to the "Copyright 1993 Miguel de Icaza Miguelde Icaza" and "Copyright 1996 Alexandre Julliard" at the top of profile.c . Those are pretty big names to have one's name next to.
http://bugs.winehq.org/show_bug.cgi?id=12838
butraxz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |butraxz@gmail.com
--- Comment #20 from butraxz@gmail.com 2012-05-18 04:56:27 CDT --- This bug has not been updated for two years by OP. Is this still an issue i current (1.5.4) or newer wine ? You may also close this as abandoned if you feel that that this is issue is no longer relevant to you.
https://bugs.winehq.org/show_bug.cgi?id=12838
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |ABANDONED
--- Comment #21 from Ken Sharp imwellcushtymelike@gmail.com --- Abandoned
https://bugs.winehq.org/show_bug.cgi?id=12838
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #22 from Austin English austinenglish@gmail.com --- Closing.