http://bugs.winehq.org/show_bug.cgi?id=29849
Bug #: 29849 Summary: oleaut32's OLEPictureImpl_Load fails when Stat() method is missing Product: Wine Version: 1.4-rc2 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: oleaut32 AssignedTo: wine-bugs@winehq.org ReportedBy: michael.blumenkrantz@gmail.com Classification: Unclassified
Created attachment 38772 --> http://bugs.winehq.org/attachment.cgi?id=38772 test case
Without a Stat() method, this function should only read the parts of a file that are needed. Instead, it continues to read and eventually crashes.
Find attached a test case which takes an image file as an argument, then crashes.
http://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #1 from Mike Blumenkrantz michael.blumenkrantz@gmail.com 2012-02-09 15:32:45 CST --- Created attachment 38773 --> http://bugs.winehq.org/attachment.cgi?id=38773 compiled version of olefail.cpp
http://bugs.winehq.org/show_bug.cgi?id=29849
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source CC| |mstefani@redhat.com
http://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #2 from Vincent Povirk madewokherd@gmail.com 2012-02-09 15:37:41 CST --- Looks like working Seek() is missing too. We'll have to assume Read is the only method on the stream that works.
http://bugs.winehq.org/show_bug.cgi?id=29849
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #38772|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #3 from Mike Blumenkrantz michael.blumenkrantz@gmail.com 2012-11-02 16:00:12 CDT --- Created attachment 42374 --> http://bugs.winehq.org/attachment.cgi?id=42374 patch to prevent OleLoadPicture from crashing
I guess there's no interest in fixing this, but at the least something like the attached patch should be applied to prevent this function from crashing any time the codepath in question is run.
http://bugs.winehq.org/show_bug.cgi?id=29849
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #4 from Dan Kegel dank@kegel.com 2012-11-02 22:01:39 CDT --- Do you happen to know an app that suffers from this?
http://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #5 from Mike Blumenkrantz michael.blumenkrantz@gmail.com 2012-11-03 03:06:17 CDT --- Aside from the test case I previously attached, the Path of Exile msi installer crashes reliably because of this bug. I've uploaded it at http://dev.enlightenment.fr/~discomfitor/PathOfExileInstaller.msi
http://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #6 from Dan Kegel dank@kegel.com 2012-11-03 04:34:23 CDT --- Thanks. You should probably remove that upload, though. I gather you have to purchase access for $10 at https://www.pathofexile.com/purchase/
But that installer does not crash for me with either wine-1.4 or current git. Does it still crash for you with current wine on a clean wineprefix?
http://bugs.winehq.org/show_bug.cgi?id=29849
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW URL| |https://www.pathofexile.com | |/purchase/ Ever Confirmed|0 |1
--- Comment #7 from Dan Kegel dank@kegel.com 2012-11-03 04:37:35 CDT --- Ah, it's not the installer that crashes, it's the game, right at the very start of execution, and the patch does get it further.
http://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #8 from Mike Blumenkrantz michael.blumenkrantz@gmail.com 2012-11-03 05:08:17 CDT --- (In reply to comment #6)
Thanks. You should probably remove that upload, though. I gather you have to purchase access for $10 at https://www.pathofexile.com/purchase/
But that installer does not crash for me with either wine-1.4 or current git. Does it still crash for you with current wine on a clean wineprefix?
There's no harm in leaving it up; the installer does not allow you to play the game in any way.
Another interesting bug that this game (the downloader for it) exposes is that the "allocating space" step takes hours under wine, whereas in windows it takes only a few seconds.
http://bugs.winehq.org/show_bug.cgi?id=29849
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=29849
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #42374|application/octet-stream |text/plain mime type| |
https://bugs.winehq.org/show_bug.cgi?id=29849
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #9 from super_man@post.com --- the patch still applies cleanly
patching file dlls/oleaut32/olepicture.c Hunk #1 succeeded at 1386 (offset 14 lines).
wine 1.7.52(git)
https://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #10 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to super_man from comment #9)
the patch still applies cleanly
patching file dlls/oleaut32/olepicture.c Hunk #1 succeeded at 1386 (offset 14 lines).
wine 1.7.52(git)
Attached patch is just a hack, it will break the tests.
https://bugs.winehq.org/show_bug.cgi?id=29849
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #42374|0 |1 is patch| |
https://bugs.winehq.org/show_bug.cgi?id=29849
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=29849
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #11 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-4.0-rc2? Download link is burst.
https://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #12 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 69325 --> https://bugs.winehq.org/attachment.cgi?id=69325 test 2
Attaching modified test case that uses ReadFile()/SetFilePointer(). Initial test seems to be broken, Read() method does a weird check on input buffer, and returns bogus error code. Seek() returns S_OK but does not do anything.
On both Windows 10 and Wine 6.1+ attached test works file, without Stat() implemented. Seek() is required at least for BMP files on Windows.
I'm going to close this report, until there is more information available.
https://bugs.winehq.org/show_bug.cgi?id=29849
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED
--- Comment #13 from Nikolay Sivov bunglehead@gmail.com --- Marking invalid.
https://bugs.winehq.org/show_bug.cgi?id=29849
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net URL|https://www.pathofexile.com |https://web.archive.org/web |/purchase/ |/20121022214200/http://www. | |pathofexile.com/downloads/P | |athOfExileInstaller.msi
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://web.archive.org/web/20121022214200/http://www.pathofexile.com/downlo...
It's pathofexile v0.9.12 from 2012, most likely matching what was used to report the bug. The client can't work anymore due to changes in update protocol.
I've played a bit around using command line parameters documented at:
https://pathofexile.gamepedia.com/Launch_options
To avoid the hang on non-open port -> '--no-patch'
--- snip --- $ wine ./Client.exe --nologo --nopatch --- snip ---
Unfortunately without proper patch/update data the game can't work. Even if the old client version asset URLs are known, all the data is gone from the servers/CDNs hence the game (client) state from 2012 can't be reproduced.
I've found two 'OleLoadPicture' calls in the trace logs when running the launcher/client but they are fine - even with Wine 1.4-rc2
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Grinding Gear Games/Path of Exile
$ WINEDEBUG=+seh,+relay wine ./Client.exe >>log.txt 2>&1 ... 0024:Ret PE DLL (proc=0x78ab20fc,module=0x78aa0000 L"MSVCR100.dll",reason=THREAD_ATTACH,res=(nil)) retval=1 0024:Starting thread proc 0x73bb50 (arg=0x33f488) 0024:Call comctl32.InitCommonControls() ret=0073bf8f 0024:Ret comctl32.InitCommonControls() retval=00122e70 ret=0073bf8f 0024:Call KERNEL32.FindResourceW(00400000,00000190,0097ff4c L"JPG") ret=0073b5e8 0024:Ret KERNEL32.FindResourceW() retval=00b51200 ret=0073b5e8 0024:Call KERNEL32.SizeofResource(00400000,00b51200) ret=0073b624 0024:Ret KERNEL32.SizeofResource() retval=0003555b ret=0073b624 0024:Call KERNEL32.LoadResource(00000000,00b51200) ret=0073b62f 0024:Ret KERNEL32.LoadResource() retval=00b512b8 ret=0073b62f 0024:Call oleaut32.OleLoadPicture(0126e9ac,00000000,00000000,008fa7d0,0033f4c0) ret=0073bfbd ... 0024:Ret oleaut32.OleLoadPicture() retval=00000000 ret=0073bfbd 0024:Call KERNEL32.FindResourceW(00400000,00000191,0097ff4c L"JPG") ret=0073b5e8 0024:Ret KERNEL32.FindResourceW() retval=00b51210 ret=0073b5e8 0024:Call KERNEL32.SizeofResource(00400000,00b51210) ret=0073b624 0024:Ret KERNEL32.SizeofResource() retval=000097b0 ret=0073b624 0024:Call KERNEL32.LoadResource(00000000,00b51210) ret=0073b62f 0024:Ret KERNEL32.LoadResource() retval=00b86814 ret=0073b62f 0024:Call oleaut32.OleLoadPicture(0126e9ac,00000000,00000000,008fa7d0,0033f4c4) ret=0073c021 ... 0024:Ret oleaut32.OleLoadPicture() retval=00000000 ret=0073c021 ... 0024:Call user32.RegisterClassExW(0126e970) ret=0073c09a 0024:Ret user32.RegisterClassExW() retval=0000c03d ret=0073c09a .. 0024:Call user32.CreateWindowExW(00000000,0097ff74 L"MainWindowClass",0097ff94 L"Connecting...",00c80000,000003a2,00000208,000002c2,000001a6,00000000,00000000,00000000,00000000) ret=0073c12b 0024:Call KERNEL32.LZOpenFileW(0126e428 L"C:\Program Files (x86)\Grinding Gear Games\Path of Exile\Client.exe",0126e338,00000000) ret=7ef2faf2 ... --- snip ---
It might have been something else in the end and OP might have drawn wrong conclusions. That's why it's important to provide information such as backtraces and trace output to let other folks make their own judgement.
I've seen way too many cases where wrong conclusions were drawn because of scary looking fixme/warns in console/logs and/or fixing a follow-up problem but not the root cause which lets them get away with it due to faulty or relaxed app error handling.
One example that always comes to my mind: bug 14218 ("OleLoadPictureEx is not fully implemented")
Quoting myself:
--- quote --- ... the VB6 runtime causes these messages to be emitted during error handling. They are benign and not reason of VB6 applications misbehaving -> can be safely ignored.
--- snip --- fixme:ole:OleLoadPictureEx (0x9add6c,2246,0,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=0,y=0,f=0,0x32fa50), partially implemented. ... fixme:ole:OLEPictureImpl_FindConnectionPoint no connection point for {33ad4ed2-6699-11cf-b70c-00aa0060d393} --- snip --- --- quote ---
$ sha1sum PathOfExileInstaller.msi 2020963d18f621a32f5b2e4d62cf4ec69afa16a6 PathOfExileInstaller.msi
$ du -sh PathOfExileInstaller.msi 6.5M PathOfExileInstaller.msi
$ wine --version wine-1.4-rc2
Regards
https://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #15 from Mike Blumenkrantz michael.blumenkrantz@gmail.com --- Created attachment 69342 --> https://bugs.winehq.org/attachment.cgi?id=69342 original launcher
Wow, this is ancient. Brings back some memories, that's for sure.
I lost track of things here for a while, but the emails popped up lately so I thought I'd comment to provide some context since I have some regrets about not posting more complete details in the original ticket (ah, youth).
To start, this was an issue present in the closed beta Path of Exile launcher, which was never available publicly. Given that I started playing (according to my email logs) around August 2011, I'd say it's not possible the launcher version you've found in the internet archive is the same one.
To compound this, I pointed out to them at the time the problem of the missing Stat() implementation (discovered IIRC through ollydbg), and it was confirmed that they indeed were missing this method. They added it almost immediately in the launcher. Judging by the date on that internet archive link, the launcher you have there is from 8 months after this ticket was opened, and I can say with confidence that the issue had long since been resolved by that point.
The test case that I attached may or may not be "correct" from an API perspective, and I'm not sure it's worth investigating that too deeply given how lacking my engineering capabilities were a decade ago, but it did accurately reproduce the issue at hand by one means or another.
Now there is a stroke of luck here: through some sort of weird coincidence, I think I actually have the original launcher. Or at least, the date on the file is 30 August 2011, so it seems more probable that this one has the issue as opposed to the one found in the internet archive. I've attached it in case it's of interest.
I'd like to provide more information, but this is likely the most context I can glean from something so long ago.
https://bugs.winehq.org/show_bug.cgi?id=29849
--- Comment #16 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=29849
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Austin English austinenglish@gmail.com --- Closing.