http://bugs.winehq.org/show_bug.cgi?id=29265
Bug #: 29265 Summary: WebGallery: search throws access violation Product: Wine Version: 1.3.34 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msxml3 AssignedTo: wine-bugs@winehq.org ReportedBy: alex@stanev.org Classification: Unclassified
To reproduce, download WebGallery and create one: 1) click on directory with some jpgs in it; 2) press Input folder button 3) write some metadata below 4) click on Gallery button. This will create subdir called WebGallery inside with generated static webgallery 5) press Search button and choose dir from step 1 6) type something to search for and press search 7) crash
Did some investigation, the log shows this: err:msxml:doparse Document labelled UTF-16 but has UTF-8 content The problem is that this application sets wrong the encoding in xml to UTF-16. The file is UTF-8 and if changed with editor the search went OK.
For such ill applications to work, the encoding have to be forced/fallbacked to UTF-8 but libxml2 does not have such a functionality by design.
Under win7 the app works fine.
http://bugs.winehq.org/show_bug.cgi?id=29265
Alex Stanev alex@stanev.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://stanev.org/webgaller | |y/WebGallery_v1.01.exe
http://bugs.winehq.org/show_bug.cgi?id=29265
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com 2011-12-07 14:01:06 CST --- (In reply to comment #0)
Did some investigation, the log shows this: err:msxml:doparse Document labelled UTF-16 but has UTF-8 content The problem is that this application sets wrong the encoding in xml to UTF-16. The file is UTF-8 and if changed with editor the search went OK.
So application itself writes malformed xml file using msxml functionality or just does it internally somehow?
According to XML Spec (as I understand it) such case is considered fatal error:
--- It is a fatal error if an XML entity is determined (via default, encoding declaration, or higher-level protocol) to be in a certain encoding but contains byte sequences that are not legal in that encoding. ---
and that makes sense, but msxml error handling could differ of course.
For such ill applications to work, the encoding have to be forced/fallbacked to UTF-8 but libxml2 does not have such a functionality by design.
Well, it's possible to add some workarounds for this.
http://bugs.winehq.org/show_bug.cgi?id=29265
--- Comment #2 from Alex Stanev alex@stanev.org 2011-12-08 02:44:13 CST --- Since the software was written in Delphi5, it uses TXMLDocument class, which is wrapper around msxml I think. The xml itself is generated through that class, but the encoding is wrongly forced like this: XMLDocument.Encoding := 'UTF-16'; Still under windows this works.
http://bugs.winehq.org/show_bug.cgi?id=29265
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Summary|WebGallery: search throws |WebGallery 1.x: search |access violation |throws access violation | |(XML document labelled | |UTF-16 but has UTF-8 | |content) Ever Confirmed|0 |1
--- Comment #3 from Anastasius Focht focht@gmx.net 2012-05-03 15:42:35 CDT --- Hello,
confirming, still present.
--- snip --- err:msxml:doparse Document labelled UTF-16 but has UTF-8 content --- snip ---
$ du -sh WebGallery_v1.01.exe 484K WebGallery_v1.01.exe
$ sha1sum WebGallery_v1.01.exe 58cc1faf6dd458cadbdc9aa781f0de1962f2c4c6 WebGallery_v1.01.exe
$ wine --version wine-1.5.3-143-g081b06c
Regards
http://bugs.winehq.org/show_bug.cgi?id=29265
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2012-05-05 16:32:07 CDT --- Probably there's a way to workaround that by parsing '<?xml' node manually (without libxml2). And on such encoding mismatch we could generate our own '<?xml' node data that is correct according to specification. That could be a good thing actually, cause we need eventually parse it ourselves.
https://bugs.winehq.org/show_bug.cgi?id=29265
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
I can't reproduce this anymore, resolving 'fixed'.
$ sha1sum WebGallery_v1.01.exe 58cc1faf6dd458cadbdc9aa781f0de1962f2c4c6 WebGallery_v1.01.exe
$ du -sh WebGallery_v1.01.exe 484K WebGallery_v1.01.exe
$ wine --version wine-1.7.24-150-gcf4404c
Regards
https://bugs.winehq.org/show_bug.cgi?id=29265
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.25.