Skip to content
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

LuaPanda.printToVSCode 输出的日志,包含异常字符导致消息被错误截断 #100

Open
stuartwang opened this issue Nov 14, 2020 · 3 comments
Milestone

Comments

@stuartwang
Copy link
Collaborator

stuartwang commented Nov 14, 2020

image
LuaPanda 把lua取得的变量信息传输过程中都用base64编码了,以免遇到异常字符问题。但是用户使用LuaPanda.printToVSCode打印的没有被编码
这里出现了异常字符,导致消息被错误截断。 最终表现是Vscode端解析消息异常,出现卡死
image

@stuartwang
Copy link
Collaborator Author

用户短期处理方案可以删除有问题的LuaPanda.printToVSCode输出日志。
修复方案
1 可以对用户LuaPanda.printToVSCode输出的消息日志内容传输过程中也做一下编码,
2 或者改用根据长度截断。我记到issue里后面处理下
二选一,应该都能解决问题

@stuartwang
Copy link
Collaborator Author

已优化.
目前对变量名,变量值,LuaPanda.printToVSCode 打印的日志在传输过程中做 base64

@stuartwang
Copy link
Collaborator Author

这个优化准备在3.2.0版本暂时移除,原因是为了保持低版本兼容性。如果日志中或者变量名中可能出现异常字符,建议参考上面的提交先自行加上代码并打包。 也可以手动去除出现问题的日志。
后面的版本会把这个特性加上,但需要做更多的兼容处理

stuartwang added a commit that referenced this issue Nov 19, 2020
@stuartwang stuartwang reopened this Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant