Closed Bug 1050050 Opened 10 years ago Closed 7 years ago

[TSF] Easy Changjei (Traditional Chinese TIP) doesn't show candidate window at pressing first character

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod, Whiteboard: [country-cn])

Spinning off from bug 1049768.

In TSF mode, Easy Changjei doesn't show candidate window at pressing first character. It must be caused by a bug of TSF.

Even we return TS_E_NOLAYOUT from ITextStoreACP::GetTextExt(), TIP will receive E_FAIL. However, this doesn't occur if TIP calls ITfContextView::GetRangeFromPoint(). When ITextStoreACP::GetTextExt() returns TS_E_NOLAYOUT, our ITextStoreACP::GetACPFromPoint() always return TS_E_NOLAYOUT.

So, when Easy Changjei will get E_FAIL at retrieving a position of text from offset in the text, it should check if ITfContextView::GetRangeFromPoint() returns TS_E_NOLAYOUT. Otherwise, just handle ITextStoreACPSink::OnLayoutChange() which is called when the document is unlocked and these methods returned TS_E_NOLAYOUT during the lock.

First, we should contact the vendor of Easy Changjei. If they don't fix this bug, we should try to fix this with a hack.
Log of inputting first character. Easy Changjei doesn't retry to get the character position after a call of OnLayoutChange().

> 0[c0f140]: TSF: 0x9d5db60   Locking (TS_LF_READWRITE) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::InsertTextAtSelection(dwFlags=TF_IAS_QUERYONLY, pchText=0x0 "", cch=0, pacpStart=0x33eb0c, pacpEnd=0x33eb10, pChange=0x33eae8), IsComposing()=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::InsertTextAtSelection() succeeded: *pacpStart=0, *pacpEnd=0, *pChange={ acpStart=0, acpOldEnd=0, acpNewEnd=0 })
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::OnStartComposition(pComposition=0x1188cc0, pfOk=0x33eb20), mComposition.mView=0x0
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RecordCompositionStartAction(pComposition=0x1188cc0, aRange=0x1160a6c, aPreserveSelection=false), mComposition.mView=0x0
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentContent(): mContent={ mText.Length()=0 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RecordCompositionStartAction() succeeded: mComposition={ mStart=0, mString.Length()=0, mSelection={ acpStart=0, acpEnd=0, style.ase=TS_AE_END, style.fInterimChar=false } }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::OnStartComposition() succeeded
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::SetSelection(ulCount=1, pSelection=33eaf8 { acpStart=0, acpEnd=0, style={ ase=TS_AE_NONE, fInterimChar=false } }), mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::SetSelectionInternal(pSelection={ acpStart=0, acpEnd=0, style={ ase=TS_AE_NONE, fInterimChar=false} }, aDispatchTextEvent=true), mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RestartCompositionIfNecessary(aRangeNew=0x0), mComposition.mView=0x1188cc0
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RestartCompositionIfNecessary(), range=0-0, mComposition={ mStart=0, mString.Length()=0 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RestartCompositionIfNecessary() succeeded
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RecordCompositionUpdateAction(), mComposition={ mView=0x1188cc0, mString="" }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RecordCompositionUpdateAction() succeeded
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::SetSelection() succeeded
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x33eb88, pcFetched=0x33ec10)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetSelection() succeeded
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::SetText(dwFlags=not-specified, acpStart=0, acpEnd=0, pchText=0x33ec3c "_", cch=1, pChange=0x33eba0), mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::SetSelectionInternal(pSelection={ acpStart=0, acpEnd=0, style={ ase=TS_AE_END, fInterimChar=false} }, aDispatchTextEvent=false), mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::InsertTextAtSelectionInternal(aInsertStr="_", aTextChange=0x33eba0), IsComposing=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=0 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentContent(): mContent={ mText.Length()=0 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::InsertTextAtSelectionInternal() succeeded: mWidget=0xaeb8000, mWidget->Destroyed()=false, aTextChange={ acpStart=0, acpOldEnd=0, acpNewEnd=1 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::SetText() succeeded: pChange={ acpStart=0, acpOldEnd=0, acpNewEnd=1 }
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetText(acpStart=0, acpEnd=-1, pchPlain=0x75f74c10, cchPlainReq=128, pcchPlainOut=0x33e784, prgRunInfo=0x75f74d10, ulRunInfoReq=33, pulRunInfoOut=0x75f748ac, pacpNext=0x75f748b0), mComposition={ mStart=0, mString.Length()=1, IsComposing()=true }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=1, acpEnd=1 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentContent(): mContent={ mText.Length()=1 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetText() succeeded: pcchPlainOut=0x33e784, *prgRunInfo={ uCount=1, type=TS_RT_PLAIN }, *pulRunInfoOut=1979140268, *pacpNext=1979140272)
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::OnUpdateComposition(pComposition=0x1188cc0, pRangeNew=0x0), mComposition.mView=0x1188cc0
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::OnUpdateComposition() succeeded but not complete
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::SetSelection(ulCount=1, pSelection=33eb80 { acpStart=0, acpEnd=1, style={ ase=TS_AE_END, fInterimChar=false } }), mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::SetSelectionInternal(pSelection={ acpStart=0, acpEnd=1, style={ ase=TS_AE_END, fInterimChar=false} }, aDispatchTextEvent=true), mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=1, acpEnd=1 (length=0), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RestartCompositionIfNecessary(aRangeNew=0x0), mComposition.mView=0x1188cc0
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RestartCompositionIfNecessary(), range=0-1, mComposition={ mStart=0, mString.Length()=1 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RestartCompositionIfNecessary() succeeded
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RecordCompositionUpdateAction(), mComposition={ mView=0x1188cc0, mString="_" }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=1 (length=1), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RecordCompositionUpdateAction() succeeded
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::SetSelection() succeeded
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetActiveView(pvcView=0x33eb7c)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetActiveView() succeeded: *pvcView=1
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetTextExt(vcView=1, acpStart=0, acpEnd=1, prc=0x33eba8, pfClipped=0x33eb94)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetTextExt() FAILED due to layout not recomputed at 1
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x33eb90, pcFetched=0x33ec28)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=1 (length=1), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetSelection() succeeded
> 0[c0f140]: TSF: 0x9d5db60   Unlocked (TS_LF_READWRITE) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::FlushPendingActions() flushing COMPOSITION_START={ mSelectionStart=0, mSelectionLength=0 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::OnSelectionChangeInternal(), mSink=0x11780ec, mSinkMask=TS_AS_TEXT_CHANGE | TS_AS_SEL_CHANGE | TS_AS_LAYOUT_CHANGE | TS_AS_ATTR_CHANGE | TS_AS_STATUS_CHANGE, mIsRecordingActionsWithoutLock=false, mComposition.IsComposing()=true
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::FlushPendingActions() dispatching compositionstart event...
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::FlushPendingActions() flushing COMPOSITION_UPDATE={ mData="_", mRanges=0x132292e0, mRanges->Length()=2 }
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::FlushPendingActions(), dispatching compositionupdate event...
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::FlushPendingActions(), dispatching text event...
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RequestLock(), calling ITextStoreACPSink::OnLayoutChange()...
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RequestLock(), calling ITfContextOwnerServices::OnLayoutChange()...
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RequestLock() succeeded: *phrSession=S_OK
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::RequestLock(dwLockFlags=TS_LF_READ | TS_LF_SYNC, phrSession=0x33ee74), mLock=not-specified
> 0[c0f140]: TSF: 0x9d5db60   Locking (TS_LF_READ) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x33ec7c, pcFetched=0x33ed14)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::CurrentSelection(): acpStart=0, acpEnd=1 (length=1), reverted=false
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetSelection() succeeded
> 0[c0f140]: TSF: 0x9d5db60   Unlocked (TS_LF_READ) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::RequestLock() succeeded: *phrSession=S_OK
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::OnLayoutChangeInternal(), calling mSink->OnLayoutChange()...
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::RequestLock(dwLockFlags=TS_LF_READ, phrSession=0x33ec90), mLock=not-specified
> 0[c0f140]: TSF: 0x9d5db60   Locking (TS_LF_READ) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetActiveView(pvcView=0x33ebcc)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetActiveView() succeeded: *pvcView=1
> 0[c0f140]: TSF: 0x9d5db60 nsTextStore::GetActiveView(pvcView=0x33eb9c)
> 0[c0f140]: TSF: 0x9d5db60   nsTextStore::GetActiveView() succeeded: *pvcView=1
> 0[c0f140]: TSF: 0x9d5db60   Unlocked (TS_LF_READ) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This is really a bug of TIP. Move this to TE.
Status: NEW → ASSIGNED
Component: Widget: Win32 → Chinese-Traditional
Product: Core → Tech Evangelism
I emailed to them in English, it might cause they ignoring the email...
If you want to test this, you can disable the hack implemented in bug 1054108 by changing intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error to false in about:config.
No longer blocks: 1049488
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #5)
> intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error to false in
> about:config.

Oops, it's intl.tsf.hack.easy_changjei.do_not_return_no_layout_error.
I noticed them how to disable our hack for testing their product.
> This is really a bug of TIP. Move this to TE.

Tech Evangelism is for Web sites/Web app issues. 
If it's a Web site issue then there is a URL.
If it's a device implementation, it doesn't seem to be the right product?
Whiteboard: [country-cn]
Okay, then, moving back to Core.
Component: Chinese-Traditional → Widget: Win32
Product: Tech Evangelism → Core
Looks like that the vendor of Easy Changjei has gone and Easy Changjei isn't available on current Firefox because it always crashes at pressing any key:
https://crash-stats.mozilla.com/report/index/6843c380-6c8a-40b6-ac28-1db511170612

And according to the crash reports, we don't need to block the DLL. So, let's close this as WONTFIX.

# I'll file a bug to remove the hack for Easy Changjei from TSFTextStore.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.