[Bug 12439] New: Regression: Age of Mythology: Installer page faults
http://bugs.winehq.org/show_bug.cgi?id=12439 Summary: Regression: Age of Mythology: Installer page faults Product: Wine Version: 0.9.58. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs(a)winehq.org ReportedBy: spencercw(a)googlemail.com CC: aric(a)codeweavers.com The Age of Mythology installer page faults on startup from this regression: dd0c9300f99a9cc4a2ce1178a6fa7e40afe2dc8f is first bad commit commit dd0c9300f99a9cc4a2ce1178a6fa7e40afe2dc8f Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Apr 2 08:48:22 2008 -0500 imm32: Keep track of context associations between HWND and HIMC. :040000 040000 5fa8a5f30dd144a8125c5216055517ee1b8bcca5 06afebe61003c92cf2fba84e53c1bf5819fe92b3 M dlls Specifically, this fixes it: diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 0995fb6..0712d66 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -356,6 +356,9 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) TRACE("(%p, %p):\n", hWnd, hIMC); + if (!hIMC) + return NULL; + if (!IMM_GetThreadData()->defaultContext) IMM_GetThreadData()->defaultContext = ImmCreateContext(); -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 Chris Spencer <spencercw(a)googlemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #1 from joaopa <jeremielapuree(a)yahoo.fr> 2008-04-08 12:06:46 --- *** Bug 12368 has been marked as a duplicate of this bug. *** -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 Aric Stewart <aric(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 --- Comment #2 from Aric Stewart <aric(a)codeweavers.com> 2008-04-08 12:10:18 --- That patch is not correct. do you have where it crashes (line-number) or maybe you could give me a backtrace or +imm log? -aric (In reply to comment #0)
The Age of Mythology installer page faults on startup from this regression:
dd0c9300f99a9cc4a2ce1178a6fa7e40afe2dc8f is first bad commit commit dd0c9300f99a9cc4a2ce1178a6fa7e40afe2dc8f Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Apr 2 08:48:22 2008 -0500
imm32: Keep track of context associations between HWND and HIMC.
:040000 040000 5fa8a5f30dd144a8125c5216055517ee1b8bcca5 06afebe61003c92cf2fba84e53c1bf5819fe92b3 M dlls
Specifically, this fixes it:
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 0995fb6..0712d66 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -356,6 +356,9 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
TRACE("(%p, %p):\n", hWnd, hIMC);
+ if (!hIMC) + return NULL; + if (!IMM_GetThreadData()->defaultContext) IMM_GetThreadData()->defaultContext = ImmCreateContext();
-- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 --- Comment #3 from Chris Spencer <spencercw(a)googlemail.com> 2008-04-08 12:13:29 --- I didn't really expect the patch to be correct, I was just pointing out what part of the original commit caused the problem. I will post a copy of the backtrace and +imm log with a clean wine later, I am checking another bug right now. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 --- Comment #4 from Chris Spencer <spencercw(a)googlemail.com> 2008-04-08 12:36:38 --- Created an attachment (id=11980) --> (http://bugs.winehq.org/attachment.cgi?id=11980) Console +imm log and backtrace Have attached the log with +imm and the backtrace as you requested. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 Chris Spencer <spencercw(a)googlemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11980|application/octet-stream |text/plain mime type| | -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 --- Comment #5 from joaopa <jeremielapuree(a)yahoo.fr> 2008-04-08 12:39:40 --- Created an attachment (id=11982) --> (http://bugs.winehq.org/attachment.cgi?id=11982) requested trace for Crimson skies demo -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 --- Comment #6 from Aric Stewart <aric(a)codeweavers.com> 2008-04-08 13:28:19 --- Patch submitted to winehq that should correct this: diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 0995fb6..1ffe559 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -109,6 +109,8 @@ static const WCHAR szwWineIMCProperty[] = {'W','i','n','e','I','m','m','H','I',' #define is_himc_ime_unicode(p) (p->immKbd->imeInfo.fdwProperty & IME_PROP_UNICODE) #define is_kbd_ime_unicode(p) (p->imeInfo.fdwProperty & IME_PROP_UNICODE) +static BOOL IMM_DestroyContext(HIMC hIMC); + static inline WCHAR *strdupAtoW( const char *str ) { WCHAR *ret = NULL; @@ -150,7 +152,7 @@ static void IMM_InitThreadData(void) static void IMM_FreeThreadData(void) { IMMThreadData* data = TlsGetValue(tlsIndex); - ImmDestroyContext(data->defaultContext); + IMM_DestroyContext(data->defaultContext); DestroyWindow(data->hwndDefault); HeapFree(GetProcessHeap(),0,data); TRACE("Thread Data Destroyed\n"); @@ -510,7 +512,7 @@ HIMC WINAPI ImmCreateContext(void) if (!new_context->immKbd->pImeSelect(new_context, TRUE)) { TRACE("Selection of IME failed\n"); - ImmDestroyContext(new_context); + IMM_DestroyContext(new_context); return 0; } @@ -520,10 +522,7 @@ HIMC WINAPI ImmCreateContext(void) return (HIMC)new_context; } -/*********************************************************************** - * ImmDestroyContext (IMM32.@) - */ -BOOL WINAPI ImmDestroyContext(HIMC hIMC) +static BOOL IMM_DestroyContext(HIMC hIMC) { InputContextData *data = (InputContextData*)hIMC; @@ -550,6 +549,17 @@ BOOL WINAPI ImmDestroyContext(HIMC hIMC) } /*********************************************************************** + * ImmDestroyContext (IMM32.@) + */ +BOOL WINAPI ImmDestroyContext(HIMC hIMC) +{ + if (hIMC != IMM_GetThreadData()->defaultContext) + return IMM_DestroyContext(hIMC); + else + return FALSE; +} + +/*********************************************************************** * ImmDisableIME (IMM32.@) */ BOOL WINAPI ImmDisableIME(DWORD idThread) -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 --- Comment #7 from Chris Spencer <spencercw(a)googlemail.com> 2008-04-08 13:46:36 --- Yep, that fixes it up right nice. :) -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 Chris Spencer <spencercw(a)googlemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #8 from Chris Spencer <spencercw(a)googlemail.com> 2008-04-09 06:09:21 --- Fixed in today's git. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=12439 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> 2008-04-18 11:04:43 --- Closing bugs reported fixed in 0.9.60. -- 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.
participants (1)
-
wine-bugs@winehq.org