https://bugs.winehq.org/show_bug.cgi?id=47999
Bug ID: 47999 Summary: Gif pictures stored in PE files are not loaded into HTML web pages via Res protocol Product: Wine Version: 4.18 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mshtml Assignee: wine-bugs@winehq.org Reporter: dimaki@rocketmail.com Distribution: ---
Issue first noticed with VBSEdit application, but then a small sample MFC application was found on codeproject.com which displays the same incorrect behavior. On windows the sample application comes up and displays an HTML web page which contains a gif image. Both the webpage and the gif are loaded via the res protocol from the program executable. On wine the HTML page loads but the gif does not get loaded and is missing from the page.
https://bugs.winehq.org/show_bug.cgi?id=47999
Molk dimaki@rocketmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://www.codeproject.com | |/Articles/435/How-to-use-th | |e-res-protocol-in-Developer | |-Studio
https://bugs.winehq.org/show_bug.cgi?id=47999
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source
https://bugs.winehq.org/show_bug.cgi?id=47999
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |damjan.jov@gmail.com
--- Comment #1 from Damjan Jovanovic damjan.jov@gmail.com --- Still the case in Wine 5.2
https://bugs.winehq.org/show_bug.cgi?id=47999
--- Comment #2 from Damjan Jovanovic damjan.jov@gmail.com --- Wine does load the HTML resource correctly, but then attempts to load its <image> from its res:// URL with resource type #0017 (RT_HTML), which fails:
0009:trace:mshtml:ResProtocol_Start trying to find resource type #0017, name L"image7.gif" 0009:warn:mshtml:ResProtocol_Start Could not find resource
Looking through the executable's resources, we see image7.gif has resource type 0x83e (2110 decimal), and indeed, the source code says:
// In the HTML File to locate resource in // your app add the file by name and in binary format // of type 2110 ( Magic Number for Microsoft) // HTML files are placed automatically under // category of type HTML
Patching dlls/mshtml/protocol.c function ResProtocol_Start() to use resource type 2110 when the default res_type fails, fixes the problem.
https://bugs.winehq.org/show_bug.cgi?id=47999
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #3 from Damjan Jovanovic damjan.jov@gmail.com --- Patch sent: https://source.winehq.org/patches/data/181514
https://bugs.winehq.org/show_bug.cgi?id=47999
--- Comment #4 from Molk dimaki@rocketmail.com --- I can confirm that the patch in comment 3 fixes this problem in VbsEdit application. Will it be committed to main Wine soon?
https://bugs.winehq.org/show_bug.cgi?id=47999
--- Comment #5 from Damjan Jovanovic damjan.jov@gmail.com --- (In reply to Molk from comment #4)
I can confirm that the patch in comment 3 fixes this problem in VbsEdit application. Will it be committed to main Wine soon?
They wanted unit tests too. I'll try get back to it soon.
https://bugs.winehq.org/show_bug.cgi?id=47999
Molk dimaki@rocketmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #6 from Molk dimaki@rocketmail.com --- As of Wine 5.7 this is now fixed. Pictures now show up properly both in VbsEdit and the sample Codeproject hosted application.
Damjan Jovanovic, thank you very much for your patch and for getting it commited!
https://bugs.winehq.org/show_bug.cgi?id=47999
Molk dimaki@rocketmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |3e8bca0eb4f3f2c9b3bbf9fc634 | |242512f8759b1
https://bugs.winehq.org/show_bug.cgi?id=47999
--- Comment #7 from Damjan Jovanovic damjan.jov@gmail.com --- (In reply to Molk from comment #6)
As of Wine 5.7 this is now fixed. Pictures now show up properly both in VbsEdit and the sample Codeproject hosted application.
Damjan Jovanovic, thank you very much for your patch and for getting it commited!
Pleasure :). It took almost a month and 5 attempts.
https://bugs.winehq.org/show_bug.cgi?id=47999
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.8.
https://bugs.winehq.org/show_bug.cgi?id=47999
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=47999
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #9 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.2.