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

rust-msc-latest-linux 工具运行时crash #291

Closed
teddyxiong53 opened this issue Mar 1, 2023 · 2 comments
Closed

rust-msc-latest-linux 工具运行时crash #291

teddyxiong53 opened this issue Mar 1, 2023 · 2 comments

Comments

@teddyxiong53
Copy link

测试平台

5.4.0-136-generic #153~18.04.1-Ubuntu SMP Wed Nov 30 15:47:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
非docker环境。手动安装的相关工具链。手动编译。

现象描述

重复执行rust-msc-latest-linux 命令,如果目录已经有pikascript-api目录,则改命令会crash掉。此时需要手动删掉pikascript-api目录再执行则正常。

代码版本

fc5e211

出错打印

./rust-msc-latest-linux 
(pikascript) packages installed:
    pikascript-core==latest
    PikaStdLib==latest

(pikascript) pika compiler:
  scaning main.py...
    binding PikaStdLib.pyi...
    binding PikaStdData.pyi...
    binding PikaStdTask.pyi...
    binding PikaDebug.pyi...
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 21, kind: IsADirectory, message: "Is a directory" }', src/compiler.rs:53:40
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
@pikasTech
Copy link
Owner

我看了一下源码,就是rust操作fs的删除行为失败了。

有可能是权限问题,也可能是文件被占用了。试试加权限,或者用 wine 直接运行 exe

@teddyxiong53
Copy link
Author

今天又没有复现了。之前原因应该就是删除目录失败。可以加一个错误检查,出错时给提示并返回,避免crash。

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

2 participants