https://bugs.winehq.org/show_bug.cgi?id=37783
Bug ID: 37783 Summary: N1MM PLUS Logger crashes on launch. Product: Wine Version: 1.7.33 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: thenels@gmail.com Distribution: ---
Created attachment 50325 --> https://bugs.winehq.org/attachment.cgi?id=50325 The crash report.
When launching N1MM Plus I receive a fatal error. (see attached)
This is a NEW version of the N1MM logging software which was recently ported from COM to .NET.
This is a logging application used by Amateur Radio operators to log their radio contacts, particularly for contests.
This app uses .net framework 4.0. Works fine in windows 7.
Here is a link to the N1MM+ software home page: http://n1mm.hamdocs.com/tiki-index.php
https://bugs.winehq.org/show_bug.cgi?id=37783
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download Status|UNCONFIRMED |NEW URL| |http://n1mm.hamdocs.com/tik | |i-download_file.php?fileId= | |2400 CC| |focht@gmx.net Component|-unknown |ntdll Summary|N1MM PLUS Logger crashes on |N1MM PLUS Logger 1.0 (.NET |launch. |4.0 app) crashes on launch | |(failure to parse | |registration-free | |COM/ActiveX info from app | |manifest) Ever confirmed|0 |1
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello Nelson,
confirming.
Prerequisite: 'winetricks -q dotnet40'
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/N1MM Logger+
$ wine ./N1MMLogger.net.exe ... err:ole:CoGetClassObject class {7de62c46-68f3-4bb6-a44e-a5c49be34208} not registered err:ole:CoGetClassObject no class object {7de62c46-68f3-4bb6-a44e-a5c49be34208} could be created for context 0x1 fixme:shell:URL_ParseUrl failed to parse L"System.Web" ... Unhandled Exception: System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG) ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG) at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.AxHost.EndInit() at N1MMLogger.Net.EntryWindow.InitializeComponent() in C:\Users\Tom\Documents\Visual Studio 2010\Projects\TeamFoundationServer\N1MM Logger on .NET\N1MM Logger.Net\Forms\EntryWindow.Designer.vb:line 3121 at N1MMLogger.Net.EntryWindow..ctor() in C:\Users\Tom\Documents\Visual Studio 2010\Projects\TeamFoundationServer\N1MM Logger on .NET\N1MM Logger.Net\Forms\EntryWindow.vb:line 358 --- End of inner exception stack trace --- at N1MMLogger.Net.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e) in C:\Users\Tom\Documents\Visual Studio 2010\Projects\TeamFoundationServer\N1MM Logger on .NET\N1MM Logger.Net\ApplicationEvents.vb:line 14 at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at N1MMLogger.Net.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 --- snip ---
CLSID '{7de62c46-68f3-4bb6-a44e-a5c49be34208}' is provided by a registration-free COM server, using application manifest.
Relevant part from 'N1MMLogger.net.exe.manifest':
--- snip --- ... <file name="N1MMV12Wave.ocx" asmv2:size="77824" xmlns="urn:schemas-microsoft-com:asm.v1"> <hash xmlns="urn:schemas-microsoft-com:asm.v2"> dsig:Transforms <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> dsig:DigestValueiRJSCqLj5VTBqQtAr/mtyyv0MJI=</dsig:DigestValue> </hash> <typelib tlbid="{81be095e-6f26-47d2-8087-227187ceef38}" version="4.0" helpdir="C:\Program Files (x86)\N1MM Logger+\N1MMV12Wave.hlp" resourceid="0" flags="CONTROL,HASDISKIMAGE" /> <comClass clsid="{7de62c46-68f3-4bb6-a44e-a5c49be34208}" threadingModel="Apartment" tlbid="{81be095e-6f26-47d2-8087-227187ceef38}" progid="N1MMV12Wave.N1MMV12WaveCtrl.1" description="N1MMV12Wave Control" /> </file> ... --- snip ---
Trace log with activation context errors:
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+actctx wine ./N1MMLogger.net.exe >>log.txt 2>&1 ... 002a:trace:actctx:RtlCreateActivationContext 0xfffe1d2c 00000088 002a:trace:actctx:get_manifest_in_module looking for res #0001 in module 0x400000 L"C:\Program Files\N1MM Logger+\N1MMLogger.net.exe" 002a:trace:actctx:get_manifest_in_associated_manifest looking for manifest associated with (null) id 1 002a:trace:actctx:get_manifest_in_manifest_file loading manifest file L"\??\C:\Program Files\N1MM Logger+\N1MMLogger.net.exe.manifest" 002a:trace:actctx:parse_manifest parsing manifest loaded from L"\??\C:\Program Files\N1MM Logger+\N1MMLogger.net.exe.manifest" base dir (null) 002a:trace:actctx:parse_assembly_elem (0xfffe1afc) 002a:warn:actctx:parse_assembly_elem unknown attr L"xsi:schemaLocation"=L"urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" 002a:warn:actctx:parse_assembly_elem unknown attr L"xmlns:asmv1"=L"urn:schemas-microsoft-com:asm.v1" 002a:fixme:actctx:parse_assembly_elem wrong namespace L"urn:schemas-microsoft-com:asm.v2" 002a:fixme:actctx:parse_manifest_buffer failed to parse manifest L"C:\Program Files\N1MM Logger+\N1MMLogger.net.exe.manifest" 002a:trace:actctx:RtlFindActivationContextSectionString 00000001 (null) 2 L"mscoree.dll" 0xfffe1a08 ... 002a:Call ole32.CoCreateInstance(0033d24c,00000000,00000001,018279d8,0033d204) ret=057c36d5 002a:Call ntdll.RtlInitUnicodeString(0033cf20,0033cf72 L"CLSID\{7DE62C46-68F3-4BB6-A44E-A5C49BE34208}") ret=7e867764 002a:Ret ntdll.RtlInitUnicodeString() retval=0033cf20 ret=7e867764 002a:Call ntdll.NtOpenKey(0033cf6c,00020019,0033cf28) ret=7e867780 002a:Ret ntdll.NtOpenKey() retval=c0000034 ret=7e867780 002a:Call ntdll.RtlNtStatusToDosError(c0000034) ret=7e86778b 002a:Ret ntdll.RtlNtStatusToDosError() retval=00000002 ret=7e86778b 002a:Call KERNEL32.FindActCtxSectionGuid(00000001,00000000,00000004,0033d0d8,0033cfbc) ret=7e86d7eb 002a:trace:actctx:RtlFindActivationContextSectionGuid 00000001 (null) 4 {7de62c46-68f3-4bb6-a44e-a5c49be34208} 0x33cfbc 002a:Ret KERNEL32.FindActCtxSectionGuid() retval=00000000 ret=7e86d7eb ... 002a:err:ole:CoGetClassObject class {7de62c46-68f3-4bb6-a44e-a5c49be34208} not registered 002a:err:ole:CoGetClassObject no class object {7de62c46-68f3-4bb6-a44e-a5c49be34208} could be created for context 0x1 002a:Ret ole32.CoCreateInstance() retval=80040154 ret=057c36d5 --- snip ---
You can work around by using following command in application install directory:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/N1MM Logger+
$ wine regsvr32 *.ocx --- snip ---
NOTE: This is just a workaround to allow the app to instantiate the needed ActiveX controls/COM servers by using registry lookup instead of activation context.
$ sha1sum N1MM\ Logger+\ FullInstaller\ 1.0.4350.exe 7d52411ef09032aaaf5f3befd831a9b73929cf57 N1MM Logger+ FullInstaller 1.0.4350.exe
$ du -sh N1MM\ Logger+\ FullInstaller\ 1.0.4350.exe 8.5M N1MM Logger+ FullInstaller 1.0.4350.exe
$ wine --version wine-1.7.33-84-gfecbc88
Regards
https://bugs.winehq.org/show_bug.cgi?id=37783
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |bunglehead@gmail.com
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Interesting, I'll take a look.
https://bugs.winehq.org/show_bug.cgi?id=37783
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- Seems to be a cascade of problems with parsing this manifest:
1) xmlns="urn:schemas-microsoft-com:asm.v2" in assembly element is not supported; 2) 'description' element failed to parse (I removed it for test purposes); 3) dependency Microsoft.Windows.CommonLanguageRuntime is not found which results in context generation failure with STATUS_SXS_CANT_GEN_ACTCTX.
Patching 1) is trivial, I'm looking at 2) currently. Focht, could you help debugging issue 3) when you got time?
P.S. if I make failure to find dependency non-fatal application starts just fine.
https://bugs.winehq.org/show_bug.cgi?id=37783
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bunglehead@gmail.com |wine-bugs@winehq.org
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Issues 1 and 2 are fixed with 37c179794e35bfe4283edfa425efc4e499cc652e and c134466224d0e709ab7ffc206013f79d70fe27d4. Next is dependency lookup failure (issue #3).
https://bugs.winehq.org/show_bug.cgi?id=37783
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello Nikolay,
you are probably referring to this:
Manifest:
--- snip --- ... <dependency> <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true"> <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" /> </dependentAssembly> </dependency> ... --- snip ---
Trace log:
--- snip --- ... 002a:trace:actctx:parse_manifest parsing manifest loaded from L"\??\C:\Program Files\N1MM Logger+\N1MMLogger.net.exe.manifest" base dir (null) 002a:trace:actctx:parse_assembly_elem (0xfff0db8c) ... 002a:warn:actctx:parse_assembly_identity_elem Unsupported yet language attribute (L"neutral") 002a:trace:actctx:parse_assembly_identity_elem name=L"N1MMLogger.net.exe" version=1.0.0.1 arch=L"x86" ... 002a:warn:actctx:parse_expect_no_attr unexpected attr L"dependencyType"=L"preRequisite" 002a:warn:actctx:parse_expect_no_attr unexpected attr L"allowDelayedBinding"=L"true" 002a:trace:actctx:parse_assembly_identity_elem name=L"Microsoft.Windows.CommonLanguageRuntime" version=4.0.30319.0 arch=(null) 002a:trace:actctx:parse_dependent_assembly_elem adding name=L"Microsoft.Windows.CommonLanguageRuntime" version=4.0.30319.0 arch=(null) 002a:warn:actctx:parse_expect_no_attr unexpected attr L"dependencyType"=L"preRequisite" 002a:warn:actctx:parse_expect_no_attr unexpected attr L"allowDelayedBinding"=L"true" 002a:warn:actctx:parse_assembly_identity_elem Unsupported yet language attribute (L"neutral") ... 002a:trace:actctx:lookup_assembly looking for name=L"Microsoft.Windows.CommonLanguageRuntime" version=4.0.30319.0 arch=(null) 002a:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.CommonLanguageRuntime" (4.0.30319.0) 002a:trace:actctx:RtlFindActivationContextSectionString 00000001 (null) 2 L"mscoree.dll" 0xfff0da98 --- snip ---
I couldn't find any documentation how the OS loader handles this but my gut feeling is that .NET/CLR related runtime dependencies ('ClickOnce' manifests) are not supposed to be verified here. It's done by .NET CLR bootstrapper itself.
How about ignoring/skipping .NET related dependencies, that is 'dependentAssembly' with 'dependencyType' and/or 'allowDelayedBinding' set (these are .NET attributes).
http://msdn.microsoft.com/en-us/library/9a30dzbz.aspx
http://msdn.microsoft.com/en-us/library/k26e96zf.aspx
Relying on 'processorArchitecture="msil"' in 'assemblyIdentity' is not safe enough since the CLR "meta" dependency just has name and version.
Regards
https://bugs.winehq.org/show_bug.cgi?id=37783
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- I did some testing on Win8.1 VM and it turns out 'allowDelayedBinding' is what triggers that. When set to true dependency are not checked, but setting it to false make context creation fail.
A testbot run shows that this attribute is not supported on older systems and context fails to create regardless of attribute value. I'll have to test more but now the question is mostly does this application version run on WinXP at all or not. Probably Nelson knows that.
https://bugs.winehq.org/show_bug.cgi?id=37783
--- Comment #7 from Nelson Winter thenels@gmail.com --- Gentlemen, Today I installed the N1MM Logger+ on a Windows XP box. Seems to execute just fine.
Thanks to everyone who is assisting to resolve the issues and get it working under WINE without the need for 'workarounds'.
Nelson Winter - NE4LS
https://bugs.winehq.org/show_bug.cgi?id=37783
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |7a612654dc12d82429405ecf71c | |525fb4460b597 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #8 from Nikolay Sivov bunglehead@gmail.com --- This is working now after commit 7a612654dc12d82429405ecf71c525fb4460b597.
https://bugs.winehq.org/show_bug.cgi?id=37783
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.34.