Search code examples
windowsqtcrashqt5non-english

Why does the Qt program crash when it is in a path that contains any non-English characters?


my operation system is Windows7 SP1, Qt version is 5.12.0. I built an exe file by VS2017, when I double-click the exe to run, it will crash if its path contains any non-English characters(e.g. Chinese, Korean, Japanese, etc.) The code that triggered the crash is this line—

QWebEngineSettings *settings = QWebEngineSettings::defaultSettings();

This is the disassembly view when crash

enter image description here

And this is the stack view when crash

enter image description here

Does anybody have any idea of this problem?


Solution

  • I've found out the reason for this problem. The reason is that the version of the Qt dlls which the program runs with(5.14.0) is different from the version I set in the VS2017 for building the program(5.12.0). I'm sorry.