WineHQ
Bug Tracking Database – Bug 23472

 Bugzilla

 

Last modified: 2013-12-20 12:42:48 UTC  

PokerStars crashes/UI remains unresponsive on startup

Bug 23472 - PokerStars crashes/UI remains unresponsive on startup
PokerStars crashes/UI remains unresponsive on startup
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: shell32
1.2-rc5
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://www.pokerstars.eu/en/poker/dow...
: download
: 27198 30555 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-07-02 09:56 UTC by Michael Cairns
Modified: 2013-12-20 12:42 UTC (History)
4 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: b5312b70f5c160b3aa3d374256f71ad4aa1f98e6
Distribution: ---
Staged patchset:


Attachments
CreateToolhelp32Snapshot Unimplemented (216 bytes, text/plain)
2010-07-02 09:56 UTC, Michael Cairns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Cairns 2010-07-02 09:56:24 UTC
Created attachment 29294 [details]
CreateToolhelp32Snapshot Unimplemented

I am attempting to run PokerStars with PokerStarsHotKeys.  I was able to do this with out a problem on 7.04.  I decided it was time for an update but PS continues to crash.  I'd rather not revert back but if its necessary I'll go that route. 

PokerStars will crash when I open a new window.  It will crash if it hangs on a window.  It will crash if I go into a menu list.  It basically crashes when it wants.

I am in communication with PS but I'm sure you would want to know about this problem.

Thank you for all your work.

Michael
Comment 1 Austin English 2010-07-02 10:12:23 UTC
Does native comctl32 help? 'winetricks cc580'
Comment 2 Vitaliy Margolen 2010-07-02 16:52:27 UTC
Don't see a crash in your attachment. Attach complete terminal output showing the crash you are talking about.

What version of PokerStars are you running?
Comment 3 jeff 2010-09-28 17:45:18 UTC
Im seeing the same errors when I run ps.  It seems to crash randomly when there is a popup window like login, or lobby filters or buyin etc.  I'm running ubuntu 10.04 and have tried wine 1.1.41 and 1.2 with the same problem.  Pokerstars is always the latest version, of course.

fixme:heap:HeapSetInformation 0x950000 0 0x33fd6c 4
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:resource:GetGuiResources (0xffffffff,1): stub


These errors show up in terminal after the checking for updates window and before the lobby appears.  If left alone the lobby runs fine.  Like I said before I believe its something to do with popup windows.
Comment 4 butraxz 2013-05-29 11:34:45 UTC
This has not been updated for over 900 days. 

Is this still an issue in 1.5.31 or higher or is this abandoned ?
Comment 5 Anastasius Focht 2013-12-10 13:30:56 UTC
*** Bug 27198 has been marked as a duplicate of this bug. ***
Comment 6 Anastasius Focht 2013-12-10 13:31:33 UTC
*** Bug 30555 has been marked as a duplicate of this bug. ***
Comment 7 Anastasius Focht 2013-12-10 14:18:04 UTC
Hello folks,

rechristening the bug for the current problem.
The original problem was probably not present anymore.

The symptom is that either nothing happens (only few FIXME messages in terminal which are harmless) or a small "shrunk" main window is shown on startup that can be resized but no further GUI interaction is possible.

A Wine bug causes an exception but unfortunately the application internal 'global' exception handler eats this silently away (just logging it) which does more harm than good in the end.

--- snip ----
...
0024:Call winex11.drv.WindowPosChanged(0001007c,00000000,00000014,0033c290,0033c290,0033c0c8,00000000,00000000) ret=7eb6e3f1
0024:Ret  winex11.drv.WindowPosChanged() retval=00000000 ret=7eb6e3f1
0024:trace:win:WIN_CreateWindowEx hwnd 0x1007c cs 0,0 0x0
0024:Call window proc 0x7e2f1237 (hwnd=0x1007c,msg=WM_NCCREATE,wp=00000000,lp=0033c360)
0024:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7e2f1237 ip=7e2f1237 tid=0024
0024:trace:seh:raise_exception  info[0]=00000001
0024:trace:seh:raise_exception  info[1]=7e2f1237
0024:trace:seh:raise_exception  eax=7e2f1237 ebx=7ebb0000 ecx=00000000 edx=7bceaa08 esi=0033c360 edi=00000001
0024:trace:seh:raise_exception  ebp=0033bf68 esp=0033bf3c cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00210206
0024:trace:seh:call_stack_handlers calling handler at 0xb4a400 code=c0000005 flags=0 
--- snip ---

At the point of crash there is indeed nothing mapped at 0x7e2e4237 or near that range.

Going back in time ... reaching the big bang:

--- snip ---
$  pwd
/home/focht/.wine/drive_c/Program Files/PokerStars.EU

$  WINEDEBUG=+tid,+seh,+relay,+win,+msg,+commctrl,+module wine ./PokerStars.exe >>log.txt 2>&1

...

0024:trace:module:process_attach (L"shell32.dll",(nil)) - START
0024:trace:module:process_attach (L"shlwapi.dll",(nil)) - START
0024:Call PE DLL (proc=0x7e3b5054,module=0x7e370000 L"shlwapi.dll",reason=PROCESS_ATTACH,res=(nil))
0024:Call KERNEL32.DisableThreadLibraryCalls(7e370000) ret=7e3a54cb
0024:Ret  KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7e3a54cb
0024:Call KERNEL32.TlsAlloc() ret=7e3a54db
0024:Ret  KERNEL32.TlsAlloc() retval=00000002 ret=7e3a54db
0024:Ret  PE DLL (proc=0x7e3b5054,module=0x7e370000 L"shlwapi.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
0024:trace:module:process_attach (L"shlwapi.dll",(nil)) - END
0024:Call PE DLL (proc=0x7e487078,module=0x7e3f0000 L"shell32.dll",reason=PROCESS_ATTACH,res=(nil))
0024:Call KERNEL32.DisableThreadLibraryCalls(7e3f0000) ret=7e42e4ef
0024:Ret  KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7e42e4ef
0024:Call KERNEL32.GetModuleFileNameW(7e3f0000,7e627060,00000104) ret=7e42e50e
0024:trace:module:GetModuleFileNameW L"C:\\windows\\system32\\shell32.dll"
0024:Ret  KERNEL32.GetModuleFileNameW() retval=0000001f ret=7e42e50e
0024:Ret  PE DLL (proc=0x7e487078,module=0x7e3f0000 L"shell32.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
0024:trace:module:process_attach (L"shell32.dll",(nil)) - END
0024:Ret  KERNEL32.LoadLibraryA() retval=7e3f0000 ret=007641c5
0024:Call KERNEL32.GetProcAddress(7e3f0000,00bd53b4 "SetCurrentProcessExplicitAppUserModelID") ret=007641d7
0024:Ret  KERNEL32.GetProcAddress() retval=7e3fc9ec ret=007641d7
0024:Call shell32.SetCurrentProcessExplicitAppUserModelID(00bd4bb8 L"PokerStars.EU.Gui") ret=0076924c
0024:fixme:shell:SetCurrentProcessExplicitAppUserModelID L"PokerStars.EU.Gui": stub
0024:Ret  shell32.SetCurrentProcessExplicitAppUserModelID() retval=80004001 ret=0076924c
0024:Call KERNEL32.FreeLibrary(7e3f0000) ret=0076925e
0024:trace:module:LdrUnloadDll (0x7e3f0000)
0024:trace:module:LdrUnloadDll (L"shell32.dll") - START
0024:trace:module:MODULE_DecRefCount (L"shell32.dll") ldr.LoadCount: 0
0024:trace:module:MODULE_DecRefCount (L"shlwapi.dll") ldr.LoadCount: 0
0024:Call PE DLL (proc=0x7e487078,module=0x7e3f0000 L"shell32.dll",reason=PROCESS_DETACH,res=(nil))
0024:Call KERNEL32.LoadLibraryA(7e4cc04f "comctl32.dll") ret=7e486f96 

--- snip ---

The app calls shell32.SetCurrentProcessExplicitAppUserModelID() which is late-bound -> shell32 dynamically loaded.

During unload of shell32.dll some cleanup takes place.

This causes the first-time load of comctl32.dll (no early binding):

shell32.dll DLL_PROCESS_DETACH -> SIC_Destroy() -> comctl32.ImageList_Destroy

Source: http://source.winehq.org/git/wine.git/blob/b6efcef7a7f005c752621fdce00f059e4af9a23d:/dlls/shell32/shell32_main.c#l1261

--- snip ---
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
    TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad);

    switch (fdwReason)
    {
    case DLL_PROCESS_ATTACH:
        shell32_hInstance = hinstDLL;
        DisableThreadLibraryCalls(shell32_hInstance);

        /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
        GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
        swShell32Name[MAX_PATH - 1] = '\0';

        InitChangeNotifications();
        break;

    case DLL_PROCESS_DETACH:
        if (fImpLoad) break;
        SIC_Destroy();
        FreeChangeNotifications();
        release_typelib();
        break;
    }
    return TRUE;
}
--- snip ---

Initialization of comctl32 is done (registration of window classes/procs):

--- snip ---
0024:trace:module:process_attach (L"comctl32.dll",(nil)) - START
0024:Call PE DLL (proc=0x7e3073b8,module=0x7e250000 L"comctl32.dll",reason=PROCESS_ATTACH,res=(nil))
0024:trace:commctrl:DllMain 0x7e250000,1,(nil)
0024:Call KERNEL32.DisableThreadLibraryCalls(7e250000) ret=7e269e2a
0024:Ret  KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7e269e2a
0024:Call KERNEL32.GlobalAddAtomW(7e3099e0 L"CC32SubclassInfo") ret=7e269e43
0024:Ret  KERNEL32.GlobalAddAtomW() retval=0000c010 ret=7e269e43
0024:trace:commctrl:DllMain Subclassing atom added: 0xc010
0024:Call gdi32.CreateBitmap(00000008,00000008,00000001,00000001,7e3099c0) ret=7e269ed0
0024:Ret  gdi32.CreateBitmap() retval=00010024 ret=7e269ed0
0024:Call gdi32.CreatePatternBrush(00010024) ret=7e269ee7
0024:Ret  gdi32.CreatePatternBrush() retval=00010025 ret=7e269ee7 
...
0024:Call winex11.drv.wine_get_gdi_driver(0000002e) ret=7e9d3208
0024:Ret  winex11.drv.wine_get_gdi_driver() retval=7e23bce0 ret=7e9d3208
0024:Call winex11.drv.CreateDesktopWindow(00010020) ret=7eaf5193
0024:Ret  winex11.drv.CreateDesktopWindow() retval=00000001 ret=7eaf5193
0024:Ret  user32.GetDesktopWindow() retval=00010020 ret=7e9d327f
0024:Ret  user32.LoadCursorW() retval=00020044 ret=7e260b04
0024:Call user32.RegisterClassW(0033ca7c) ret=7e260b70
0024:trace:win:alloc_winproc allocated 0xffff000d for W 0x7e260633 (14/4096 used) 
...
0024:trace:win:alloc_winproc allocated 0xffff001d for W 0x7e2ea070 (30/4096 used)
0024:Ret  user32.RegisterClassW() retval=0000c02d ret=7e2eb526
0024:Call user32.LoadCursorW(00000000,00007f00) ret=7e2f1b7e
0024:Ret  user32.LoadCursorW() retval=00020044 ret=7e2f1b7e
0024:Call user32.RegisterClassW(0033ca74) ret=7e2f1c02
0024:trace:win:alloc_winproc allocated 0xffff001e for W 0x7e2f1237 (31/4096 used) 
...
0024:Ret  PE DLL (proc=0x7e3073b8,module=0x7e250000 L"comctl32.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
0024:trace:module:process_attach (L"comctl32.dll",(nil)) - END
0024:Ret  KERNEL32.LoadLibraryA() retval=7e250000 ret=7e486f96
0024:Call KERNEL32.GetProcAddress(7e250000,7e4cc25d "ImageList_Destroy") ret=7e486fce
0024:Ret  KERNEL32.GetProcAddress() retval=7e25b6a8 ret=7e486fce
0024:Call comctl32.ImageList_Destroy(00000000) ret=7e420360
0024:Ret  comctl32.ImageList_Destroy() retval=00000000 ret=7e420360
0024:Call comctl32.ImageList_Destroy(00000000) ret=7e420371
0024:Ret  comctl32.ImageList_Destroy() retval=00000000 ret=7e420371 
--- snip ---

The loader recursion count is >1 during unload of comctl32 because we're nested, still in shell32.dll DLL_PROCESS_DETACH.
Because of nesting level, the dll detach notification is not sent to comctl32.dll hence the unregistration of previously registered window classes/procs does not take place:

--- snip ---
0024:trace:module:free_modref  unloading L"C:\\windows\\system32\\shell32.dll"
0024:Call KERNEL32.FreeLibrary(7e250000) ret=7e487062
0024:trace:module:LdrUnloadDll (0x7e250000)
0024:trace:module:LdrUnloadDll (L"comctl32.dll") - START
0024:trace:module:MODULE_DecRefCount (L"comctl32.dll") ldr.LoadCount: 0
0024:trace:module:LdrUnloadDll END
0024:Ret  KERNEL32.FreeLibrary() retval=00000001 ret=7e487062
0024:trace:module:free_modref  unloading L"C:\\windows\\system32\\shlwapi.dll"
0024:trace:module:free_modref  unloading L"C:\\windows\\system32\\comctl32.dll"
0024:Call KERNEL32.FreeLibrary(7e100000) ret=7e3073a2
0024:trace:module:LdrUnloadDll (0x7e100000)
0024:trace:module:LdrUnloadDll (L"uxtheme.dll") - START
0024:trace:module:MODULE_DecRefCount (L"uxtheme.dll") ldr.LoadCount: 0
0024:trace:module:LdrUnloadDll END
0024:Ret  KERNEL32.FreeLibrary() retval=00000001 ret=7e3073a2
0024:trace:module:LdrUnloadDll END
0024:Ret  KERNEL32.FreeLibrary() retval=00000001 ret=0076925e 

--- snip ---

comctl32.dll gets unmapped but the window procs still remain registered.
Later comctl32 is mapped again but the harm has already been done by having window atoms/classes/procs pointing to freed memory.

$ sha1sum PokerStarsInstallEU.exe 
872eeddd632b5768b0010df830caf11fa051e753  PokerStarsInstallEU.exe

$ du -sh PokerStarsInstallEU.exe 
27M	PokerStarsInstallEU.exe

$ wine --version
wine-1.7.8-135-gfaa355b

Regards
Comment 8 Nikolay Sivov 2013-12-11 11:42:43 UTC
Thanks for analysis, I submitted a patch that fixes it for me (supposedly disabled recurring DLL_PROCESS_DETACH works as it should).

http://www.winehq.org/pipermail/wine-patches/2013-December/128911.html
Comment 9 Anastasius Focht 2013-12-11 13:05:03 UTC
Hello Nikolay,

thanks, I've seen the patch.
The summary was actually not to be interpreted that way - sorry for the bad wording.

I forgot to mention that 'winetricks comctl32' works around here.
I gave that hint to some guy in #winehq, allowing him to pursue his online gambling needs until Wine is fixed ;-)

The reason why this works for native comctl32 is the fixed load base address for the dll. At the time when the main gui really initializes and the class window procs are called, comctl32 is already mapped again - at the same address range.

Regards
Comment 10 Austin English 2013-12-11 13:25:01 UTC
(In reply to comment #8)
> Thanks for analysis, I submitted a patch that fixes it for me (supposedly
> disabled recurring DLL_PROCESS_DETACH works as it should).
> 
> http://www.winehq.org/pipermail/wine-patches/2013-December/128911.html

http://source.winehq.org/git/wine.git/commitdiff/b5312b70f5c160b3aa3d374256f71ad4aa1f98e6
Comment 11 Nikolay Sivov 2013-12-11 13:29:23 UTC
Fixed with b5312b70f5c160b3aa3d374256f71ad4aa1f98e6.
Comment 12 Alexandre Julliard 2013-12-20 12:42:48 UTC
Closing bugs fixed in 1.7.9.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers