We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4428 - ime_threadmgrex turns invalid if window loses focus while using COINIT_MULTITHREADED
Summary: ime_threadmgrex turns invalid if window loses focus while using COINIT_MULTIT...
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.9
Hardware: x86_64 Windows 10
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-16 10:01 UTC by t.eddenburg
Modified: 2019-02-07 22:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description t.eddenburg 2018-12-16 10:01:34 UTC
Before initializing SDL2 I call CoInitializeEx(0, COINIT_MULTITHREADED).
Then using the events subsystem, it works fine until my window loses fokus.
Then it does lose fokus in SDL_windowskeyboard.c in UILess_DisableUIUpdates will be a read access violation since ime_threadmgrex->lpVtbl turns invalid (the pointer lpVtbl itself didn't change).
This does not happen without CoInitializeEx(0, COINIT_MULTITHREADED), but SDl2 is supposed to be compatible with COINIT_MULTITHREADED?
Comment 1 xenotron007 2019-02-07 22:09:21 UTC
The crashing code belongs to the uiless windows IME that seems to be incomplete and doesn't work. You can try to disable it by recompiling the library with either SDL_DISABLE_WINDOWS_IME defined or the following line commented out:

videodata->ime_uiless = UILess_SetupSinks(videodata);