The red abort button (the one in the main toolbar) halts the running program, but does not restore the build and run buttons for another attempt. C::B must be restarted to get normal functioning.
This is a regression in the 12.11 release, as near as I can tell, and also fails on the two nightlies I tried (3/9/14 9677 and 11/(15 or 18 or 28?)/14 10035).
In my system(WinXP), with rev 10035, when I click the abort button, I can't close the application.
@ollydbg: If that "labels: --> Compiler" refers to the toolbar, then yes--it's the compiler toolbar that is grayed out (or perhaps "greyed-out" in some localizations :^).
That's interesting about the application not closing. Looking again, the application doesn't close entirely on Win7 either. The console window is destroyed, but the test program still runs, and another process named "cb_console_runner.exe" is also still active, even if I close the main C::B windows. (I had 4 pairs of them left over from testing, a couple from weeks ago!)
Hi, Compiler means the this ticket is related to "Compiler plugin".
In my system, If I click on the "abort" toolbar button, I even can't close the console window. So, it is definitely a bug.
Ok, this is still valid for windows and the current trunk, and it is annoying.
If the application you run through codeblocks is stuck somehow (waiting for input stream or file operation ecc.) The stop button will not work. The console window gets closed, but the process is still running in the background. You have to use the task manager to kill the process.
If i replace wxSIGTERM with wxSIGKILL and add wxKILL_CHILDREN in plugins/compilergcc/compilergcc.cpp:2878
all works as expected. If i remove the wxKILL_CHILDREN flag, only the console runner gets killed, but the main process still remains.
Note, also wxWidgets suggests to use wxSIGKILL:
https://wiki.wxwidgets.org/WxProcess#SIGTERM_signal_on_wxMSW_only_works_on_windowed_applications
The question is if it is a good idea to kill the compiler with SIGKILL. Aborting compilation works, but waits for the compiler to finish its work prior to abort it...
Last edit: bluehazzard 2017-12-13
I think it is fine if we kill the compiler directly when the user presses the abort button. So please post a patch for evaluation.
Btw you need to pass wxEXEC_MAKE_GROUP_LEADER when starting the processes in order to be able to kill the children.
See here: http://docs.wxwidgets.org/trunk/classwx_process.html#a6b3ff71a9d026d93600add4cbb72a172
Last edit: Teodor Petrov 2017-12-14
Ok, here is the patch, The wxEXEC_MAKE_GROUP_LEADER is not needed for windows so i didn't included it. I have not thested this on unix...
[Edit:] wxEXEC_MAKE_GROUP_LEADER is included in this patch
Last edit: bluehazzard 2017-12-15
probably related: https://sourceforge.net/p/codeblocks/tickets/111/