eteran / nedit-ng

a Qt5 port of the NEdit using modern C++14
GNU General Public License v2.0
96 stars 26 forks source link

crash when closing tab while macro is running #306

Closed marilmanen closed 3 years ago

marilmanen commented 3 years ago

I accidentally closed a tab from which I had launched an xterm in a macro, so the macro was still running. Closing the tab caused a crash with nedit version 079cc39. Here is the terminal output with QT 5.15.3 Warning: QProcess: Destroyed while process ("/bin/tcsh") is still running. Segmentation fault (core dumped)

eteran commented 3 years ago

Ouch, so so when you say "launched an xterm in a macro", what precisely do you mean, I don't recall macros themselves being able to start sub-processes.

Do you mean that you had it run a shell command?

eteran commented 3 years ago

Ohh... NVM. did you do an execute_command inside a macro? And that command was xterm?

eteran commented 3 years ago

Hmm, OK here's the steps I think I need to reproduce:

  1. create a macro that simply says:
execute_command("xterm")
  1. Open multiple tabls

  2. Run the new macro

  3. Close the tab which ran the macro


Unfortunately, doing that, I don't get a crash. I do get a warning about QProcess being destroyed while still running, but no segfault. I'll continue to investigate.

eteran commented 3 years ago

OK, got a crash. Debugging :-)

eteran commented 3 years ago

Should be fixed in master! :-)

Thanks as usual!