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

xmake run不能执行目标程序 #4993

Open
dijunkun opened this issue Apr 19, 2024 · 9 comments
Open

xmake run不能执行目标程序 #4993

dijunkun opened this issue Apr 19, 2024 · 9 comments
Labels

Comments

@dijunkun
Copy link

Xmake 版本

2.8.9

操作系统版本和架构

Windows 10 专业版 22H2

描述问题

使用xmake run以及xmake run -d运行目标可执行程序时无任何打印及窗口输出,并立即执行结束。通过xmake VSCode插件debug按钮可以正常进行debug。可执行程序可以手动打开,并正常运行。

期待的结果

xmake run正确运行目标程序。

工程配置

target("remote_desk")
set_kind("binary")
add_deps("log", "common", "screen_capturer", "device_controller", "projectx")
add_files("src/gui/main.cpp")

附加信息和错误日志

xmake r -vD remote_desk无输出。

@dijunkun dijunkun added the bug label Apr 19, 2024
@waruqi
Copy link
Member

waruqi commented Apr 19, 2024

提供可复现的最小 example

@dijunkun dijunkun reopened this Apr 19, 2024
@dijunkun
Copy link
Author

提供可复现的最小 example

工程有些大,不太好提供最小可复现用例。目前定位到的现象是一旦在add_deps中添加“projectx”模块xmake run就会失效。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: xmake run cannot execute the target program

Xmake version

2.8.9

Operating system version and architecture

Windows 10 Pro 22H2

Describe the problem

When using xmake run and xmake run -d to run the target executable program, there is no printing or window output, and the execution ends immediately. Debugging can be performed normally through the xmake VSCode plug-in debug button. Executable programs can be opened manually and run normally.

Expected results

xmake run correctly runs the target program.

Project configuration

target("remote_desk")
set_kind("binary")
add_deps("log", "common", "screen_capturer", "device_controller", "projectx")
add_files("src/gui/main.cpp")

Additional information and error logs

xmake r -vD remote_desk has no output.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Provide a minimal reproducible example

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Provide a minimal reproducible example

The project is a bit large and it is not easy to provide the smallest reproducible use case. The phenomenon currently identified is that xmake run will fail once the "projectx" module is added to add_deps.

@waruqi
Copy link
Member

waruqi commented Apr 19, 2024

没法复现,这边也不好调试。。你可以自己调下源码 https://github.com/xmake-io/xmake/blob/master/xmake/actions/run/main.lua

@dijunkun
Copy link
Author

没法复现,这边也不好调试。。你可以自己调下源码 https://github.com/xmake-io/xmake/blob/master/xmake/actions/run/main.lua

执行到xmake/core/main.lua:327行 taskinst:run() 方法时发生崩溃
image
终端显示

checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
error: execv(xmake r remote_desk) failed(-1073740940)

是否可以认为是可执行程序内部发生错误,导致xmake run异常终止?

@waruqi
Copy link
Member

waruqi commented Apr 19, 2024

一般是你的 target 程序执行跪了,一种可能是依赖的某个 dll 没加载到,可以试下 dev 版本是否 ok

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Usually the execution of your target program is slow. One possibility is that a dependent dll is not loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants