chaldea-center / chaldea

Chaldea - Yet Another Material Planner and Battle Simulator for Fate/Grand Order aka FGO
https://docs.chaldea.center
GNU Affero General Public License v3.0
322 stars 25 forks source link

[Bug]: 开着webui(novelAI)的时候,打开chaldea win版会无法加载主界面,log附上。 #80

Closed dajusha closed 1 year ago

dajusha commented 1 year ago

What happened?

不是白屏,窗口内有两个链接指向中英文FAQ,下面是一些提示“\userdata\hive\security.lock”被锁定之类的文字,log里也有。

然后chaldea窗口还无法关闭,需要在任务管理器杀进程。

只要关掉webui(novelAI),再打开chaldea就正常了。

我不确定是哪一边的问题,话说好像那边也没有理由去锁chaldea文件夹里的东西。

Platform

Windows

Device Info

No response

Which game server is related to this issue?

No response

App Version

2.2.4 920

Relevant log output

app_info.dart:92)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:173)
├ [2023-02-10 12:08:39.226][INFO] Resolved app version: cc.narumi.chaldea 2.2.4+920 fbbde6 - 2/2/2023
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:08:39.226][ERROR] open Box<dynamic> "security" failed
└---------
├ #0   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:40)
│ #1   _Database.initiate (package:chaldea/models/db.dart:148)
├ [2023-02-10 12:08:40.229][DEBUG] deleting box security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _File._delete.<anonymous closure> (dart:io/file_impl.dart:298)
│ #2   BackendManager._deleteFileIfExists (package:hive/src/backend/vm/backend_manager.dart:82)
│ #3   BackendManager.deleteBox (package:hive/src/backend/vm/backend_manager.dart:75)
│ #4   HiveImpl.deleteBoxFromDisk (package:hive/src/hive_impl.dart:232)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:42)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: Cannot delete file, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.hive' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32)
├ [2023-02-10 12:08:40.229][ERROR] deleting box failed: security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:08:41.230][ERROR] open Box<dynamic> "security" failed
└---------
├ #0   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:40)
│ #1   _Database.initiate (package:chaldea/models/db.dart:148)
├ [2023-02-10 12:08:42.232][DEBUG] deleting box security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _File._delete.<anonymous closure> (dart:io/file_impl.dart:298)
│ #2   BackendManager._deleteFileIfExists (package:hive/src/backend/vm/backend_manager.dart:82)
│ #3   BackendManager.deleteBox (package:hive/src/backend/vm/backend_manager.dart:75)
│ #4   HiveImpl.deleteBoxFromDisk (package:hive/src/hive_impl.dart:232)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:42)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: Cannot delete file, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.hive' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32)
├ [2023-02-10 12:08:42.232][ERROR] deleting box failed: security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:08:43.234][ERROR] open Box<dynamic> "security" failed
└---------
├ #0   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:40)
│ #1   _Database.initiate (package:chaldea/models/db.dart:148)
├ [2023-02-10 12:08:44.237][DEBUG] deleting box security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _File._delete.<anonymous closure> (dart:io/file_impl.dart:298)
│ #2   BackendManager._deleteFileIfExists (package:hive/src/backend/vm/backend_manager.dart:82)
│ #3   BackendManager.deleteBox (package:hive/src/backend/vm/backend_manager.dart:75)
│ #4   HiveImpl.deleteBoxFromDisk (package:hive/src/hive_impl.dart:232)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:42)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: Cannot delete file, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.hive' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32)
├ [2023-02-10 12:08:44.237][ERROR] deleting box failed: security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:08:45.238][ERROR] initiate app failed at startup
└---------
├ #0   AppInfo._loadUniqueId (package:chaldea/packages/app_info.dart:167)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:171)
├ [2023-02-10 12:09:36.393][INFO] Unique ID: 546EB7E1-F39E-5381-9013-5A075D7E6D5B
└---------
├ #0   AppInfo._loadApplicationInfo (package:chaldea/packages/app_info.dart:92)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:173)
├ [2023-02-10 12:09:36.394][INFO] Resolved app version: cc.narumi.chaldea 2.2.4+920 fbbde6 - 2/2/2023
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:09:36.395][ERROR] open Box<dynamic> "security" failed
└---------
├ #0   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:40)
│ #1   _Database.initiate (package:chaldea/models/db.dart:148)
├ [2023-02-10 12:09:37.396][DEBUG] deleting box security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _File._delete.<anonymous closure> (dart:io/file_impl.dart:298)
│ #2   BackendManager._deleteFileIfExists (package:hive/src/backend/vm/backend_manager.dart:82)
│ #3   BackendManager.deleteBox (package:hive/src/backend/vm/backend_manager.dart:75)
│ #4   HiveImpl.deleteBoxFromDisk (package:hive/src/hive_impl.dart:232)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:42)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: Cannot delete file, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.hive' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32)
├ [2023-02-10 12:09:37.396][ERROR] deleting box failed: security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:09:38.400][ERROR] open Box<dynamic> "security" failed
└---------
├ #0   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:40)
│ #1   _Database.initiate (package:chaldea/models/db.dart:148)
├ [2023-02-10 12:09:39.401][DEBUG] deleting box security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _File._delete.<anonymous closure> (dart:io/file_impl.dart:298)
│ #2   BackendManager._deleteFileIfExists (package:hive/src/backend/vm/backend_manager.dart:82)
│ #3   BackendManager.deleteBox (package:hive/src/backend/vm/backend_manager.dart:75)
│ #4   HiveImpl.deleteBoxFromDisk (package:hive/src/hive_impl.dart:232)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:42)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: Cannot delete file, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.hive' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32)
├ [2023-02-10 12:09:39.401][ERROR] deleting box failed: security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:09:40.404][ERROR] open Box<dynamic> "security" failed
└---------
├ #0   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:40)
│ #1   _Database.initiate (package:chaldea/models/db.dart:148)
├ [2023-02-10 12:09:41.406][DEBUG] deleting box security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _File._delete.<anonymous closure> (dart:io/file_impl.dart:298)
│ #2   BackendManager._deleteFileIfExists (package:hive/src/backend/vm/backend_manager.dart:82)
│ #3   BackendManager.deleteBox (package:hive/src/backend/vm/backend_manager.dart:75)
│ #4   HiveImpl.deleteBoxFromDisk (package:hive/src/hive_impl.dart:232)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:42)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: Cannot delete file, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.hive' (OS Error: The process cannot access the file because it is being used by another process.
, errno = 32)
├ [2023-02-10 12:09:41.407][ERROR] deleting box failed: security
└---------
├ #0   _checkForErrorResponse (dart:io/common.dart:42)
│ #1   _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:976)
│ #2   StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:81)
│ #3   HiveImpl._openBox (package:hive/src/hive_impl.dart:111)
│ #4   HiveImpl.openBox (package:hive/src/hive_impl.dart:142)
│ #5   HiveRetryOpen.openBoxRetry (package:chaldea/utils/hive_extention.dart:27)
│ #6   _Database.initiate (package:chaldea/models/db.dart:148)
│ #7   main (package:chaldea/main.dart:33)
├ FileSystemException: lock failed, path = 'X:\xxx\chaldea-preview-windows\userdata\hive\security.lock' (OS Error: The process cannot access the file because another process has locked a portion of the file.
, errno = 33)
├ [2023-02-10 12:09:42.409][ERROR] initiate app failed at startup
└---------
narumi147 commented 1 year ago

鬼知道webui在干嘛……*.lock文件主要用于防止两个程序同时读写某个文件从而发生意外。既然锁定不了,那肯定是别的程序占用锁定了。 打开 资源管理器(not任务管理器)->CPU页->下方有个搜索框,搜索security.lock,会显示占用这个文件句柄的程序。

关于无法关闭...还没头绪,窗口是无响应卡主还是只是点击关闭无事发生,此时FAQ两个按钮能按是吧?

dajusha commented 1 year ago

刚才实验两次,无法复现了…… log:

├ #0   AppInfo._loadUniqueId (package:chaldea/packages/app_info.dart:167)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:171)
├ [2023-02-10 18:37:41.692][INFO] Unique ID: 546EB7E1-F39E-5381-9013-5A075D7E6D5B
└---------
├ #0   AppInfo._loadApplicationInfo (package:chaldea/packages/app_info.dart:92)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:173)
├ [2023-02-10 18:37:41.693][INFO] Resolved app version: cc.narumi.chaldea 2.2.4+920 fbbde6 - 2/2/2023
└---------
├ #0   GameDataLoader._loadJson (package:chaldea/app/tools/gamedata_loader.dart:265)
│ #1   GameDataLoader.reload (package:chaldea/app/tools/gamedata_loader.dart:88)
├ [2023-02-10 18:37:46.836][INFO] Updating dataset(2023-02-10 12:27): 0 files updated
└---------
├ #0   _ChaldeaState.setOnWindowClose.<anonymous closure> (package:chaldea/app/chaldea.dart:182)
│ #1   FlutterWindowClose.setWindowShouldCloseHandler.<anonymous closure> (package:flutter_window_close/flutter_window_close.dart:63)
├ [2023-02-10 18:37:53.789][INFO] closing desktop app...
└---------
├ #0   AppInfo._loadUniqueId (package:chaldea/packages/app_info.dart:167)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:171)
├ [2023-02-10 18:38:52.485][INFO] Unique ID: 546EB7E1-F39E-5381-9013-5A075D7E6D5B
└---------
├ #0   AppInfo._loadApplicationInfo (package:chaldea/packages/app_info.dart:92)
│ #1   AppInfo.resolve (package:chaldea/packages/app_info.dart:173)
├ [2023-02-10 18:38:52.486][INFO] Resolved app version: cc.narumi.chaldea 2.2.4+920 fbbde6 - 2/2/2023
└---------
├ #0   GameDataLoader._loadJson (package:chaldea/app/tools/gamedata_loader.dart:265)
│ #1   GameDataLoader.reload (package:chaldea/app/tools/gamedata_loader.dart:88)
├ [2023-02-10 18:38:57.240][INFO] Updating dataset(2023-02-10 12:27): 0 files updated
└---------
├ #0   _ChaldeaState.setOnWindowClose.<anonymous closure> (package:chaldea/app/chaldea.dart:182)
│ #1   FlutterWindowClose.setWindowShouldCloseHandler.<anonymous closure> (package:flutter_window_close/flutter_window_close.dart:63)
├ [2023-02-10 18:38:59.214][INFO] closing desktop app...
└---------

窗口是点击关闭无事发生,此时FAQ两个按钮能按

顺便请解释“资源管理器(not任务管理器)->CPU页->下方有个搜索框,”? 我win11哪边都没有CPU页,来个示例图?

narumi147 commented 1 year ago

参考 https://zhuanlan.zhihu.com/p/158119424

你不会在任务管理器里找吧,打开开始菜单搜索 资源管理器

你现在能打开那你现在搜索文件句柄只能搜到chaldea.exe…… 不过也不一定是webui,可能是其他杀毒软件或什么的maybe

dajusha commented 1 year ago

参考 https://zhuanlan.zhihu.com/p/158119424

你不会在任务管理器里找吧,打开开始菜单搜索 资源管理器

你现在能打开那你现在搜索文件句柄只能搜到chaldea.exe…… 不过也不一定是webui,可能是其他杀毒软件或什么的maybe

艹……自从换了win11就没用过这个了,找到了,目前确实除了chaldea没有锁了,不知为何。 当时怀疑是webui干的,因为关掉它就正常了,而且当时也没开别的东西。

narumi147 commented 1 year ago

你就是啥都不开,后台运行的程序也有成百上千个

文件被锁定和本应用无关,也不太有准备备用方案的打算。

有点费解的是窗口无法关闭,等啥时候win测试pc能用了再想吧==、

dajusha commented 1 year ago

也是,再出现的话我再提这个,现在先不管了