Code::Blocks Forums

User forums => Help => Topic started by: mkborregaard on March 05, 2010, 01:56:03 pm

Title: codeblocks fails to launch after svn update
Post by: mkborregaard on March 05, 2010, 01:56:03 pm
++Moved from the 'using codeblocks' forum (http://forums.codeblocks.org/index.php/topic,12104.msg82206.html#msg82206)++

I just updated my code::blocks sources from the SVN repository after about half a year of using the same C::B version. My resulting code_blocks.exe file now fails to launch with "The application failed to initialize properly (0xc00000005)". I updated and recompiled my wxMSW to 2.8.10, rebuilt, problem persists. I waited a few days, did a new SVN update, rebuilt, problem persists.
I did a search in here and found one post: http://forums.codeblocks.org/index.php/topic,8675.msg63238.html. I identified mulitiple copies of mingwm10.dll and strip.exe in my path, and exchanged all versions with the one in my MinGW folder, but the problem persists.
Does any one have a suggestion?
My old codeblocks (compiled from SVN sources 7 May 2009) still works fine, so it must be something about the new version or how I compiled it.
I use MinGW-5.1.3 as compiler on windows XP.
Title: Re: codeblocks fails to launch after svn update
Post by: oBFusCATed on March 05, 2010, 02:07:24 pm
Try the dependency walker (http://dependencywalker.com/) and see if there aren't missing dlls
Title: Re: codeblocks fails to launch after svn update
Post by: stahta01 on March 05, 2010, 04:31:38 pm
Try building a small wxWidgets project that links to the same wxWidgets used in your Code::Blocks.

Note, make sure to use DLL version of wxWidgets.

If that works, then it rules out your wxWidgets build as a likely cause.

If it fails, it points to an compiler or wxWidgets cause as most likely.
I would build the wxWidgets minimum using just makefile to eliminate C::B.

Tim S.
Title: Re: codeblocks fails to launch after svn update
Post by: stahta01 on March 05, 2010, 09:44:48 pm
I would still put my money on an Compiler Configuration/Installation type problem.

The things I do to keep my Compilers working right.

The ONLY Compilers I keep to the Windows System Path is MS Visual Studio.
All others, I remove them from the PATH Environmental Variable.
NOTE, I also remove Cygwin from PATH Environmental Variable.

I then test the above using which/where cmd commands.
http://gnuwin32.sourceforge.net/packages/which.htm

Code
which mingwm10.dll
which gcc.exe
which g++.exe
which codeblocks.dll
which wxmsw28u_gcc_cb.dll

The above should then find no (one at most) copies of the dll/exe (except in current folder).
Note, getting only one result for each of the above would be OK along as they are only the ones used by your Code::Blocks installation.

Tim S.





Title: Re: codeblocks fails to launch after svn update
Post by: mkborregaard on March 08, 2010, 12:01:04 pm
Thanks for the replies!
I tried out your suggestions, but have not gotten it to work yet.
I first built the sample c::b wxwidgets project with the new wxwidgets (2.8.10), using my old codeblocks.exe. Worked like a charm.
I tried running 'which', found 0 or 1 versions of the dlls you suggested:
Code
which mingwm10.dll
> c:\c++\mingw\bin\mingwm10.dll
which gcc.exe
> c:\c++\mingw\bin\gcc.exe
which g++.exe
> c:\c++\mingw\bin\g++.exe
which codeblocks.dll
(not found)
which wxmsw28u_gcc_cb.dll
(not found)
I have a codeblocks.dll in both the old and new codeblocks folder, but not in the path.
My wxwidgets dll is called wxmsw28u_gcc_custom.dll, not wxmsw28_gcc_cb.dll.
Though I do have MSYS and Cygwin, they are not in my PATH or Path.

I tried running dependency walker, and that complains it cannot find 'ieshims.dll" and "wer.dll", and that "mpr.dll" has a problem. However, I get that same message when i run dependency walker on my working cb. Anyway, these are delay-loaded, so I guess they should not cause startup crash?

Any ideas for how to proceed?
Title: Re: codeblocks fails to launch after svn update
Post by: MortenMacFly on March 08, 2010, 01:12:28 pm
Anyway, these are delay-loaded, so I guess they should not cause startup crash?

Any ideas for how to proceed?
After self compilation: Did you ensure running the update.bat script to create all resources correctly?
Title: Re: codeblocks fails to launch after svn update
Post by: kisoft on March 09, 2010, 08:45:43 am
Any ideas for how to proceed?
I solved this problem by TDM GCC (4.4.1-2) installation. I recompiled wxWidgets and Codeblocks after TDM GCC installation.
Worked ok. WinXP SP2.
My steps:
1. WinGW deinstallation.
2. TDM GCC installation.
3. Full rebuild wxWidgets & Codeblocks
Good luck!
Title: Re: codeblocks fails to launch after svn update
Post by: mkborregaard on March 09, 2010, 12:57:37 pm
Quote
Did you ensure running the update.bat script to create all resources correctly?
Yes I did. I also rebuilt all, because of changing to a new wxWidgets. Thinking along those same lines, I tried emptying my SVN folder, and checkout a clean version of sources. I recompiled codeblocks, ran update.bat, recompiled the contrib.plugins workspace, ran update.bat, and tried again, but the problem remains. I will try to replace my mingw installation with tdm gcc when i get the time. I am just wondering why it should not work on MinGW, is that not the 'canonical' codeblocks compiler?
Thanks for the advice.
EDIT: I now saw from the nightly forum that CB team has moved to TDM GCC. I will try that now.
Title: Re: codeblocks fails to launch after svn update
Post by: mkborregaard on March 10, 2010, 11:40:39 am
Quote
I solved this problem by TDM GCC (4.4.1-2) installation
That did it for me too! Thanks for the help on this issue  :D I think it is now official that codeblocks can give problems when compiling with MinGW-5.1.3.
Title: Re: codeblocks fails to launch after svn update
Post by: stahta01 on March 10, 2010, 04:32:44 pm
Quote
I solved this problem by TDM GCC (4.4.1-2) installation
That did it for me too! Thanks for the help on this issue  :D I think it is now official that codeblocks can give problems when compiling with MinGW-5.1.3.

It would be nice to know which version of MinGW Compiler you think falied.
Note, "5.1.3" is the installer version, not the compiler version.

Tim S.
Title: Re: codeblocks fails to launch after svn update
Post by: stahta01 on March 10, 2010, 04:42:49 pm
I just compiled the Code::Blocks SVN using MinGW GCC 3.4.5 and wx 2.8.10
I did not do the Contrib Plugins.
Edit 1:I just used this build of Code::Blocks to build all of Code::Blocks including Contribs.
Edit 1:I saw no problem.

Code
svn build  rev 6187 (2010-03-07T21:51:38.234863Z)   gcc 3.4.5 Windows/unicode - 32 bit

Compiler used
Code
gcc version 3.4.5 (mingw-vista special r3)

Tim S.



Title: Re: codeblocks fails to launch after svn update
Post by: mkborregaard on March 10, 2010, 09:28:49 pm
Oh, I thought that was the compiler version  :? I cannot go in and check what the gcc-version was in mingw-5.1.3, as I have now uninstalled MinGW. I tried to check the sourceforge page, but it was not clear to me how the version numbers correspond.
Sorry about that.