-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
截取屏幕扫码崩溃 #22
Comments
win10无法复现 根据网上的信息,应该是偶然性错误,有别的程序占用了剪切板 (没记错的话向日葵就经常把我的剪切板搞坏,复制不了东西 |
我使用的版本是Windows11,而且我没有安装向日葵,可以使用Win徽标键+Shift+S进行截图,此时再截取屏幕就会程序就会崩溃。 |
既然能稳定复现,方便用剪切板查看器看看扫码前有什么东西吗 |
好像是我的剪贴板历史记录工具有时会在处理大体积内容(如图片)占用我的剪贴板导致该工具异常报错,但还是建议对这部分代码进行异常捕获防止崩溃,相关问题参考https://stackoverflow.com/questions/68666/clipbrd-e-cant-open-error-when-setting-the-clipboard-from-net |
如果原有剪贴板内容为图片等二进制格式的话,截取屏幕扫描二维码程序会崩溃,调试后发现ClipWindow类的134行的Clipboard.SetText(Result);会出现异常,异常为HRESULT:0x800401D0 (CLIPBRD_E_CANT_OPEN),将此处变更为Clipboard.SetDataObject(Result);就不再报错了
The text was updated successfully, but these errors were encountered: