Fixed the Unicode-path crash and misleading AI Assistant teardown fault (SpartanJ/ecode#953).

- Windows executable paths now always use GetModuleFileNameW(), with dynamic long-path support.
  - Sys::getProcessPath() derives directly from the UTF-8 executable path.
  - Windows working-directory APIs now use wide-character functions under both MinGW and MSVC.
  - AI Assistant teardown checks that the editor splitter exists during partial initialization.
  - Added process-path and Unicode working-directory regression tests using EXPECT_STDSTREQ.
This commit is contained in:
Martín Lucas Golini
2026-09-11 00:03:03 -03:00
parent 3effffd16f
commit 60ac3a0ffa
4 changed files with 80 additions and 61 deletions
@@ -276,7 +276,8 @@ AIAssistantPlugin::~AIAssistantPlugin() {
mModelCatalog->cancel();
mModelCatalog.reset();
}
if ( SceneManager::existsSingleton() && !SceneManager::instance()->isShuttingDown() ) {
if ( SceneManager::existsSingleton() && !SceneManager::instance()->isShuttingDown() &&
getPluginContext() && getPluginContext()->getSplitter() ) {
getPluginContext()->getSplitter()->forEachWidgetClass(
"llm_chatui", []( UIWidget* widget ) {
LLMChatUI* chat = static_cast<LLMChatUI*>( widget );