IAliceBobI / sy-tomato-plugin

MIT License
14 stars 2 forks source link

反链面板拖拽内容到文档再撤回导致异常 #45

Closed d-sun-cs closed 3 weeks ago

d-sun-cs commented 3 weeks ago

win11 思源笔记v3.1.3

初始状态:

image

拖动列表项到文档,没有异常:

image

在文档内按“Ctrl Z”撤回,出现异常:

image

点击强制退出,系统日志:

I 2024/08/17 11:24:27 working.go:147: 
      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2024/08/17 11:24:27 runtime.go:74: kernel is booting:
    * ver [3.1.3]
    * arch [amd64]
    * os [Microsoft Windows 11 Home China]
    * pid [14532]
    * runtime mode [prod]
    * working directory [C:\Users\dsun\AppData\Local\Programs\SiYuan\resources]
    * read only [false]
    * container [std]
    * database [ver=20220501]
    * workspace directory [C:\Users\dsun\SiYuan]
I 2024/08/17 11:24:27 conf.go:125: loaded conf [C:\Users\dsun\SiYuan\conf\conf.json]
I 2024/08/17 11:24:27 runtime.go:123: use network proxy [system]
I 2024/08/17 11:24:27 serve.go:127: kernel [pid=14532] http server [127.0.0.1:51280] is booting
I 2024/08/17 11:24:27 conf.go:838: database size [131.08 kB], tree/block count [2/44]
I 2024/08/17 11:24:27 working.go:193: kernel booted
I 2024/08/17 11:24:27 pandoc.go:146: built-in pandoc [ver=3.1.1, bin=C:\Users\dsun\SiYuan\temp\pandoc\bin\pandoc.exe]
I 2024/08/17 11:24:27 conf.go:1100: pandoc initialized, set pandoc bin to [C:\Users\dsun\SiYuan\temp\pandoc\bin\pandoc.exe]
I 2024/08/17 11:24:27 box.go:77: auto stat [trees=2, blocks=44, dataSize=3.72 MB, assetsSize=0 B]
I 2024/08/17 11:24:27 disk.go:33: disk usage [total=215.06 GB, used=98.11 GB, free=116.95 GB]
I 2024/08/17 11:24:28 fixedport.go:35: fixed port service [127.0.0.1:6806] is running
W 2024/08/17 11:24:31 tree.go:218: block tree not found [id=20240817112431-khlx3eb], stack: [    github.com/siyuan-note/siyuan/kernel/model.LoadTreeByBlockID({0xc001516ea0, 0x16})
        D:/88250/siyuan/kernel/model/tree.go:218 +0x6d
    github.com/siyuan-note/siyuan/kernel/model.BuildBlockBreadcrumb({0xc001516ea0, 0x16}, {0x0, 0x0, 0x0})
        D:/88250/siyuan/kernel/model/blockinfo.go:329 +0x30
    github.com/siyuan-note/siyuan/kernel/api.getBlockBreadcrumb(0xc001924100)
        D:/88250/siyuan/kernel/api/block.go:451 +0x19a
]
E 2024/08/17 11:24:37 transaction.go:312: get node [20240817112431-2g7lpq7] in tree [20240817091013-jdc7yu5] failed
I 2024/08/17 11:24:38 conf.go:595: exiting kernel [force=false, setCurrentWorkspace=true, execInstallPkg=0]
I 2024/08/17 11:24:39 database.go:1284: closed database
I 2024/08/17 11:24:39 conf.go:1021: cleared workspace temp
I 2024/08/17 11:24:40 sync.go:722: sync websocket closed

期望:在拖拽到文档后,撤回操作可以正常删除被拖拽的内容,或者直接禁用撤回

本人水平有限,如有陈述不妥,敬请谅解

作者辛苦🩷

IAliceBobI commented 3 weeks ago

image

如果是拖动操作,那就是思源原来的功能了。

可以试试这个按钮。 但撤回操作都支持不好。

d-sun-cs commented 3 weeks ago

image

如果是拖动操作,那就是思源原来的功能了。

可以试试这个按钮。 但撤回操作都支持不好。

这个按钮不会导致异常了,虽然不能撤回,但目前也能用

感谢作者回复