News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Compilation / Build Freezes

Started by guitarro17, March 24, 2009, 01:29:20 AM

Previous topic - Next topic

guitarro17

Hello! I have a problem...

Sometimes, when I try to build some project, the compilation freezes forever...
And it stops only if I finish the process "mingw32-g++" and "as.exe"...

It occours about 50~60% of the time, and another times the building is normally...

What can be?

Thx! And sorry for my english, I don't speak english very well :P

stahta01

It be your hard drive is going bad.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

ollydbg

I didn't meet this problem.
I have built OpenCV library, code::blocks , wxWidget library. All these libraries will take several minutes to finish, but the compiler haven't froze. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

guitarro17

Quote from: stahta01 on March 24, 2009, 03:23:42 AM
It be your hard drive is going bad.


I think you are right, because this happen with the most simple of the codes and with complex too... all codes :(

bubo

I had this problem too.
If you have Vista:

1. download all recomended OS updates (especialy 1st service pack)
2. download mingw3.4.5 patch for vista (or use newer mingw 4.2.1)
3. DON'T use parallel build (Compiler settings -> "Number of processes for parallel build":  set it to 1!)
4. if you use thirdparty libraries -> rebuild them all with new mingw

Optionaly:
Rarely it freezes when my notebook is in "battery saving" mode (follow 3rd point about parallel build)

I hope it will help
Regards

guitarro17

Quote from: bubo on March 24, 2009, 04:55:20 PM
I had this problem too.
If you have Vista:

1. download all recomended OS updates (especialy 1st service pack)
2. download mingw3.4.5 patch for vista (or use newer mingw 4.2.1)
3. DON'T use parallel build (Compiler settings -> "Number of processes for parallel build":  set it to 1!)
4. if you use thirdparty libraries -> rebuild them all with new mingw

Optionaly:
Rarely it freezes when my notebook is in "battery saving" mode (follow 3rd point about parallel build)

I hope it will help
Regards

I don't use Vista, but I will try this!
Where can I find this "Numer of process for parallel build" ?? I can't find this on "Settings -> Compiler and debugger"...

Is it in another place?

guitarro17


bubo

It freezes when compiler can't create binary (".o") file wich is opened in another process.

Do in Windows:
check disk for errors + defragmentation (standard OS system tools)

Also check this:
Every file, dir, library, search path ... shouldn't have spaces!! Mingw can not handle this well.
Also mingw installation dir shouldn't have space (e.g "C:\Program Files\mingw" is wrong install dir).
Before build your project, look in windows's Task Manager if there isn't any hanging mingw process (cc1.exe cc1plus.exe collect2.exe). If yes end them, rebuild project!

bubo

OH and I forget one important thing:

When mingw is installed on drive C:\ and project or library is located on another drive (e.g. D:\) mingw goes MAD!