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
Can't capture Rust process #78
Comments
Turns out that's a red-herring. It looks like the application does live for a short while, and then just gets terminated. |
I've also attached the resulting capture that's being made, something is off here, because from the loop above you'd expect the application to loop indefinitely and never terminate, but for some reason a capture is being made (even showing traces inside print / vec) but the app just lives way too short. |
First thing that comes to mind is that injected DLL crashes bringing down the whole process. Regarding the text output from the first post, it seems this was done with older MTuner and there is likely a bug that could be causing missing text which was fixed recently. Might be worth trying with v4.5.0 |
I can debug this a bit if you give me some pointers how to set it up under visual studio |
I just double checked two things;
|
I just tried this and it's working for me fine. 'Hi' is printed indefinitely and once I close the console window (kill the process) the capture file is stored as expected. I built the test locally, did not use your executable. |
Yes that's expected (see first description of the issue), however, when running the rust app normally it doesn't pick it up and won't capture. |
What do you mean by "when running the rust app normally it doesn't pick it up and won't capture"? I could also drag and drop your example to MTuner window and it's working fine. |
Exactly that part (either drag & drop, or through the advanced settings) isn't working for me it seems. I think the rust app panics and terminates early for some reason, but I can't read stderr/ stdout so I have no way of figuring out what's going on. |
It looks like something is slightly off when capturing Rust applications. I'm trying to capture my application, but it instantly terminates (I can vaguely make out a copyright notice when it does).
However, invoking the application manually through a command like
C:\Users\Jasper\Downloads\mtuner64\MTuner\MTunerInject64.exe #23#C:/Users/Jasper/rust-test/target/debug/rust-test.exe#23# #23##23# #23##23#
does seem to produce somewhat correct output. It does look like the injector tool returns back to the terminal but the application keeps living, leading to output like this;Attached is a Rust application that does the following;
(can be re-created with
cargo new rust-test
and then pasting the code above inmain.rs
, then runningcargo build
)One clue / red herring might be that rust applications typically are compiled with
/SUBSYSTEM:Console
, though I'm not sure if it's related or not.rust-test.zip
The text was updated successfully, but these errors were encountered: