Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Windows 端部分系统上内核崩溃 https://github.com/siyuan-note/siyuan/issues/7806

Liang Dingdb95671a65b8
diff --git a/kernel/util/runtime.go b/kernel/util/runtime.go
index 7871b4752e..31c6054356 100644
--- a/kernel/util/runtime.go
+++ b/kernel/util/runtime.go
@@ -315,7 +315,12 @@ func existAvailabilityStatus(workspaceAbsPath string) bool {
logging.LogInfof("check workspace [%s] availability status", checkAbsPath)
- ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
+ runtime.LockOSThread()
+ defer runtime.LockOSThread()
+ if err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED); nil != err {
+ logging.LogWarnf("initialize ole failed: %s", err)
+ return false
+ }
defer ole.CoUninitialize()
dir, file := filepath.Split(checkAbsPath)
unknown, err := oleutil.CreateObject("Shell.Application")