http://bugs.winehq.org/show_bug.cgi?id=24823
Summary: Miranda IM crashes with a modern contact list plugin Product: Wine Version: 1.3.5 Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: t.artem@mailcity.com
Obtain Miranda, set modern contact list as a default contact list plugin, restart Miranda, get a crash.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #1 from Artem S. Tashkinov t.artem@mailcity.com 2010-10-20 04:06:05 CDT --- Created an attachment (id=31398) --> (http://bugs.winehq.org/attachment.cgi?id=31398) crash with debug symbols
http://bugs.winehq.org/show_bug.cgi?id=24823
Artem S. Tashkinov t.artem@mailcity.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source URL| |http://miranda.googlecode.c | |om/files/miranda-im-v0.9.8- | |unicode.exe
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2010-10-20 10:44:55 CDT --- Attach +uxtheme,+tid please. If it's an app that passes 0x1 as a theme handle then we should switch to handle table to properly support this.
Have you got a direct link to plugin sources repo?
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #3 from Artem S. Tashkinov t.artem@mailcity.com 2010-10-20 17:28:20 CDT --- Created an attachment (id=31406) --> (http://bugs.winehq.org/attachment.cgi?id=31406) WINEDEBUG=+uxtheme,+tid miranda32.exe
Full Miranda IM sources: http://code.google.com/p/miranda/downloads/detail?name=miranda-im-v0.9.8-src...
(or always current version here: http://code.google.com/p/miranda/downloads/list)
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #4 from Artem S. Tashkinov t.artem@mailcity.com 2010-10-20 17:31:16 CDT --- SVN trunk is here: http://miranda.googlecode.com/svn/trunk/miranda/plugins/modernb/
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #5 from Artem S. Tashkinov t.artem@mailcity.com 2010-11-15 09:46:46 CST --- Crashes in 1.3.7 as well.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #6 from Artem S. Tashkinov t.artem@mailcity.com 2011-07-10 05:11:28 CDT --- (In reply to comment #2)
Attach +uxtheme,+tid please. If it's an app that passes 0x1 as a theme handle then we should switch to handle table to properly support this.
Have you got a direct link to plugin sources repo?
Ping :)
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com 2011-07-10 15:37:55 CDT --- (In reply to comment #6)
Ping :)
Found some time just now. Actually it seems like miranda code is not so clean in first place but it doesn't matter running on windows for some reason.
I checked 0.9.24 sources snapshot. Looking into plugins/modernb/modern_xptheme.cpp I found this:
--- lines 136-151 XPTHANDLE xpt_AddThemeHandle(HWND hwnd, LPCWSTR className) { XPTHANDLE res = NULL; xptcheck NULL; xptlock(); { XPTObject* xptObject=(XPTObject*)mir_alloc(sizeof(XPTObject)); xptObject->lpcwClassObject=className; xptObject->hOwnerWindow=hwnd; _sttXptReloadThemeData(xptObject); li.List_InsertPtr(xptObjectList, (void*)xptObject); res=(XPTHANDLE)xptObject; } xptunlock(); return res; } ---
mir_alloc happens to be malloc wrapper (with extra heap checks), so it doesn't initialize memory. After allocation xptObject->hThemeHandle field is uninitialized and after that _sttXptReloadThemeData() frees is with CloseThemeData().
So adding another line like xptObject->hThemeHandle = NULL; should help with that problem, and it's probably a case to convince developers to add a fix upstream. Anyway if I'm right and CloseThemeData() operates on handles and performs a table lookup to check passed handle validity we need this to be fixed in wine by adding handle tables.
To summarize: - please check that custom build of miranda with mentioned one line change fixes a problem. If it does try to get it accepted to miranda tree; - keep bug open anyway and test for this particular case CloseThemeData(0x1) in windows to see what happens.
I don't have much time these days, but will post here if I find something.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #8 from Artem S. Tashkinov t.artem@mailcity.com 2011-07-13 04:03:12 CDT --- (In reply to comment #7)
It's probably fixed upstream, I'll close this bug report whenever a new fixed Miranda version gets released (and it doesn't crash in Wine :) ).
http://code.google.com/p/miranda/issues/detail?id=1385
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com 2011-07-13 06:01:54 CDT --- (In reply to comment #8)
(In reply to comment #7)
It's probably fixed upstream, I'll close this bug report whenever a new fixed Miranda version gets released (and it doesn't crash in Wine :) ).
Ok, but don't close this report, it's still valid problem in Wine even if an application doesn't hit it any more.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #10 from Nikolay Sivov bunglehead@gmail.com 2011-07-15 01:34:27 CDT --- After some testing I see now that uxtheme uses handles, not plain pointers. So valid HTHEME looks like 0x00010001,0x00020001 (or 2 at least significant position). That's why it's resistant to invalid handles like 0x1.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com 2011-07-15 01:35:50 CDT --- By the way, may I ask bugzilla Admin to add uxtheme component?
http://bugs.winehq.org/show_bug.cgi?id=24823
Artem S. Tashkinov t.artem@mailcity.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jnewman@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #12 from Artem S. Tashkinov t.artem@mailcity.com 2011-07-15 01:42:02 CDT --- (In reply to comment #11)
By the way, may I ask bugzilla Admin to add uxtheme component?
CC'ing Jeremy Newman as he's supposedly a site administrator here.
http://bugs.winehq.org/show_bug.cgi?id=24823
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|-unknown |uxtheme Ever Confirmed|0 |1
--- Comment #13 from Austin English austinenglish@gmail.com 2011-07-15 12:17:11 CDT --- (In reply to comment #11)
By the way, may I ask bugzilla Admin to add uxtheme component?
Done.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #14 from Artem S. Tashkinov t.artem@mailcity.com 2011-07-20 14:05:26 CDT --- (In reply to comment #9)
Ok, but don't close this report, it's still valid problem in Wine even if an application doesn't hit it any more.
This issue is now fixed upstream (in Miranda 0.9.25), so feel free to do whatever you want with this bug report.
I have to note that Miranda's modern contact list interface works incredibly slowly while consuming 100% of CPU when you try to interact with it.
http://bugs.winehq.org/show_bug.cgi?id=24823
Jeremy Newman jnewman@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|jnewman@codeweavers.com |
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #15 from Nikolay Sivov bunglehead@gmail.com 2011-07-20 14:13:11 CDT --- (In reply to comment #14)
(In reply to comment #9)
Ok, but don't close this report, it's still valid problem in Wine even if an application doesn't hit it any more.
This issue is now fixed upstream (in Miranda 0.9.25), so feel free to do whatever you want with this bug report.
Ok. I see they even mentioned it in a brief changelog. I'll keep this open, cause we still need a real handle table for HTHEME, not a plain pointer. After some testing it's even more complicated than I thought - there should be a kind of reference counting mechanism for HTHEMEs, so that same handle is returned from OpenThemeData for same arguments set.
I have to note that Miranda's modern contact list interface works incredibly slowly while consuming 100% of CPU when you try to interact with it.
This should be a next report.
http://bugs.winehq.org/show_bug.cgi?id=24823
A Wine user RandomAccountName@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |RandomAccountName@mail.com
--- Comment #16 from A Wine user RandomAccountName@mail.com 2012-02-22 06:18:20 CST --- *** Bug 29974 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #17 from Artem S. Tashkinov t.artem@mailcity.com 2012-07-22 13:17:24 CDT --- Created attachment 41105 --> http://bugs.winehq.org/attachment.cgi?id=41105 Miranda crashes with the modern contact list plugin
It's crashing again in Wine 1.5.9/Miranda 0.10.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #18 from Artem S. Tashkinov t.artem@mailcity.com 2012-07-22 13:19:17 CDT --- And it does ... not crash if I run it with debugging enabled (WINEDEBUG=+uxtheme,+tid).
Weird.
http://bugs.winehq.org/show_bug.cgi?id=24823
--- Comment #19 from Artem S. Tashkinov t.artem@mailcity.com 2012-07-22 13:22:07 CDT --- Created attachment 41106 --> http://bugs.winehq.org/attachment.cgi?id=41106 WINEDEBUG=+uxtheme,+tid miranda32.exe (Wine 1.5.9/Miranda 0.10.0)
It looks like some sort of race/timing issue.
On a second run it crashes with debugging enabled.
https://bugs.winehq.org/show_bug.cgi?id=24823
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Abandoned?
--- Comment #20 from Ken Sharp imwellcushtymelike@gmail.com --- Is this still an issue in Wine 1.7.45 or later?
https://bugs.winehq.org/show_bug.cgi?id=24823
Artem S. Tashkinov t.artem@mailcity.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #21 from Artem S. Tashkinov t.artem@mailcity.com --- (In reply to Ken Sharp from comment #20)
Is this still an issue in Wine 1.7.45 or later?
It's fixed.
https://bugs.winehq.org/show_bug.cgi?id=24823
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #22 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.46.