Skip to content

Fix startup crash immediately - #2

Open
ndevel wants to merge 2 commits into
watersfree:mainfrom
ndevel:main
Open

ndevel wants to merge 2 commits into
watersfree:mainfrom
ndevel:main

Conversation

@ndevel

@ndevel ndevel commented Sep 4, 2026

Copy link
Copy Markdown

When double click to run the app on win11, it crashes immediately. Bug fixes in this patch.

@ndevel

ndevel commented Sep 4, 2026

Copy link
Copy Markdown
Author

The TXTBIT_ADVANCEDINPUT flag enables TSF (Text Services Framework) in the rich edit, but the UI thread never initializes TSF (ITfThreadMgr never activated). When WM_SETFOCUS arrives, Msftedit tries to activate TSF → null dereference → crash.
The fix: remove TXTBIT_ADVANCEDINPUT from the rich edit property bits. This makes Msftedit use the traditional IMM API instead of TSF, avoiding the crash. For Chinese IME support, we'll make TxImmGetContext() return the actual IME context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant