Closed Bug 285974 Opened 20 years ago Closed 20 years ago

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

Categories

(Core :: Internationalization, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: masayuki, Assigned: masayuki)

Details

(Keywords: crash, inputmethod, regression)

Crash Data

Attachments

(2 obsolete files)

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.
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?
Target Milestone: --- → mozilla1.8beta2
Summary: Crash when we use ATOK on the other of editor → Crash when we use ATOK on the other of editor[@ nsWindow::OnIMEQueryCharPosition]
Attached patch Patch rv1.0 (obsolete) — Splinter Review
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 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!
Attachment #177373 - Flags: review?(timeless)
Attached patch Patch rv1.1 (obsolete) — Splinter Review
Attachment #177373 - Attachment is obsolete: true
Attachment #177716 - Flags: review?(timeless)
Attachment #177716 - Flags: review?(timeless) → review+
Attachment #177716 - Flags: superreview?(roc)
Status: NEW → ASSIGNED
Attachment #177716 - Flags: superreview?(roc) → superreview+
h
Flags: blocking1.8b2?
Flags: blocking-aviary1.1?
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
Closed: 20 years ago
Resolution: --- → FIXED
Crash Signature: [@ nsWindow::OnIMEQueryCharPosition]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: