# Zoom sdk升级到v4.6.21666.0427后，app 内使用输入法，其候选字窗口位置不对了

**URL:** <https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366>\
**Category:** macOS\
**Created:** [May 28, 2020, 9:49am UTC](https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366 "2020-05-28T09:49:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/software/32/50584_2.png) [@software](https://devforum.zoom.us/u/software)\
**Post date:** [May 28, 2020, 9:49am UTC](https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366/1 "2020-05-28T09:49:05Z")

</div>

**Description**  
我们app内集成了zoom mac sdk。目前按照zoom通知，计划将zoom sdk升级到最新版。但升级后发现，在mac 10.14.x系统，输入法的候选字窗口不跟随光标，而是固定显示在屏幕左下角。

说明：  
1、mac 10.15.x系统里是好的。  
2、升级sdk前，没有这个问题。  
3、无论是在我们app内使用比如简体拼音输入法输入内容，还是视频会议窗口-聊天里输入内容，都有这个问题。

**Which version?**  
mac sdk : **v4.6.21666.0427**

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Go to ‘…’
2. Click on ‘…’
3. Scroll down to ‘…’
4. See error

**Screenshots**

 ![屏幕快照 2020-05-28 下午5.25.20](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/4/4c0b11cbab066c45e11050ff43c99eefd0e04bd6.jpeg)

**Smartphone (please complete the following information):**

- Device: MacBook Pro
- OS: mac os 10.14.5

抛出的异常：  
2020-05-29 09:45:41.949436+0800 Teampel[8927:35095] firstRectForCharacterRange  
2020-05-29 09:45:41.949631+0800 Teampel[8927:35095] [General] An uncaught exception was raised  
2020-05-29 09:45:41.949647+0800 Teampel[8927:35095] [General] \*\*\* -[NSXPCEncoder \_encodeObject:]: Unable to determine what Class the encoded object should encode (classForCoder returned nil)  
2020-05-29 09:45:41.954208+0800 Teampel[8927:35095] [General] (  
0 CoreFoundation 0x00007fff38d7e9a9 \_\_exceptionPreprocess + 256  
1 libobjc.A.dylib 0x00007fff6348aa17 objc\_exception\_throw + 48  
2 CoreFoundation 0x00007fff38d7e7db +[NSException raise:format:] + 201  
3 Foundation 0x00007fff3af40c13 -[NSXPCEncoder \_encodeObject:] + 493  
4 Foundation 0x00007fff3af4151c -[NSXPCEncoder \_encodeArrayOfObjects:forKey:] + 225  
5 Foundation 0x00007fff3af410f3 -[NSDictionary(NSDictionary) encodeWithCoder:] + 936  
6 Foundation 0x00007fff3af40c68 -[NSXPCEncoder \_encodeObject:] + 578  
7 Foundation 0x00007fff3af4151c -[NSXPCEncoder \_encodeArrayOfObjects:forKey:] + 225  
8 Foundation 0x00007fff3af410f3 -[NSDictionary(NSDictionary) encodeWithCoder:] + 936  
9 Foundation 0x00007fff3af40c68 -[NSXPCEncoder \_encodeObject:] + 578  
10 Foundation 0x00007fff3af1b383 \_NSXPCSerializationAddInvocationWithOnlyObjectArgumentsArray + 139  
11 Foundation 0x00007fff3af1b026 -[NSXPCEncoder \_encodeInvocationObjectArgumentsOnly:count:typeString:selector:isReply:into:] + 183  
12 Foundation 0x00007fff3af40308 \_sendReplyArgumentsOnly + 217  
13 Foundation 0x00007fff3b1edd44 \_\_58-[NSXPCConnection \_decodeAndInvokeMessageWithEvent:flags:]\_block\_invoke\_2.97 + 94  
14 Foundation 0x00007fff3af3ff4b -[\_NSXPCConnectionRequestedReplies endTransactionForSequence:completionHandler:] + 185  
15 Foundation 0x00007fff3b1edce0 \_\_58-[NSXPCConnection \_decodeAndInvokeMessageWithEvent:flags:]\_block\_invoke.96 + 133  
16 HIToolbox 0x00007fff381a65c7 \_\_65-[IMKInputSession attributesForCharacterIndex:completionHandler:]\_block\_invoke + 577  
17 HIToolbox 0x00007fff381a5fb5 \_\_77-[IMKInputSession attributesForCharacterIndex\_andLineRect:completionHandler:]\_block\_invoke + 1968  
18 HIToolbox 0x00007fff37f8ddb9 \_\_\_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec\_block\_invoke + 110  
19 AppKit 0x00007fff36ca784e \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke.456 + 459  
20 AppKit 0x00007fff36ca75d5 \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke.438 + 633  
21 AppKit 0x00007fff36cabff2 -[NSTextInputContext(NSInputContext\_WithCompletion) attributedSubstringForProposedRange:completionHandler:] + 159  
22 AppKit 0x00007fff36ca7347 \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke\_5.433 + 95  
23 AppKit 0x00007fff36ca3f02 -[NSTextInputContext tryHandleTSMEvent\_attributedSubstringForProposedRange\_withContext:dispatchCondition:dispatchWork:continuation:] + 86  
24 AppKit 0x00007fff36ca72c3 \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke\_3.431 + 373  
25 AppKit 0x00007fff36ca70bb \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke\_2.426 + 361  
26 AppKit 0x00007fff36cac244 -[NSTextInputContext(NSInputContext\_WithCompletion) firstRectForCharacterRange:completionHandler:] + 328  
27 AppKit 0x00007fff36ca6f49 \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke.425 + 180  
28 AppKit 0x00007fff36ca3d1f \_\_178-[NSTextInputContext tryHandleTSMEvent\_offsetToPos\_markedOrSelRange\_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:]\_block\_invoke + 72  
29 AppKit 0x00007fff36ca3cca -[NSTextInputContext tryHandleTSMEvent\_offsetToPos\_markedOrSelRange\_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:] + 169  
30 AppKit 0x00007fff36ca6c03 \_\_55-[NSTextInputContext handleTSMEvent:completionHandler:]\_block\_invoke.408 + 259  
31 AppKit 0x00007fff365dea89 -[NSTextInputContext handleTSMEvent:completionHandler:] + 1228  
32 AppKit 0x00007fff365de545 \_NSTSMEventHandler + 306  
33 HIToolbox 0x00007fff37f2422e \_ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1422  
34 HIToolbox 0x00007fff37f235df \_ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 371  
35 HIToolbox 0x00007fff37f23465 SendEventToEventTargetWithOptions + 45  
36 HIToolbox 0x00007fff37f8af8f SendTSMEvent\_WithCompletionHandler + 383  
37 HIToolbox 0x00007fff3812bf61 \_\_SendTextInputEvent\_WithCompletionHandler\_block\_invoke + 489  
38 HIToolbox 0x00007fff3812a749 SendTextInputEvent\_WithCompletionHandler + 1126  
39 HIToolbox 0x00007fff3818e264 -[IMKInputSession \_postEvent:completionHandler:] + 170  
40 HIToolbox 0x00007fff3818e177 -[IMKInputSession \_createAndSendOffsetToPointEvent:completionHandler:] + 290  
41 HIToolbox 0x00007fff381a57de -[IMKInputSession attributesForCharacterIndex\_andLineRect:completionHandler:] + 565  
42 HIToolbox 0x00007fff381a6380 -[IMKInputSession attributesForCharacterIndex:completionHandler:] + 77  
43 HIToolbox 0x00007fff3818fcdc \_\_60-[IMKInputSession imkxpc\_attributesForCharacterIndex:reply:]\_block\_invoke + 478  
44 CoreFoundation 0x00007fff38d04df8 **CFRUNLOOP\_IS\_CALLING\_OUT\_TO\_A\_BLOCK** + 12  
45 CoreFoundation 0x00007fff38cc8517 \_\_CFRunLoopDoBlocks + 394  
46 CoreFoundation 0x00007fff38cc8274 \_\_CFRunLoopRun + 2772  
47 CoreFoundation 0x00007fff38cc754e CFRunLoopRunSpecific + 455  
48 HIToolbox 0x00007fff37f71867 -[IMKInputSessionXPCInvocation invocationAwaitXPCReply] + 551  
49 HIToolbox 0x00007fff38180811 \_\_49-[IMKInputSession handleEvent:completionHandler:]\_block\_invoke\_2.441 + 1575  
50 HIToolbox 0x00007fff3817fd0b \_\_49-[IMKInputSession handleEvent:completionHandler:]\_block\_invoke\_2.411 + 449  
51 HIToolbox 0x00007fff3816e0f2 -[IMKClient switchedInputMode:completionHandler:] + 400  
52 HIToolbox 0x00007fff3817ece6 -[IMKInputSession tryHandleEventSwitchedInputMode:eventWasHandled:continuationHandler:] + 116  
53 HIToolbox 0x00007fff3817fb08 \_\_49-[IMKInputSession handleEvent:completionHandler:]\_block\_invoke.410 + 205  
54 HIToolbox 0x00007fff3817f944 \_\_49-[IMKInputSession handleEvent:completionHandler:]\_block\_invoke + 271  
55 HIToolbox 0x00007fff3818ad5b -[IMKInputSession \_eventIsOn:completionHandler:] + 2085  
56 HIToolbox 0x00007fff3817f1c8 -[IMKInputSession handleEvent:completionHandler:] + 823  
57 HIToolbox 0x00007fff3813ab8c IMKInputSessionProcessEventRefWithCompletionHandler + 114  
58 HIToolbox 0x00007fff3813a2fe InputMethodInstanceProcessEventRef\_WithCompletionHandler + 122  
59 HIToolbox

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 30, 2020, 12:45am UTC](https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366/2 "2020-05-30T00:45:10Z")

</div>

Hi @software,

Thanks for the post. 我们基于你的反馈发现了这个问题，我们会在下个release修复。

谢谢

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/software/32/50584_2.png) [@software](https://devforum.zoom.us/u/software)\
**Post date:** [July 13, 2020, 1:47am UTC](https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366/3 "2020-07-13T01:47:44Z")

</div>

hi，您好，请问新版本里修复这个问题了吗？

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [July 17, 2020, 11:56pm UTC](https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366/4 "2020-07-17T23:56:00Z")

</div>

Hi @software,

你好，这个问题已经在最新的https://github.com/zoom/zoom-sdk-macos/releases/tag/v5.0.24433.0616里修复了。

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:45pm UTC](https://devforum.zoom.us/t/zoom-sdk-v4-6-21666-0427-app/19366/5 "2020-08-21T22:45:24Z")

</div>

Closed on August 21, 2020, 10:45pm UTC


