[Bug 34842] New: Garmin BaseCamp 4.1.2 sometimes fails to run when late-bound riched20.dll preferred load base address is already occupied and PE mapped into >2 GiB address range

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Nov 2 06:34:59 CDT 2013


http://bugs.winehq.org/show_bug.cgi?id=34842

             Bug #: 34842
           Summary: Garmin BaseCamp 4.1.2 sometimes fails to run when
                    late-bound riched20.dll preferred load base address is
                    already occupied and PE mapped into >2 GiB address
                    range
           Product: Wine
           Version: 1.7.5
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ntdll
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net
    Classification: Unclassified


Hello folks,

Garmin BaseCamp 4.1.2 runs pretty good with MS .NET Framework 3.5 installed.

There are (albeit rare) cases of startup failures when Wine loader fails to map
builtin RichEd20.dll to its preferred load base address because it is already
taken by another module.

RichEd20 needs a load address in lower 2 GiB virtual address space.
See bug 22551 "Multiple .NET apps fail to load riched20.dll into memory (.NET
Framework/Windows Forms wants riched20.dll loaded into lower 2GiB address space
range)" for info.

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/Garmin/BaseCamp
...
$ wine ./BaseCamp.exe
...
err:eventlog:ReportEventW L"clr20r3"
err:eventlog:ReportEventW L"basecamp.exe"
err:eventlog:ReportEventW L"4.1.2.0"
err:eventlog:ReportEventW L"5134f30b"
err:eventlog:ReportEventW L"system.windows.forms"
err:eventlog:ReportEventW L"2.0.0.0"
err:eventlog:ReportEventW L"471ebf68"
err:eventlog:ReportEventW L"4ecd"
err:eventlog:ReportEventW L"5b"
err:eventlog:ReportEventW L"system.componentmodel.win32"
err:eventlog:ReportEventW L"NIL"
fixme:advapi:DeregisterEventSource (0xcafe4242) stub
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
err:ole:CoInitializeEx Attempt to change threading model of this apartment from
multi-threaded to apartment threaded
fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
fixme:richedit:ME_HandleMessage EM_SETMARGINS: stub
err:ole:CoUninitialize Mismatched CoUninitialize
err:ole:CoUninitialize Mismatched CoUninitialize

Unhandled Exception: System.ComponentModel.Win32Exception: Cannot load the
"RichEd20.DLL" DLL into memory.
   at System.Windows.Forms.RichTextBox.get_CreateParams()
   at System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
   at System.Windows.Forms.TextBoxBase..ctor()
   at System.Windows.Forms.RichTextBox..ctor()
   at bc.FatalErrorDialog_t.InitializeComponent()
   at
bc.FatalErrorDialog_t..ctor(basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>* aAppName)
   at bc.FatalError_t.Display(SByte* aFilename, UInt16 aLineNumber,
basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t> >*
aWhat, basic_string<char\,std::char_traits<char>\,std::allocator<char> >*
aSubId,
Optional_t<std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
> >* aOpenGLVersion,
vector<std::pair<std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>\,std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>
>\,std::allocator<std::pair<std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>\,std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
> > > >* aFileList)
   at bc.FatalError_t..ctor(Exception aException,
Optional_t<std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
> >* aOpenGLVersion,
vector<std::pair<std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>\,std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>
>\,std::allocator<std::pair<std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
>\,std::basic_string<wchar_t\,std::char_traits<wchar_t>\,std::allocator<wchar_t>
> > > >* aFileList)
   at main(String[] aArgs)
   at mainCRTStartupStrArray(String[] arguments)
wine: Unhandled exception 0xe0434f4d in thread 33 at address 0x7b83a8bf (thread
0033), starting debugger...
--- snip ---

RichEd20.dll has a preferred load address:

--- snip ---
EXTRADLLFLAGS = -Wl,--image-base,0x7ac00000 
--- snip ---

Address space layout in case of collision:

--- snip ---
Module    Address            Debug info    Name (139 modules)
PE      340000-  362000    Deferred        zlibwapi
PE      400000- 25a7000    Deferred        basecamp
PE     25b0000- 278d000    Deferred        xerceslib
PE     2790000- 2bc6000    Deferred        ogckml
PE     2df0000- 337f000    Export          mscorwks
PE     e610000- e6ae000    Deferred        system.drawing
PE     e9c0000- ecb2000    Deferred        system
PE     f270000- f73a000    Deferred        system.windows.forms
PE    10000000-100e5000    Deferred        exiv2
PE    5e3a0000-5e42d000    Deferred        diasymreader
PE    60000000-60008000    Deferred        accessibility
PE    637a0000-6399c000    Deferred        system.xml
PE    64020000-64033000    Deferred        mscorsec
PE    64890000-648fc000    Deferred        system.configuration
PE    67510000-6756e000    Deferred        system.management
PE    6a310000-6a31a000    Deferred        wminet_utils
PE    74e60000-74e79000    Deferred        wmiutils
PE    78130000-781cb000    Deferred        msvcr80
PE    783f0000-78433000    Deferred        msvcm90
PE    79000000-79046000    Export          mscoree
PE    79060000-790b6000    Deferred        mscorjit
PE    790c0000-79500000    Deferred        mscorlib
ELF    79afa000-7b800000    Deferred        libnvidia-glcore.so.304.108
ELF    7b800000-7ba60000    Dwarf           kernel32<elf>
  \-PE    7b810000-7ba60000    \               kernel32
...
ELF    f6a22000-f6a89000    Deferred        riched20<elf>
  \-PE    f6a30000-f6a89000    \               riched20
--- snip ---

"libnvidia-glcore.so.304.108" took the place earlier and "riched20.dll" was
mapped into > 2 GiB address space which .NET runtime doesn't like.

Maybe Wine loader could try to map dlls which have requirements of preferred
load address always in < 2 GiB address range for Windows compatiblity.

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list