fix: 클립보드가 잠깐 바쁠 때 복사·붙여넣기가 조용히 실패하던 것 - #55
Merged
Merged
Conversation
클립보드를 지켜보는 프로그램(클립보드 기록 등)이 변경 직후 클립보드를 잠깐 연다. 그때 닿은 호출은 CLIPBRD_E_CANT_OPEN(0x800401D0)으로 실패하는데, 모든 호출부가 삼키고 다음 형식으로 넘어갔다 — HTML이 평문으로 붙거나 아무것도 안 붙고, 복사가 사라졌다. - 그 오류만 await로 20 ms × 최대 10회 재시도(RetryWhileClipboardBusyAsync). 읽기·쓰기·GetContent 모두. sleep 재시도는 안 된다: 잠근 쪽이 우리 UI 스레드에 형식 렌더링을 요청하는 중이라 끝까지 안 풀린다. - 잘라내기는 복사 시작 → 삭제 → 쓰기 대기 순서(대기 중 입력이 선택을 옮겨 다른 곳을 지우지 않게). - 링크 복사 메뉴도 같은 재시도 + 예외 보고(전에는 예외 처리 없음). 실측(개발 PC, 실제 경합): 수정 전 붙여넣기 9/150·복사 18/300 실패 → sleep 재시도 복사 5/300 → await 재시도 3회 반복 붙여넣기 0/450·복사 0/900. 전체 테스트 3회 887 통과. 가끔 실패하던 ControlFeatureFlagTests의 HTML 붙여넣기 테스트의 원인이다. 같은 프로세스 스레드로 클립보드를 잡는 결정적 테스트는 실제 경합과 동작이 달라(읽기가 빈 내용을 돌려줌) 넣지 않았다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
클립보드 기록(Win+V) 같은 감시 프로그램이 변경 직후 클립보드를 잠깐 연다. 그때 닿은 호출은
CLIPBRD_E_CANT_OPEN(0x800401D0)으로 실패하고, 모든 호출부가 삼킨 채 다음 형식으로 넘어갔다.가끔 실패하던
ControlFeatureFlagTests.AllowRemoteImagesOnPaste_…PastingHtml…(PR #54에서 보고)의 원인이다.수정
RetryWhileClipboardBusyAsync).Thread.Sleep재시도는 안 된다 — 잠근 쪽이 우리 UI 스레드에 형식 렌더링을 요청하는 중이라 끝까지 안 풀린다(실측).검증 (개발 PC, 실제 경합)
전체 테스트 3회 887 통과. 계측은 임시 코드라 커밋하지 않았다. 같은 프로세스 스레드로 클립보드를 잡는 결정적 테스트도 시도했지만, 실제 경합과 동작이 달라(읽기가 오류 대신 빈 내용을 돌려줌) 넣지 않았다.
🤖 Generated with Claude Code