Author Topic: C::B 17.42 Windows 10 and 7, hangs on build, cannot abort have to terminate  (Read 4077 times)

Offline jspang

  • Single posting newcomer
  • *
  • Posts: 4
Hi,

I have fresh installations of C::B with mingw using the default gcc compiler, standard installations of binaries running on two different computers, one win 10 and the other windows 7 pro build 7601 sp 1. Both experience the same problems on fairly trivial code compile/run attempts.

Basically, executing "Build and Run" the build hangs, the 'red X' abort button has no effect on the build, the entire C::B program seems to hang up. It happens on both machines on different user application code. There is nothing really in common between the machines. These are first time installs of CB so there are no old libraries hanging around etc.

I am able to run some simple code fine, but editing and compiling along the way with the "build and compile" button seems to result in frequent hang-ups. On other occasions it works. It is possible that there is a bug in the code being compiled. It's hard to put a finger on the exact behaviour at this point. It seems like just running build without run might be more stable.

The causes of the hang seem to be varied and somewhat arbitrary, but perhaps loosly associated with code with a bug in it. On other occasions, it reports the bugs just fine and stops compiling by itself as expected. The project directory seems clean and tidy.

Could not see anything relevant in the fora.

Once it hangs, oddly some C:B menus work but the build buttons are greyed out, and attempting to kill the C::B window shell is not even possible. It complains that the compiler is still running and do I want to abort it. Saying yes it returns to hanging. Trying to kill the window again (right top X) finally asks if I want to kill the process. I can then restart. I am not sure yet if the error is directly repeatable, it could be. As mentioned, the compile abort button is ineffective at aborting the compile, even after a long wait.

I have managed to create a C++ application that crashes, and it seems to handle that properly.

Any guidance greatly appreciated thanks.

Offline jspang

  • Single posting newcomer
  • *
  • Posts: 4
Well OK, it is the original poster here again with an update.

So I worked out the cause. My simple program opens a console, which pops up and remains open at the end of execution. If the program compiles OK and I close the console window at completion of the test, control passes back to my editing window just fine and the 'build and run' button activates again. Everything is fine.

However, if I happen to click on the editor window BEFORE I close the console window, the console window disappears I-don't-know-where, but it would seem it stays open. I cannot find it again. Because the console is not killed, the compiler is still running. I can't get the console back (to kill it), and the compiler abort button does not work (this seems like a C::B bug to me).

So the combination of me not realizing what I had done and the abort button not working led me to this confusing (to me) problem, as a fairly new C::B user. Probably someone who has figured out the things to avoid might shrug and say its my fault, but TBH it seems like flaky operation to me. The abort button should do what it says.

For now, I know what not to do with the C::B gui. Take this as a bug/report suggestion for improvement as you see fit.

Thanks.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
...snip...
However, if I happen to click on the editor window BEFORE I close the console window, the console window disappears I-don't-know-where, but it would seem it stays open.
...snip...

Is it possible that your program  is still running behind CodeBlocks' window.
Minimize CB to see if it's there, or click on your programs' icon in the taskbar to bring it to the foreground.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Quote
(this seems like a C::B bug to me).

Have you tried a nightly build? This should be fixed since quite some time...

Offline jspang

  • Single posting newcomer
  • *
  • Posts: 4
...snip...
However, if I happen to click on the editor window BEFORE I close the console window, the console window disappears I-don't-know-where, but it would seem it stays open.
...snip...

Is it possible that your program  is still running behind CodeBlocks' window.
Minimize CB to see if it's there, or click on your programs' icon in the taskbar to bring it to the foreground.

Yes I tried all the usual things, iconized all the windows and so on. The console window just vanishes.
I have not tried the nightly build, however I only downloaded and installed C::B a few days ago so it should be fairly current I assume. I am probably not going to stop to reinstall to play around with the install right now since I know how to work around it.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Hint: 2017 is about two years, ago.

If you are using 17.42; you did not get it from this group.

17.12 is the last official release. As in 2017 the 12 month.

You might try to figure out if your anti-virus software is the cause.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jspang

  • Single posting newcomer
  • *
  • Posts: 4
Ah, sorry typo the version is 17.12, rev 11256 to be exact. Eyesight ain't what it used to be.

I got this build from the Win10 binaries release here, which seemed like the right idea at the time.
http://www.codeblocks.org/downloads/26

Yes, I guess it looks like nobody has updated the binary release for windows since 2017.

I do have a little more information on this bug to share. So, it seems that if I run a program that creates a console window, and if I click back in the main workspace, AT FIRST the console window hides nicely in the background and I can bring it back from the taskbar. HOWEVER, if I THEN go on to do something (without bringing the console window back) like type in the editor window - poof - the console window vanishes and then all build functions hang up and I have to crash out of the application to recover. Maybe this helps, maybe it is not really as fixed as you think it is?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Quote
like type in the editor window - poof - the console window vanishes and then all build functions hang up and I have to crash out of the application to recover. Maybe this helps, maybe it is not really as fixed as you think it is?
This is to 99% fixed in trunk.... But the only way to find out is if you test a nightly http://forums.codeblocks.org/index.php/board,20.0.html