http://bugs.winehq.org/show_bug.cgi?id=18798
Summary: Neuro-Programmer v2.5 unable to start Product: Wine Version: 1.1.23 Platform: PC URL: http://www.transparentcorp.com/downloads/NP2_Installer .exe OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: bunglehead@gmail.com
Created an attachment (id=21577) --> (http://bugs.winehq.org/attachment.cgi?id=21577) Console output
Installation goes fine, without errors.
But trying to start application pops up a messagebox with:
Caption: --- Xenocode Postbuild 2008 --- Text: --- The application was unable to load a required virtual machine component. Please contact the publisher of this application for more information. ---
After closing message box application exits. A console output from start to exit provided.
http://bugs.winehq.org/show_bug.cgi?id=18798
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=18798
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #1 from Anastasius Focht focht@gmx.net 2009-06-05 17:21:26 --- Hello,
looks like Xenocode is very picky about the way how native dlls are being loaded.
--- snip --- ... 0009:trace:module:get_load_order looking for L"C:\Program Files\Neuro-Programmer 2\VmX.dll" 0009:trace:module:get_load_order got hardcoded default for L"C:\Program Files\Neuro-Programmer 2\VmX.dll" ... 0009: create_mapping( access=000f000f, attributes=00000080, protect=00000043, size=00025000, file_handle=0000, objattr={rootdir=0014,sd={control=00000004,owner=<not present>,group=<not present>,sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=10000000,AceFlags=0,Sid={S-1-1-0}}}},name=L"_xvm_mem_708E180A6A058DCDE2E1F8586DD2BA4A_0xE6BEAA6E"} ) 0009: create_mapping() = 0 { handle=0078 } 0009:trace:virtual:NtMapViewOfSection handle=0x78 process=0xffffffff addr=(nil) off=000000000 size=0 access=4 0009: get_mapping_info( handle=0078, access=00000002 ) 0009: get_mapping_info() = 0 { size=00025000, protect=67, header_size=0, base=00000000, mapping=007c, shared_file=0000 } 0009: get_handle_fd( handle=0078 ) 0009: *fd* 0078 -> 91 0009: get_handle_fd() = 0 { type=1, removable=0, access=000f000f, options=00000020 } 0009:trace:virtual:map_view got mem in reserved area 0xdd0000-0xdf5000 0009:trace:virtual:VIRTUAL_DumpView View: 0xdd0000 - 0xdf4fff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0xdd0000 - 0xdf4fff c-rw- 0009:trace:virtual:create_view forcing exec permission on 0xdd0000-0xdf4fff 0009:trace:virtual:NtMapViewOfSection handle=0x78 size=25000 offset=000000000 0009:trace:virtual:NtMapViewOfSection handle=0x24 process=0xffffffff addr=(nil) off=000220000 size=1bf1b access=2 0009: get_mapping_info( handle=0024, access=00000004 ) 0009: get_mapping_info() = 0 { size=01915000, protect=65, header_size=0, base=00000000, mapping=0080, shared_file=0000 } 0009:trace:virtual:map_view got mem in reserved area 0xe00000-0xe1c000 0009:trace:virtual:VIRTUAL_DumpView View: 0xe00000 - 0xe1bfff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0xe00000 - 0xe1bfff c-r-- 0009:trace:virtual:create_view forcing exec permission on 0xe00000-0xe1bfff 0009:trace:virtual:NtMapViewOfSection handle=0x24 size=1c000 offset=000220000 0009: close_handle( handle=0080 ) 0009: close_handle() = 0 0009:trace:virtual:NtFreeVirtualMemory 0xffffffff 0xffc10000 003e0000 4000 0009: release_mutex( handle=0028 ) 0009: release_mutex() = 0 { prev_count=00000001 } 0009:trace:module:load_builtin_dll Trying built-in L"C:\Program Files\Neuro-Programmer 2\VmX.dll" 0009:trace:module:load_builtin_dll Trying built-in L"VmX.dll" 0009:warn:module:load_builtin_dll cannot open .so lib for builtin L"VmX.dll": /opt/wine/wine-install/bin/../lib/wine/vmx.dll.so: cannot open shared object file: No such file or directory 0009:trace:module:load_native_dll Trying native dll L"C:\Program Files\Neuro-Programmer 2\VmX.dll" 0009:warn:module:load_dll Failed to load module L"C:\Program Files\Neuro-Programmer 2\VmX.dll"; status=c0000022 0009:trace:module:load_dll looking for L"user32.dll" in L"C:\Program Files\Neuro-Programmer 2;.;C:\windows\system32;C:\windows\system;C:\windows;C:\Program Files\Neuro-Programmer 2\;C:\windows\system32;C:\windows;" 0009:trace:module:load_dll Found L"C:\windows\system32\user32.dll" for L"user32.dll" at 0x60530000, count=9 ... --- snip ---
Several things happen when a native dll is loaded by OS loader. One of the actions is to create a section for the executable image file.
Corresponding code:
--- snip dlls/ntdll/loader.c --- static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, DWORD flags, WINE_MODREF** pwm ) { ... TRACE("Trying native dll %s\n", debugstr_w(name));
attr.Length = sizeof(attr); attr.RootDirectory = 0; attr.ObjectName = NULL; attr.Attributes = 0; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; size.QuadPart = 0;
status = NtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ, &attr, &size, PAGE_READONLY, SEC_IMAGE, file ); if (status != STATUS_SUCCESS) return status;
module = NULL; status = NtMapViewOfSection( mapping, NtCurrentProcess(), &module, 0, 0, &size, &len, ViewShare, 0, PAGE_READONLY ); ... --- snip dlls/ntdll/loader.c ---
Xenocode hooks NtCreateSection() to actually control/redirect the creation of the section for the executable image file (SEC_IMAGE flags set). Using this hook (and others) it basically injects a PE image from its own resources.
"status=c0000022" indicates the problem, Xenocode didn't like all parameters passed to NtCreateSection() call in this situation, hence it fails.
Xenocode checks certain API parameters in its virtualization layer code for example to convert between real OS and Xenocode virtual handles. It seems the OBJECT_ATTRIBUTES *attr param passed to NtCreateSection() must be NULL at this point for whatever reason. Maybe Xenocode expects exact Windows OS loader behaviour here (remember: they are former M$ engineers, now partnering with M$ and Novell so they might know internals or had access to source code).
Passing NULL attributes makes it happy. Though it might be difficult to prove this incompatibility in internal OS loader behaviour between Wine and Windows using a conformance test. Maybe using a native API hook (like detours) to dump the parameters for that native API between call and return of LoadLibrary() in Windows (or using an strace-NT like tool).
A quick test with NULL attr passed to NtCreateSection() in load_native_dll() shows it successfully proceeds and maps the dll. This is the only parameter required to change, all others seem fine.
--- snip --- ... 0009:trace:module:load_dll looking for L"C:\Program Files\Neuro-Programmer 2\VmX.dll" in L"C:\Program Files\Neuro-Programmer 2;.;C:\windows\system32;C:\windows\system;C:\windows;C:\Program Files\Neuro-Programmer 2\;C:\windows\system32;C:\windows;" ... 0009:trace:module:get_load_order looking for L"C:\Program Files\Neuro-Programmer 2\VmX.dll" 0009:trace:module:get_load_order got hardcoded default for L"C:\Program Files\Neuro-Programmer 2\VmX.dll" ... 0009: create_mapping( access=000f000f, attributes=00000080, protect=00000043, size=00025000, file_handle=0000, objattr={rootdir=0014,sd={control=00000004,owner=<not present>,group=<not present>,sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=10000000,AceFlags=0,Sid={S-1-1-0}}}},name=L"_xvm_mem_708E180A6A058DCDE2E1F8586DD2BA4A_0xE6BEAA6E"} ) 0009: create_mapping() = 0 { handle=0078 } 0009:trace:virtual:NtMapViewOfSection handle=0x78 process=0xffffffff addr=(nil) off=000000000 size=0 access=4 0009: get_mapping_info( handle=0078, access=00000002 ) 0009: get_mapping_info() = 0 { size=00025000, protect=67, header_size=0, base=00000000, mapping=007c, shared_file=0000 } 0009: get_handle_fd( handle=0078 ) 0009: *fd* 0078 -> 91 0009: get_handle_fd() = 0 { type=1, removable=0, access=000f000f, options=00000020 } 0009:trace:virtual:map_view got mem in reserved area 0xdd0000-0xdf5000 0009:trace:virtual:VIRTUAL_DumpView View: 0xdd0000 - 0xdf4fff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0xdd0000 - 0xdf4fff c-rw- 0009:trace:virtual:create_view forcing exec permission on 0xdd0000-0xdf4fff 0009:trace:virtual:NtMapViewOfSection handle=0x78 size=25000 offset=000000000 0009:trace:virtual:NtMapViewOfSection handle=0x24 process=0xffffffff addr=(nil) off=000220000 size=1bf1b access=2 0009: get_mapping_info( handle=0024, access=00000004 ) 0009: get_mapping_info() = 0 { size=01915000, protect=65, header_size=0, base=00000000, mapping=0080, shared_file=0000 } 0009:trace:virtual:map_view got mem in reserved area 0xe00000-0xe1c000 0009:trace:virtual:VIRTUAL_DumpView View: 0xe00000 - 0xe1bfff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0xe00000 - 0xe1bfff c-r-- 0009:trace:virtual:create_view forcing exec permission on 0xe00000-0xe1bfff 0009:trace:virtual:NtMapViewOfSection handle=0x24 size=1c000 offset=000220000 0009: close_handle( handle=0080 ) 0009: close_handle() = 0 0009:trace:virtual:NtFreeVirtualMemory 0xffffffff 0xffc10000 003e0000 4000 0009: release_mutex( handle=0028 ) 0009: release_mutex() = 0 { prev_count=00000001 } 0009:trace:module:load_builtin_dll Trying built-in L"C:\Program Files\Neuro-Programmer 2\VmX.dll" 0009:trace:module:load_builtin_dll Trying built-in L"VmX.dll" 0009:warn:module:load_builtin_dll cannot open .so lib for builtin L"VmX.dll": /opt/wine/wine-install/bin/../lib/wine/vmx.dll.so: cannot open shared object file: No such file or directory 0009:trace:module:load_native_dll Trying native dll L"C:\Program Files\Neuro-Programmer 2\VmX.dll" 0009: create_mapping( access=000f0007, attributes=00000000, protect=00000043, size=00026000, file_handle=0000, objattr={rootdir=0000,sd={},name=L""} ) 0009: create_mapping() = 0 { handle=0080 } 0009:trace:virtual:NtMapViewOfSection handle=0x80 process=0xffffffff addr=0x10000000 off=000000000 size=0 access=4 0009: get_mapping_info( handle=0080, access=00000002 ) 0009: get_mapping_info() = 0 { size=00026000, protect=67, header_size=0, base=00000000, mapping=0084, shared_file=0000 } 0009: get_handle_fd( handle=0080 ) 0009: *fd* 0080 -> 92 0009: get_handle_fd() = 0 { type=1, removable=0, access=000f0007, options=00000020 } 0009:trace:virtual:VIRTUAL_DumpView View: 0x10000000 - 0x10025fff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0x10000000 - 0x10025fff c-rw- 0009:trace:virtual:create_view forcing exec permission on 0x10000000-0x10025fff 0009:trace:virtual:NtMapViewOfSection handle=0x80 size=26000 offset=000000000 0009:warn:module:alloc_module disabling no-exec because of L"VmX.dll" ... --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=18798
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |ntdll
http://bugs.winehq.org/show_bug.cgi?id=18798
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2009-06-08 10:02:40 --- Hi, Anastasius.
Commit:
http://source.winehq.org/git/wine.git/?a=commit;h=ae8999f98232a011d8904e3f28...
changes things.
Now application starts up to splash screen and then hangs with message box about missed .net registry keys. I tried to 'winetricks -q dotnet20' and after that it complains that required framework version is 2.0.50727.
Maybe I'm at existing dotnet bug now?
http://bugs.winehq.org/show_bug.cgi?id=18798
--- Comment #3 from Anastasius Focht focht@gmx.net 2009-06-08 13:18:38 --- Hello,
--- quote --- Now application starts up to splash screen and then hangs with message box about missed .net registry keys. I tried to 'winetricks -q dotnet20' and after that it complains that required framework version is 2.0.50727.
Maybe I'm at existing dotnet bug now? --- quote ---
No, it's another bug in Wine native API. The application ships all needed .NET assemblies (CLR) by itself. Xenocode maps .NET assemblies from PE resources, not relying on existing .NET installs in WINEPREFIX - so installing .NET using winetricks won't help here.
The problem is related to registry part of native API which is also completely sandboxed/hooked (managing its own virtualized registry hives), I had a brief look at it but not the time yet to dig deeper.
One has to debug the virtualization layer itself along with adding more diagnostic traces to Wine code to see what's happening (tracing with relay thunks won't work).
You can close this bug because the issue this bug is about is fixed. Open another bug report for next issue you are now encountering.
Regards
http://bugs.winehq.org/show_bug.cgi?id=18798
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18844
http://bugs.winehq.org/show_bug.cgi?id=18798
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2009-06-08 13:45:16 --- Fixed per Anastasius.
http://bugs.winehq.org/show_bug.cgi?id=18798
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com 2009-06-08 13:47:23 --- (In reply to comment #3)
You can close this bug because the issue this bug is about is fixed. Open another bug report for next issue you are now encountering.
Done, thanks.
http://bugs.winehq.org/show_bug.cgi?id=18798
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2009-06-19 11:08:44 --- Closing bugs fixed in 1.1.24.
http://bugs.winehq.org/show_bug.cgi?id=18798
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=18798
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation Fixed by SHA1| |ae8999f98232a011d8904e3f28b | |fa3d6a65ece09
--- Comment #7 from Anastasius Focht focht@gmx.net 2011-12-11 09:22:26 CST --- Hello,
filling fields ...
Regards