TiddlyDesktop
TiddlyDesktop copied to clipboard
[BUG] Wrong behavior on open new TiddlyDesktop instance
Hello, found some nasty bug in this great app :)
Steps to reproduce:
- Run app and wait until it loads
- Run app again (open another instance)
What we expect:
2 same app windows (with TW list in each)
What happens:
- second app window is blank and cannot be closed without forced nw process termination
- in first app window appears broken record:
- also if i open TiddlyDesktop Backstage - there are a new tiddler with record
wikifile://"<path_to_app>\TiddlyDesktop-win64-v0.0.14\nw.exe ..."
with all app launch parameters. (this text line can be partially seen on screenshot center)
Full wrong record name:
wikifile://"<path_to_app>\TiddlyDesktop-win64-v0.0.14\nw.exe" --mixed-context --enable-spell-checking --allow-file-access-from-files --allow-file-access --allow-file-cookies --user-data-dir="<user_folder>\AppData\Local\TiddlyDesktop\User Data" --no-sandbox --no-zygote --flag-switches-begin --flag-switches-end --enable-audio-service-sandbox --nwapp="<path_to_app>\TiddlyDesktop-win64-v0.0.14" --file-url-path-alias="/gen=<path_to_app>\TiddlyDesktop-win64-v0.0.14\gen"
Luckly, button "remove" is still working, an i can delete this broken record from the app after relaunch it.
This happens with TiddlyDesktop 0.0.14 on Win7 and current Win10.
I seen this first time after launching TW directly with --open
parameter and trying to open main app window with list of other TW's.
Best regards, M.K.
Thanks @gMakaan. The ability to run multiple instances of nw.js is supposed to be disabled in TiddlyDesktop (instead of running multiple instances you'd run multiple wikis within a single instance). It sounds like opening it with --open
forces a new instance. I'll investigate.
Thanks I was getting this error too without knowing what was causing it, I assumed there was an overflow somewhere but most likely I was opening a second instance without realising it sometimes. To fix you need to close TiddlyWikiDesktop, then double-check in task manager that nw.exe instances are all gone. Open TiddlyWikiDesktop and wait for it to load, then remove the glitched menu entry, then close (once again check task manager) and reopen and it should be fixed. Btw I never intentionally open multiple instances, I just click the shortcut to open it, there must be some instances where TiddlyWikiDesktop is not shutting down properly
I have exactly the same problem (tested on Windows 10). If you have one instance of tiddlydesktop running and (by accident) start another one the second one will only show a blank white empty page. If you then try to close them, you can only close the one you started at first. The second one can only be closed by killing all instances of nw.exe
via TaskManager. After that you have a "crippled" overview page with one or more "broken" entries.
This should be fixed somehow because the only way to get rid of the "broken" entries is to delete them and if you have no idea where the wiki files you added to TiddlyDesktop were located it can be hard to find them again to put them again into TiddlyDesktop.
删除此目录下的多余的文件即可解决问题:AppData\Local\TiddlyDesktop\User Data\Default\user-config-tiddlywiki\tiddlers
这两个多余的文件的文件名是$_TiddlyDesktop_Config_title_wikifile____D__Software_Z_Extended_TiddlyDesktop-win64-v0.0.15-prerelease.2_nw.exe --mixed-context --enable-spell-checking --allow-file-access-from-files --allow-file-ac.tid
wikifile____D__Software_Z_Extended_TiddlyDesktop-win64-v0.0.15-prerelease.2_nw.exe_ --mixed-context --enable-spell-checking --allow-file-access-from-files --allow-file-access --allow-file-cookies --di.tid
Thanks @gMakaan. The ability to run multiple instances of nw.js is supposed to be disabled in TiddlyDesktop (instead of running multiple instances you'd run multiple wikis within a single instance). It sounds like opening it with
--open
forces a new instance. I'll investigate.
Delete the two extra files in this directory to solve the problem. AppData\Local\TiddlyDesktop\User Data\Default\user-config-tiddlywiki\tiddlers
-
$_TiddlyDesktop_Config_title_wikifile____D__Software_Z_Extended_TiddlyDesktop-win64-v0.0.15-prerelease.2_nw.exe --mixed-context --enable-spell-checking --allow-file-access-from-files --allow-file-ac.tid
-
wikifile____D__Software_Z_Extended_TiddlyDesktop-win64-v0.0.15-prerelease.2_nw.exe_ --mixed-context --enable-spell-checking --allow-file-access-from-files --allow-file-access --allow-file-cookies --di.tid
可能是window-list.js的73到84行
经过测试发现注释掉就好了。
嗯,查看文件名对比发现,似乎是需要打开的wiki文件指向变成了nw程序而非TiddlyWiki的HTML文件而发生的错误。
Closed by accident, re-opening
As far as I can tell, the root cause is that the nw.js gui.App.on("open",...)
event handler is passed the full command line of the app, not just the filename that has been opened.
I'm going to disable that event handler for the moment, and make a new release for testing. It should mean that there will be no effect if an attempt is made to re-open the app.
The new release is available here: https://github.com/TiddlyWiki/TiddlyDesktop/releases/tag/v0.0.15-prerelease.6
Please let me know how you get on.
Thanks, it works fine now.
Excellent – thank you for all your help @Zacharia2 much appreciated.