Jens Gulden
2006-Sep-20 15:57 UTC
[Wine] kernel32.VirtualAlloc() limitation? - "Insufficient memory to perform operation"
Hello, capserve.exe is part of Adobe Acrobat 5's PaperCapture plugin. Runnning "wine capserve.exe" I get an error saying "Insufficient memory to perform operation" (although all runs fine under Windows). It seems that several calls to kernel32.VirtualAlloc(), ntdll.NtAllocateVirtualMemory() and related functions are executed right before the error message is issued. See the log-output below, with WINEDEBUG=+all. Could there be a problem with allocating virtual memory in Wine? Maybe the issue discussed under http://www.winehq.com/hypermail/wine-devel/2005/03/0662.html is related to this? I sent a mail on this before (http://www.winehq.com/pipermail/wine-users/2006-September/023443.html), but now had time to look deeper into this. A blank screen, as mentioned in my first posting, does not appear when wine is compiled with --without-opengl (while the memory-error still appears). wine 0.9.21, gcc 3.3.6, kernel 2.6.15 (Debian), dual-boot WinXP (but not used for Wine), PaperCapture plugin is available at http://www.adobe.com/support/downloads/detail.jsp?ftpID=1907 Thanks a lot for hints, Jens output with WINEDEBUG=+all: [... 362114 lines skipped ...] 0009:Call kernel32.InterlockedIncrement(046b6a24) ret=00415628 0009:Ret kernel32.InterlockedIncrement() retval=00000001 ret=00415628 0009:Call ole32.CoRegisterClassObject(00541fe8,046b6a20,00000004,00000000,046b6a0c) ret=0047426e 0009:trace:ole:CoRegisterClassObject ({9b265782-ec11-11d1-a73e-00c04fb61fab},0x46b6a20,0x00000004,0x00000000,0x46b6a0c) 0009:Call ntdll.RtlAllocateHeap(00110000,00000000,00000028) ret=7ea00a40 0009:trace:heap:RtlAllocateHeap (0x110000,00000002,00000028): returning 0x1891e0 0009:Ret ntdll.RtlAllocateHeap() retval=001891e0 ret=7ea00a40 0009:Call kernel32.InterlockedIncrement(046b6a24) ret=00415628 0009:Ret kernel32.InterlockedIncrement() retval=00000002 ret=00415628 0009:Call ntdll.memcmp(7ea56d6c,005488b0,00000010) ret=004155dc 0009:Ret ntdll.memcmp() retval=00000001 ret=004155dc 0009:Call ntdll.memcmp(7ea56d6c,005488d0,00000010) ret=004155f2 0009:Ret ntdll.memcmp() retval=ffffffff ret=004155f2 0009:Ret ole32.CoRegisterClassObject() retval=80004002 ret=0047426e 0009:CALL SHW32.MemFreePtr(0464d3b8) ret=00534d7e 0009:RET SHW32.MemFreePtr() retval=00000001 ret=00534d7e 0009:Call user32.ShowCursor(00000000) ret=00513c21 0009:trace:cursor:ShowCursor 0, count=2 0009:Ret user32.ShowCursor() retval=00000001 ret=00513c21 0009:Call user32.SetCursor(000010f6) ret=00513bdb 0009:trace:cursor:SetCursor 0x10f6 0009:Call kernel32.25(000010f6) ret=7ed2b5ce 0009:Ret kernel32.25() retval=0016f490 ret=7ed2b5ce 0009:Call winex11.drv.SetCursor(0016f490) ret=7ed2b5df 0009:Call kernel32.TlsGetValue(00000001) ret=7e46cfd7 0009:Ret kernel32.TlsGetValue() retval=0016af00 ret=7e46cfd7 0009:trace:cursor:create_cursor Bitmap 32x32 planes=1 bpp=1 bytesperline=4 0009:Ret winex11.drv.SetCursor() retval=00000000 ret=7ed2b5df 0009:Call kernel32.26(000010f6) ret=7ed2b5e7 0009:trace:global:GlobalUnlock16 10f6 0009:Ret kernel32.26() retval=00000000 ret=7ed2b5e7 0009:Ret user32.SetCursor() retval=00001136 ret=00513bdb 0009:Call kernel32.GetTickCount() ret=00513b5d 0009:Call ntdll.NtGetTickCount() ret=7ee6ba69 0009:Ret ntdll.NtGetTickCount() retval=00000fdf ret=7ee6ba69 0009:Ret kernel32.GetTickCount() retval=00000fdf ret=00513b5d 0009:Call user32.PeekMessageA(007ffdd8,00000000,00000000,00000000,00000003) ret=00513b8c 0009:Call kernel32.94(7ede11c0) ret=7ed96e72 0009:Ret kernel32.94() retval=00000009 ret=7ed96e72 0009:Call winex11.drv.MsgWaitForMultipleObjectsEx(00000000,00000000,00000000,000004ff,00000000) ret=7ed749cf 0009:Call kernel32.TlsGetValue(00000001) ret=7e46239a 0009:Ret kernel32.TlsGetValue() retval=0016af00 ret=7e46239a 0009:Ret winex11.drv.MsgWaitForMultipleObjectsEx() retval=00000102 ret=7ed749cf 0009: get_message( flags=1, get_win=(nil), get_first=00000000, get_last=ffffffff, hw_id=00000000 ) 0009: get_message() = PENDING { type=0, win=(nil), msg=00000000, wparam=0, lparam=0, info=0, x=0, y=0, hook=(nil), hook_proc=(nil), time=00000000, hw_id=00000000, active_hooks=80000000, total=0, data={} } 0009:Call ntdll.RtlFreeHeap(00110000,00000000,00000000) ret=7ed733a9 0009:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7ed733a9 0009:Ret user32.PeekMessageA() retval=00000000 ret=00513b8c 0009:CALL SHW32.MemFreePtr(045d1b60) ret=00534d7e 0009:RET SHW32.MemFreePtr() retval=00000001 ret=00534d7e 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=0464d3b8 ret=00534bd7 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046b6a30 ret=00534bd7 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000001,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=0464d580 ret=00534bd7 0009:Call ntdll.strlen(045d18d0 "") ret=004f2a12 0009:Ret ntdll.strlen() retval=00000000 ret=004f2a12 0009:CALL SHW32.MemFreePtr(0464d580) ret=00534d7e 0009:RET SHW32.MemFreePtr() retval=00000001 ret=00534d7e 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046b6a78 ret=00534bd7 0009:Call ntdll.strcpy(046b6a78,045d18d0 "") ret=004f2a5a 0009:Ret ntdll.strcpy() retval=046b6a78 ret=004f2a5a 0009:Call ntdll.strlen(046b6a78 "") ret=004f2a62 0009:Ret ntdll.strlen() retval=00000000 ret=004f2a62 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046b6ac0 ret=00534bd7 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046b6b08 ret=00534bd7 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046b6b50 ret=00534bd7 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000041,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046b6b98 ret=00534bd7 0009:CALL SHW32.MemFreePtr(046b6b08) ret=00534d7e 0009:RET SHW32.MemFreePtr() retval=00000001 ret=00534d7e 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000201,00000000) ret=00534bd7 0009:RET SHW32.MemAllocPtr() retval=046100c8 ret=00534bd7 0009:CALL SHW32.MemFreePtr(046b6b50) ret=00534d7e 0009:RET SHW32.MemFreePtr() retval=00000001 ret=00534d7e 0009:CALL SHW32.shi_getThreadPool() ret=00534bc9 0009:Call kernel32.GetCurrentThreadId() ret=0a93d090 0009:Ret kernel32.GetCurrentThreadId() retval=00000009 ret=0a93d090 0009:RET SHW32.shi_getThreadPool() retval=045c0000 ret=00534bc9 0009:CALL SHW32.MemAllocPtr(045c0000,00000201,00000000) ret=00534bd7 0009:Call kernel32.VirtualAlloc(00000000,00010000,00002000,00000001) ret=0a937689 0009:Call ntdll.NtAllocateVirtualMemory(ffffffff,007ffbc0,00000000,007ffbd8,00002000,00000001) ret=7eead507 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 00010000 2000 00000001 0009:trace:virtual:map_view got mem in reserved area 0x46e0000-0x46f0000 0009:trace:virtual:VIRTUAL_DumpView View: 0x46e0000 - 0x46effff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0x46e0000 - 0x46effff ----- 0009:Ret ntdll.NtAllocateVirtualMemory() retval=00000000 ret=7eead507 0009:Ret kernel32.VirtualAlloc() retval=046e0000 ret=0a937689 0009:Call kernel32.VirtualAlloc(046e0000,00004000,00001000,00000004) ret=0a93769a 0009:Call ntdll.NtAllocateVirtualMemory(ffffffff,007ffbc0,00000000,007ffbd8,00001000,00000004) ret=7eead507 0009:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x46e0000 00004000 1000 00000004 0009:trace:virtual:VIRTUAL_SetProt 0x46e0000-0x46e3fff c-rw- 0009:trace:virtual:VIRTUAL_DumpView View: 0x46e0000 - 0x46effff (valloc) 0009:trace:virtual:VIRTUAL_DumpView 0x46e0000 - 0x46e3fff c-rw- 0009:trace:virtual:VIRTUAL_DumpView 0x46e4000 - 0x46effff ----- 0009:Ret ntdll.NtAllocateVirtualMemory() retval=00000000 ret=7eead507 0009:Ret kernel32.VirtualAlloc() retval=046e0000 ret=0a93769a 0009:RET SHW32.MemAllocPtr() retval=046e3df0 ret=00534bd7 0009:Call user32.LoadStringA(00400000,00003a98,007ff95c,000003e7) ret=00512ba0 0009:trace:resource:LoadStringA instance = 0x400000, id = 3a98, buffer = 0x7ff95c, length = 999 0009:Call ntdll.RtlAllocateHeap(00110000,00000000,000007ce) ret=7ed8156f 0009:trace:heap:RtlAllocateHeap (0x110000,00000002,000007ce): returning 0x1873c8 0009:Ret ntdll.RtlAllocateHeap() retval=001873c8 ret=7ed8156f 0009:trace:resource:LoadStringW instance = 0x400000, id = 3a98, buffer = 0x1873c8, length = 999 0009:Call kernel32.FindResourceW(00400000,000003aa,00000006) ret=7ed81382 0009:trace:resource:FindResourceExW 0x400000 #0006 #03aa 0000 0009:Call ntdll.LdrFindResource_U(00400000,007ff6f0,00000003,007ff62c) ret=7ee9611c 0009:trace:resource:LdrFindResource_U module 0x400000 type #0006 name #03aa lang 0000 level 3 0009:trace:resource:find_entry_by_id root 0x5da000 dir 0x5da000 id 0006 ret 0x5da148 0009:trace:resource:find_entry_by_id root 0x5da000 dir 0x5da148 id 03aa ret 0x5da7e8 0009:trace:resource:find_entry_by_id root 0x5da000 dir 0x5da7e8 id 0000 not found 0009:trace:resource:find_entry_by_id root 0x5da000 dir 0x5da7e8 id 0409 ret 0x5dac08 0009:Ret ntdll.LdrFindResource_U() retval=00000000 ret=7ee9611c 0009:Ret kernel32.FindResourceW() retval=005dac08 ret=7ed81382 0009:Call kernel32.LoadResource(00400000,005dac08) ret=7ed8139b 0009:trace:resource:LoadResource 0x400000 0x5dac08 0009:Call ntdll.LdrAccessResource(00400000,005dac08,007ff768,00000000) ret=7ee97495 0009:Ret ntdll.LdrAccessResource() retval=00000000 ret=7ee97495 0009:Ret kernel32.LoadResource() retval=005e1bf0 ret=7ed8139b 0009:Call kernel32.LockResource(005e1bf0) ret=7ed813b0 0009:trace:resource:LockResource (0x5e1bf0) 0009:Ret kernel32.LockResource() retval=005e1bf0 ret=7ed813b0 0009:trace:resource:LoadStringW strlen = 41 0009:trace:resource:LoadStringW L"Insufficient Memory to Perform Operation." loaded ! [... 124112 lines following ...]
Dan Kegel
2006-Sep-29 08:24 UTC
[Wine] re: kernel32.VirtualAlloc() limitation? - "Insufficient memory to perform operation"
Jens wrote:> capserve.exe is part of Adobe Acrobat 5's PaperCapture plugin. > Runnning "wine capserve.exe" I get an error saying > "Insufficient memory to perform operation" (although all runs fine under Windows). > >It seems that several calls to kernel32.VirtualAlloc() ... are executed right > before the error message is issued. See the log-output below, with > WINEDEBUG=+all.Please file a bug at http://bugs.winehq.org for this, with a description like "Adobe Acrobat 5's PaperCapture plugin fails on VirtualAlloc?" In the body, include the exact error message text, and attach the log fragment you posted. Thanks! - Dan