[Bug 32452] New: fr-057 demo scene application crashes at start up (custom imports resolver can't cope with some d3dx9_29 functions being forwarded)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Dec 15 07:34:35 CST 2012


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

             Bug #: 32452
           Summary: fr-057 demo scene application crashes at start up
                    (custom imports resolver can't cope with some d3dx9_29
                    functions being forwarded)
           Product: Wine
           Version: 1.5.19
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: directx-d3d
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net
    Classification: Unclassified


Hello folks,

continuation of bug 13401 (which was about msvcrt forwards).
Still crashes, now due to d3dx9_xx forwards.

--- snip ---
...
0024:trace:d3d9:d3d9_device_SetPixelShaderConstantF iface 0x140020, reg_idx 6,
data 0x88ffc74, count 1.
0024:Call wined3d.wined3d_mutex_lock() ret=7e98ff4a
0024:Ret  wined3d.wined3d_mutex_lock() retval=00000000 ret=7e98ff4a
0024:Call
wined3d.wined3d_device_set_ps_consts_f(00175890,00000006,088ffc74,00000001)
ret=7e98ff6d
0024:Ret  wined3d.wined3d_device_set_ps_consts_f() retval=00000000 ret=7e98ff6d
0024:Call wined3d.wined3d_mutex_unlock() ret=7e98ff75
0024:Ret  wined3d.wined3d_mutex_unlock() retval=00000000 ret=7e98ff75
0024:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7e9ed797
ip=7e9ed797 tid=0024
0024:trace:seh:raise_exception  info[0]=00000000
0024:trace:seh:raise_exception  info[1]=ffffffff
0024:trace:seh:raise_exception  eax=088ffce8 ebx=004000e4 ecx=004225d8
edx=00000000 esi=004224db edi=06e600e4
0024:trace:seh:raise_exception  ebp=088ffe38 esp=088ffb6c cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00010246
0024:trace:seh:call_stack_handlers calling handler at 0x7bc9378d code=c0000005
flags=0
0024:Call KERNEL32.UnhandledExceptionFilter(088ff644) ret=7bc937c7
wine: Unhandled page fault on read access to 0xffffffff at address 0x7e9ed797
(thread 0024), starting debugger...
0024:trace:seh:start_debugger Starting debugger "winedbg --auto 35 156" 
--- snip ---

The custom import resolver generated the following table (dumped from memory):

--- snip ---
...
06E60010  7B87970F  OFFSET KERNEL32.AcquireSRWLockExclusive
06E60014  7B8659F4  OFFSET KERNEL32.ExitProcess
06E60018  7B858071  OFFSET KERNEL32.LoadLibraryA
06E6001C  7ECF1D09  OFFSET user32.CreateWindowExA
06E60020  7EC9C433  OFFSET user32.ActivateKeyboardLayout
06E60024  7EC9C433  OFFSET user32.ActivateKeyboardLayout
06E60028  7EC9AA3E  OFFSET user32.GetAsyncKeyState
06E6002C  7ECC8BD8  OFFSET user32.MessageBoxA
06E60030  7EC6C6B8  OFFSET user32.ShowCursor
06E60034  7EC9C433  OFFSET user32.ActivateKeyboardLayout
06E60038  7E986A44  OFFSET d3d9.Direct3DCreate9
06E6003C  7E986F17  OFFSET d3d9.D3DPERF_BeginEvent
06E60040  7E986F17  OFFSET d3d9.D3DPERF_BeginEvent
06E60044  7E986F17  OFFSET d3d9.D3DPERF_BeginEvent
06E60048  7E986F17  OFFSET d3d9.D3DPERF_BeginEvent
06E6004C  7E9ECA10  ASCII "d3dx9_36.D3DXMatrixInverse"
06E60050  7E9ECA2B  ASCII "d3dx9_36.D3DXMatrixLookAtLH"
06E60054  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60058  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E6005C  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60060  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60064  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60068  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E6006C  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60070  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60074  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60078  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E6007C  7E9ECA63  ASCII "d3dx9_36.D3DXMatrixMultiply"
06E60080  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60084  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60088  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E6008C  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60090  7E9ECB22  ASCII "d3dx9_36.D3DXMatrixPerspectiveFovLH"
06E60094  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E60098  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E6009C  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600A0  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600A4  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600A8  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600AC  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600B0  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600B4  7E9ECC9B  ASCII "d3dx9_36.D3DXMatrixRotationYawPitchRoll"
06E600B8  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600BC  7E9ECCE0  ASCII "d3dx9_36.D3DXMatrixScaling"
06E600C0  7E9EAEDC  ASCII "d3dx9_36.D3DXAssembleShader"
06E600C4  7E9ED797  ASCII "d3dx9_36.D3DXVec3Normalize"
06E600C8  7E6C2E2A  OFFSET dsound.DirectSoundCreate
06E600CC  7E38C969  OFFSET msvcrt.MSVCRT__ftol
06E600D0  7E38C1ED  OFFSET msvcrt.MSVCRT_cos
06E600D4  7E38CD5F  OFFSET msvcrt.MSVCRT_fabs
06E600D8  7E3B2C76  OFFSET msvcrt.MSVCRT_memcpy
06E600DC  7E38C4A3  OFFSET msvcrt.MSVCRT_pow
06E600E0  7E38C512  OFFSET msvcrt.MSVCRT_sin
06E600E4  00000000 
--- snip ---

Everything annotated with "ASCII" means not resolved (in export address table
of the DLL the app links against the RVA points to an ASCII string of the DLL
and symbol name to which it is forwarded).

The 4K demo links against d3dx9_29, loaded modules:

--- snip ---
...
ELF    7e972000-7e9af000    Dwarf           d3d9<elf>
  \-PE    7e980000-7e9af000    \               d3d9
ELF    7e9af000-7e9c8000    Dwarf           libice.so.6
ELF    7e9d5000-7e9ee000    Deferred        d3dx9_29<elf>
  \-PE    7e9e0000-7e9ee000    \               d3dx9_29
--- snip ---

Looking at default forwarding policy of d3dx9_xx modules it doesn't make sense
to break this scheme for this app.
Maybe another mechanism can be created (through .spec annotation) that
automatically creates small stubs to keep apps happy that don't expect
forwarded exports.

$ du -sh arancia.exe 
4.0K    arancia.exe

$ sha1sum arancia.exe 
dc76f37b56981b3f41a6d6e66168df1d971cc4fa  arancia.exe

$ wine --version
wine-1.5.19-152-g7f88250

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