[Bug 35289] Star Wars - The Force Unleashed: launcher crash at start (better diagnostics for missing 'lcms2' support needed)

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jan 3 06:54:43 CST 2014


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

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |dotnet
             Status|UNCONFIRMED                 |NEW
            Summary|Star Wars - The Force       |Star Wars - The Force
                   |Unleashed: launcher crash   |Unleashed: launcher crash
                   |at start                    |at start (better
                   |                            |diagnostics for missing
                   |                            |'lcms2' support needed)
     Ever confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #7 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

fortunately I found an installer 'backup' on the Internet to investigate the
issues.

The game launcher seems to make use of WPF -> at least .NET 3.x is required.

Best option is .NET 3.5 SP1 -> 'winetricks -q dotnet35sp1' in new(!) 32-bit
WINEPREFIX.

The 3rd party installer from this 'backup' additionally installs .NET Framework
4.0 for whatever reasons (doesn't harm).

The first problem is unfortunately hard to diagnose without some expert
knowledge.
Only a message "Internal Execution Engine Error" gets emitted from the .NET
CLR, without managed backtrace.

Using proper JIT debug environment settings and a managed debugger I found the
reason:

--- snip ---
0033b150 f77fb42e [HelperMethodFrame: 0033b150]
System.Diagnostics.Debugger.BreakInternal()
0033b1a0 0e6df3c6 System.Diagnostics.Debugger.Break()
0033b1cc 0e6df19b MS.Internal.Invariant.FailFast(System.String, System.String)
0033b1d4 0c954ad1 MS.Internal.Invariant.Assert(Boolean)
0033b1d8 0e6df12e System.Windows.Media.FontFamily.get_FirstFontFamily()
0033b1fc 0e6df059 System.Windows.Media.FontFamily.get_LineSpacing()
0033b204 0e6df033 System.Windows.Controls.TextBox.GetLineHeight()
0033b220 0e6deefc System.Windows.Controls.TextBox.SetRenderScopeMinMaxHeight()
0033b240 0e6dbd75
System.Windows.Controls.TextBox.MeasureOverride(System.Windows.Size)
0033b278 0e25d06e
System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
...
0033f27c 0d3d6d1f System.Windows.Application.RunDispatcher(System.Object)
0033f288 0d3d68c7 System.Windows.Application.RunInternal(System.Windows.Window)
0033f2a0 0d3d6744 System.Windows.Application.Run(System.Windows.Window)
0033f2b0 0d3d670a System.Windows.Application.Run()
0033f2bc 032590a8 Launcher.App.Main()
0033f4e8 79e71b4c [GCFrame: 0033f4e8]
--- snip ---

That's bug 32323 -> 'winetricks corefonts'

After applying the recipe it still crashes.

Relevant part of trace log:

--- snip ---
...
002d:Call KERNEL32.LoadLibraryExW(03424898
L"C:\\windows\\assembly\\GAC_32\\PresentationCore\\3.0.0.0__31bf3856ad364e35\\mscms.dll",00000000,00000008)
ret=79f4cdc5
002d:Call PE DLL (proc=0x7d852054,module=0x7d840000
L"mscms.dll",reason=PROCESS_ATTACH,res=(nil))
002d:trace:mscms:DllMain (0x7d840000, 1, (nil))
002d:Call KERNEL32.DisableThreadLibraryCalls(7d840000) ret=7d84dbc7
002d:Ret  KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7d84dbc7
002d:Ret  PE DLL (proc=0x7d852054,module=0x7d840000
L"mscms.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
002d:Ret  KERNEL32.LoadLibraryExW() retval=7d840000 ret=79f4cdc5 
...
002d:Call
mscms.GetStandardColorSpaceProfileW(00000000,73524742,00160648,0033cf48)
ret=0cee11d0
002d:trace:mscms:GetStandardColorSpaceProfileW ( 0x73524742, 0x160648, 0x33cf48
)
002d:trace:mscms:GetColorDirectoryW ( 0x33cc0c, 0x33cc08 )
002d:Call KERNEL32.GetSystemDirectoryW(0033c998,00000104) ret=7d84eba6
002d:Ret  KERNEL32.GetSystemDirectoryW() retval=00000013 ret=7d84eba6
002d:Ret  mscms.GetStandardColorSpaceProfileW() retval=00000001 ret=0cee11d0 
...
002d:Call mscms.OpenColorProfileA(03434d08,00000001,00000001,00000003)
ret=0cee327e
002d:trace:mscms:OpenColorProfileA ( 0x3434d08, 0x00000001, 0x00000001,
0x00000003 )
002d:Ret  mscms.OpenColorProfileA() retval=00000000 ret=0cee327e 
...
002d:Call KERNEL32.RaiseException(e0434f4d,00000001,00000001,0033cdc0)
ret=79eda91c
002d:trace:seh:raise_exception code=e0434f4d flags=1 addr=0x7b83a89f
ip=7b83a89f tid=002d
002d:trace:seh:raise_exception  info[0]=80070000
002d:trace:seh:raise_exception  eax=7b826921 ebx=7b8ba000 ecx=80070000
edx=0033ccf4 esi=0033cda0 edi=0033cd60
002d:trace:seh:raise_exception  ebp=0033cd38 esp=0033ccd4 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00000283
002d:trace:seh:call_stack_handlers calling handler at 0x79f908a2 code=e0434f4d
flags=1
002d:trace:seh:call_stack_handlers handler at 0x79f908a2 returned 1
002d:trace:seh:call_stack_handlers calling handler at 0x79fb4869 code=e0434f4d
flags=1 
...
002d:Call user32.MessageBoxW(00020078,00cc7168 L"Unexpected condition found in
WL function: System.Runtime.InteropServices.COMException (0x80070000):
Exception from HRESULT: 0x80070000\r\n   at
System.Windows.Media.ColorContextHelper.OpenColorProfile(IntPtr pProfile)\r\n  
at System.Windows.Media.ColorContext.FromRawBytes(Byte[] data, Int32
dataLen"...,00bdff60 L"Launcher",00000010) ret=0cee3353 
--- snip ---

The .NET CLR runtime passes a profile with 'PROFILE_MEMBUFFER' type.

Source:
http://source.winehq.org/git/wine.git/blob/45191c542cb46cf57f8ac20cc3d43819e9f17993:/dlls/mscms/profile.c#l1338

--- snip ---
1338 HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD
sharing, DWORD creation )
1339 {
1340     HPROFILE handle = NULL;
1341
1342     TRACE( "( %p, 0x%08x, 0x%08x, 0x%08x )\n", profile, access, sharing,
creation );
1343
1344     if (!profile || !profile->pProfileData) return NULL;
1345
1346     /* No AW conversion needed for memory based profiles */
1347     if (profile->dwType & PROFILE_MEMBUFFER)
1348         return OpenColorProfileW( profile, access, sharing, creation );
1349 
...
1394 HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD
sharing, DWORD creation )
1395 {
1396 #ifdef HAVE_LCMS2
1397     cmsHPROFILE cmsprofile = NULL;
...
1496 #endif /* HAVE_LCMS2 */
1497 return NULL;
1498 }
--- snip ---

Wine was built without optional 'lcms2' support on my machine hence the silent
failure (32-bit and 64-bit 'devel' packages were not installed).

Your backtraces show there is no 'liblcms2' mapped hence this could be very
well the same problem.
If lcms2 support is present the list of shared libraries mapped in process
address space should contain an entry like this:

--- snip ---
ELF    7b4aa000-7b500000    Deferred        liblcms2.so.2
--- snip ---

I suggest that Wine outputs some "lcms2 support missing - expect problems"
message in '#else' path or better in central place - on startup (dllmain) so
this kind of problem can be better diagnosed in future.

With that bug fixed (rebuilding with 32-bit and 64-bit lcms2 support) it will
run into bug 34764 -> 'winetricks windowscodecs'

--- snip ---
002f:fixme:wincodecs:IMILUnknown2Impl_UnknownMethod1 (0x34577c8,0x1,0xe1ad928):
stub
002f:fixme:wincodecs:IMILUnknown2Impl_UnknownMethod1 (0x34577c8,0x1,0xe1ad8f4):
stub
002f:trace:seh:raise_exception code=c0000005 flags=0 addr=(nil) ip=00000000
tid=002f
002f:trace:seh:raise_exception  info[0]=00000000
002f:trace:seh:raise_exception  info[1]=00000000
002f:trace:seh:raise_exception  eax=7ca922a4 ebx=034b1d90 ecx=034577b8
edx=00000000 esi=034b1e38 edi=0e1ad940
002f:trace:seh:raise_exception  ebp=0e1ad904 esp=0e1ad8f4 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00010206 
--- snip ---

With that recipe applied it still fails on missing X3DAudio prerequisites:

--- snip ---
err:module:import_dll Library X3DAudio1_6.dll (which is needed by L"C:\\Program
Files\\...\\SWTFU.exe") not found
--- snip ---

-> 'winetricks xact'

With X3DAudio components installed the launcher finally shows up.
The game can now be started from launcher (already tested).

Regards

-- 
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