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

Is there a method for the terminal window to also receive the "segmentation fault (core dumped) ./a.exe" message? #293

Open
0BananaBig0 opened this issue Jan 25, 2025 · 3 comments

Comments

@0BananaBig0
Copy link

I found that if the segmentation fault occurred because of my bad code, the terminal window does not receive or display this information. Is there a method to address this issue?

#include <iostream>

class DerivedA {
   public:
      ~DerivedA() { delete this; };
};

class DerivedB {};

int main() {
   [[maybe_unused]] DerivedA a;
   return 0;
}
@skywind3000
Copy link
Owner

So what's wrong with this plugin? What command do you use?

@0BananaBig0
Copy link
Author

So what's wrong with this plugin? What command do you use?

I have tried both AsyncRun! -mode=term g++ ./a.cpp -o a.exe && ./a.exe and AsyncRun! -mode=async g++ ./a.cpp -o a.exe && ./a.exe. In theory, the output window should display [1] 3546 segmentation fault (core dumped) ./a.exe due to a double deletion in my code. However, nothing appears in the Vim output window. Is there a method to make the output window capture and display the segmentation fault information?

@0BananaBig0
Copy link
Author

So what's wrong with this plugin? What command do you use?

My async configuration:

  let g:asyncrun_bell = 1
  let g:asyncrun_save = 1
  let g:asyncrun_mode = 'term'

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