Crash when we use ATOK on the other of editor[@ nsWindow::OnIMEQueryCharPosition]

RESOLVED FIXED in mozilla1.8beta2

Status

()

--
critical
RESOLVED FIXED
14 years ago
9 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

({crash, inputmethod, regression})

Trunk
mozilla1.8beta2
x86
Windows XP
crash, inputmethod, regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(crash signature)

Attachments

(2 obsolete attachments)

On other of editor(e.g., button), if we used ATOK17, mozilla crash.
This is regression of bug 278061.

Stack Signature	 nsWindow::OnIMEQueryCharPosition 2c93d345
Product ID	FirefoxTrunk
Build ID	2005031106
Trigger Time	2005-03-13 04:41:19.0
Platform	Win32
Operating System	Windows NT 5.1 build 2600
Module	FIREFOX.EXE + (00108118)
URL visited	
User Comments	
Since Last Crash	13136 sec
Total Uptime	32478 sec
Trigger Reason	Access violation
Source File, Line No.
c:/builds/tinderbox/Fx-Trunk/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 6740
Stack Trace 	
nsWindow::OnIMEQueryCharPosition 
[c:/builds/tinderbox/Fx-Trunk/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 6740]
nsWindow::OnIMERequest 
[c:/builds/tinderbox/Fx-Trunk/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 6577]
nsWindow::ProcessMessage 
[c:/builds/tinderbox/Fx-Trunk/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 4795]
nsWindow::WindowProc 
[c:/builds/tinderbox/Fx-Trunk/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1419]
USER32.dll + 0x8709 (0x77cf8709)
USER32.dll + 0x87eb (0x77cf87eb)
USER32.dll + 0xb368 (0x77cfb368)
USER32.dll + 0xb3b4 (0x77cfb3b4)
ntdll.dll + 0xeae3 (0x7c94eae3)
USER32.dll + 0xff42 (0x77cfff42)
ATOK17W.IME + 0x133dde (0x5ed53dde)
0x0033002e

6727   if ((charPosition != 0 && charPosition != sIMECursorPosition) ||
6728       charPosition > IME_MAX_CHAR_POS) {
6729     *oResult = FALSE;
6730     return PR_FALSE;
6731   }
6732   POINT pt;
6733   pt.x = sIMECompCharPos[charPosition].left;
6734   pt.y = sIMECompCharPos[charPosition].top;
6735   ::ClientToScreen(mWnd, &pt);
6736   pCharPosition->pt = pt;
6737 
6738   pCharPosition->cLineHeight = sIMECaretHeight;
6739 
6740   ::GetWindowRect(mWnd, &pCharPosition->rcDocument);
6741 
6742   *oResult = TRUE;
6743   return PR_TRUE;
6744 }

I will create the patch for this bug. Please wait.
(Assignee)

Updated

14 years ago
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?
Target Milestone: --- → mozilla1.8beta2
(Assignee)

Updated

14 years ago
Summary: Crash when we use ATOK on the other of editor → Crash when we use ATOK on the other of editor[@ nsWindow::OnIMEQueryCharPosition]
Created attachment 177373 [details] [diff] [review]
Patch rv1.0

The patch fixes the crash and stops to return invalid value when the active
widget is not editor and the composition string is empty.
Attachment #177373 - Flags: review?(timeless)

Comment 2

14 years ago
Comment on attachment 177373 [details] [diff] [review]
Patch rv1.0

i don't like mGotValue, please explain what it is so that a native speaker can
try to come up with a better variable name.

+  // If the char positions are not cached, we should not return.
not return? do you mean return failure? because it looks like you do return:

+  // Because in this case, the active widget is not editor.
+  if (!sIMECompCharPos) {
+    *oResult = FALSE;
+    return PR_FALSE;
+  }
Robert:

Please help me for the variable name.
See comment 2.

In Reply to comment 2
> not return? do you mean return failure? because it looks like you do return:
The values not return by *aData when the *oResult is FALSE.
Do you have an idea for better comment?
I assume it means "PR_TRUE if the current caret rect was successfully stored in
mCaretRect, otherwise PR_FALSE". Maybe just call it mRectIsValid?
Yes. You're right. Thank you!
(Assignee)

Updated

14 years ago
Attachment #177373 - Flags: review?(timeless)
Created attachment 177716 [details] [diff] [review]
Patch rv1.1
Attachment #177373 - Attachment is obsolete: true
Attachment #177716 - Flags: review?(timeless)

Updated

14 years ago
Attachment #177716 - Flags: review?(timeless) → review+
(Assignee)

Updated

14 years ago
Attachment #177716 - Flags: superreview?(roc)
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Attachment #177716 - Flags: superreview?(roc) → superreview+

Comment 7

14 years ago
h
(Assignee)

Updated

14 years ago
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?

Comment 8

14 years ago
Comment on attachment 177716 [details] [diff] [review]
Patch rv1.1

mozilla/widget/public/nsGUIEvent.h	3.117
mozilla/editor/libeditor/base/nsEditor.cpp	1.439
mozilla/widget/src/windows/nsWindow.cpp 	3.546
Attachment #177716 - Attachment is obsolete: true
Thank you, timeless and robert!

-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Keywords: inputmethod
Crash Signature: [@ nsWindow::OnIMEQueryCharPosition]
You need to log in before you can comment on or make changes to this bug.