http://bugs.winehq.org/show_bug.cgi?id=11973
Summary: Crash into Unimplemented function softpub.dll.SoftpubInitialize Product: Wine Version: CVS/GIT Platform: PC URL: http://chatstat.com OS/Version: Linux Status: UNCONFIRMED Keywords: download Severity: normal Priority: P2 Component: wintrust AssignedTo: wine-bugs@winehq.org ReportedBy: xerox_xerox2000@yahoo.co.uk
Hi, on wine-users list someone was trying to run this app (ChatStat), so i gave it a try, and it crashes for me into unimplemented SoftpubInitialize (saw the same crash with 3ds Max 2009 btw). I guess this can be forwarded to wintrust.SoftpubInitialize, so i tried. Then ran into various other unimplemented functions in softpub.dll, like SoftpubLoadMessage and SoftpubLoadSignature etc
Could someone who knows something about softpub have a look, and see if and what can be forwarded? That might get this app a bit further.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2008-03-12 09:40:41 --- In Windows XP, these functions are not forwarded from softpub.dll to wintrust.dll. Because of the way SIP uses these, they don't actually overlap: each function is loaded by GUID. For instance, GUID {00AAC56B-CD44-11D0-8CC2-00C04FC295EE} uses wintrust.dll:SoftpubInitialize, while GUID {1A6631C0-3EA2-11D1-AE01-006097C6A9AA} uses softpub.dll:SoftpubInitialize.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #2 from Juan Lang juan_lang@yahoo.com 2008-03-13 13:03:24 --- Created an attachment (id=11357) --> (http://bugs.winehq.org/attachment.cgi?id=11357) Patch to implement SoftpubInitialize
This should fix the first crash.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #3 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-03-14 02:14:43 ---
Patch to implement SoftpubInitialize
This should fix the first crash.
Yip, now it runs into the next one ;)
Unhandled exception: unimplemented function softpub.dll.SoftpubLoadMessage called in 32-bit code (0x7b8419c8).
http://bugs.winehq.org/show_bug.cgi?id=11973
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |juan_lang@yahoo.com
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2008-03-14 10:28:26 --- Could you post a +wintrust log? I get a crash in wininet before getting to this point, so I'm unable to help test.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #5 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-03-14 10:37:54 --- Created an attachment (id=11376) --> (http://bugs.winehq.org/attachment.cgi?id=11376) +wintrust log
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #6 from Juan Lang juan_lang@yahoo.com 2008-03-14 11:22:03 --- Okay, that GUID (31d1adc1-d329-11d1-8ed8-0080c76516c6) is registered during the installation of the .NET 2.0 framework, according to the registry log I found here: http://blogs.msdn.com/astebner/archive/2005/08/13/451338.aspx
If you look closely at the log, you'll notice this entry: MSI (s) (18:D0) [09:59:54:250]: Executing op: RegOpenKey(Root=-2147483646,Key=SOFTWARE\Microsoft\Cryptography\Providers\Trust\FinalPolicy{31D1ADC1-D329-11D1-8ED8-0080C76516C6},,BinaryType=0) MSI (s) (18:D0) [09:59:54:250]: Executing op: RegAddValue(Name=$Function,Value=CORPolicyEE,) MSI (s) (18:D0) [09:59:54:250]: Executing op: RegAddValue(Name=$DLL,Value=mscorsec.dll,)
So even if softpub.dll is fleshed out--and copying code from wintrust.dll might just work--it'll still fail unless .NET 2.0 is installed.
http://bugs.winehq.org/show_bug.cgi?id=11973
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #7 from Anastasius Focht focht@gmx.net 2008-03-14 12:03:45 --- Hello,
--- quote --- So even if softpub.dll is fleshed out--and copying code from wintrust.dll might just work--it'll still fail unless .NET 2.0 is installed. --- quote ---
The app *is* .NET based and hence requires .NET 2.0 to be present ;-)
--- quote --- In Windows XP, these functions are not forwarded from softpub.dll to wintrust.dll. --- quote ---
Later windows versions (Vista,..) forward the whole stuff to wintrust. Softpub is left as mere placeholder. For future developments this approach seems feasible for wine too, preventing duplicate code mess.
Regards
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #8 from Juan Lang juan_lang@yahoo.com 2008-03-14 19:07:31 --- (In reply to comment #7)
Later windows versions (Vista,..) forward the whole stuff to wintrust. Softpub is left as mere placeholder.
Ah, good to know. Louis, maybe you want to send a patch that just forwards all of these to wintrust?
http://bugs.winehq.org/show_bug.cgi?id=11973
Rhys McGuckin rhysmcguckin@yahoo.com.au changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rhysmcguckin@yahoo.com.au
--- Comment #9 from Rhys McGuckin rhysmcguckin@yahoo.com.au 2008-03-30 09:15:14 --- I can verify that the softpub.dll in my WinXP redirects all softpub.dll function calls to wintrust.dll. If somebody could write up the patch, I'd be more than happy to test it out.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #10 from Juan Lang juan_lang@yahoo.com 2008-04-10 12:30:56 --- Okay, forwarding patch sent: http://www.winehq.org/pipermail/wine-patches/2008-April/053129.html
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #11 from Juan Lang juan_lang@yahoo.com 2008-04-11 10:55:53 --- The patch has been committed. Could you please retry with latest git?
http://bugs.winehq.org/show_bug.cgi?id=11973
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Crash into Unimplemented |Chatstat crashes into |function |wintrust |softpub.dll.SoftpubInitializ| |e |
--- Comment #12 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-11 15:05:35 --- Juan, I already tried yesterday with your patch. It now crashes in wintrust. That also happened while using native softpub.dll, so that seems ok/consistent.
Instead of opening a new bug i'll change the title of this bug, and attach a backtrace
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #13 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-11 15:13:32 --- Created an attachment (id=12071) --> (http://bugs.winehq.org/attachment.cgi?id=12071) crash log
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #14 from Rhys McGuckin rhysmcguckin@yahoo.com.au 2008-04-12 14:11:38 --- I used the patch. The problem I ran into, which was causing the crash, was that the Cleanup functions (in SoftpubCleanup) are assumed. Once this was this was checked to be not null, the .NET program I was attempting to get worked died from other causes (mainly unimplemented functions in imm32, lz32, etc). It didn't have a problem at all after this. Unfortunately, I'm not near my work computer, otherwise I'd post a patch for the wintrust dll. (Effectively, I simply checked if provData->...->pfnCleanup existed, within the SoftpubCleanup function, if it did, it was executed).
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #15 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-13 06:03:55 ---
Unfortunately, I'm not near my work computer, otherwise I'd post a patch for the wintrust dll.
If you could do so coming week that would be cool! In the end you could send it to wine-patches, if you think it's ok
Once this was this was checked to be not null, the .NET program I was attempting >to get worked died from other causes (mainly unimplemented functions in imm32, >lz32, etc)
That's interesting , i tried run Chatstat with native imm32 and lz32, and i notices it got a tiny bit further, though it still crashed in the end. Could you elaborate a bit more about which functions in imm32 and lz32 you're talking about? I wouldn't be suprized if other .net apps just suffer from these same bugs. Thanls and regards
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #16 from Rhys McGuckin rhysmcguckin@yahoo.com.au 2008-04-13 13:31:45 --- Since I won't be able to get access to it for at least a week, I'm doing what I can off the web source, and from memory.
The function is WINTRUST_DefaultClose() in wintrust_main.c.
152 if (provData) 153 { if (provData->psPfns->pfnCleanupPolicy) { 154 err = provData->psPfns->pfnCleanupPolicy(provData); } 155 WINTRUST_Free(provData->padwTrustStepErrors); 156 WINTRUST_Free(provData->u.pPDSip); 157 WINTRUST_Free(provData->psPfns); 158 WINTRUST_Free(provData); 159 data->hWVTStateData = NULL; 160 }
The problem with this, is it ignores WHY the cleanup policy pointer is null.
This allowed the DungeonRunners Launcher (which uses .NET 2.0) to run into the problem of missing DLL files (I'm not sure why it couldn't even find the native ones): iphlpapi.dll, imm32.dll, lz32.dll and l_intl.nls. This then got to the point where it died due to unimplemented RAS socket functions.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #17 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-13 15:08:20 --- Created an attachment (id=12144) --> (http://bugs.winehq.org/attachment.cgi?id=12144) patch
Hi Rhys, i can confirm that fix of you works, i've generated your comments into an appropriate patch attached here. I don't know anything about wintrust, if you think it's correct, could you pick it up, and send it to wine-patches (with your name and describement of the fix)?
I'm rather keen on getting this fixed, as it affects lots of other .net apps, among others AutoCAD2008 that i'm trying to get running.
http://bugs.winehq.org/show_bug.cgi?id=11973
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #18 from Rhys McGuckin rhysmcguckin@yahoo.com.au 2008-04-16 09:53:13 --- I've submitted a suggestion on a potential solution to wine-devel (http://www.winehq.org/pipermail/wine-devel/2008-April/064918.html), given the problem with crashing of .NET 2.0 through the way DLLs are discovered and loaded.
I've also submitted the above patch at: http://www.winehq.org/pipermail/wine-patches/2008-April/053374.html
I still think there is a potential problem with this, since it is unknown as to why the CleanupPolicy pointer doesn't exist, and I'm unsure as to whether this is default behaviour.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #19 from Juan Lang juan_lang@yahoo.com 2008-04-17 09:56:06 --- Can you check whether the key HKLM\Software\Microsoft\Cryptography\Providers\Trust\Cleanup{31d1adc1-d329-11d1-8ed8-0080c76516c6} exists in the registry? If so, what are its values for $DLL and $Function?
If they're empty, that's why pfnCleanup is NULL. If they're not, the DLL can't be loaded or the function can't be found in it.
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #20 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-17 10:05:21 --- That key Cleanup{31d1adc1-d329-11d1-8ed8-0080c76516c6} does not exist in the registry. There are others, under Cleanup, but this one isn't present. Hope that's enough info
http://bugs.winehq.org/show_bug.cgi?id=11973
--- Comment #21 from Juan Lang juan_lang@yahoo.com 2008-04-17 10:32:43 --- That's enough info to tell me the patch is correct. Rhys, can you resend? --Juan
http://bugs.winehq.org/show_bug.cgi?id=11973
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #22 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2008-04-17 15:56:06 --- Rhys, your patch made it into git, and this bug is basically fixed now. Chatstat still doesn't start properly, but that's another bug, and i think i'll open a new bug for that (later, not today, need some sleep ) Thank you and Juan for your time.
http://bugs.winehq.org/show_bug.cgi?id=11973
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #23 from Alexandre Julliard julliard@winehq.org 2008-04-18 11:04:11 --- Closing bugs reported fixed in 0.9.60.
http://bugs.winehq.org/show_bug.cgi?id=11973
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
http://bugs.winehq.org/show_bug.cgi?id=11973
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Fixed by SHA1| |890c3fd0f62153fc4b6043d2a9b | |148e5f59da7ad Version|unspecified |0.9.57.