Author Topic: codeblocks fails to launch after svn update  (Read 7841 times)

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
codeblocks fails to launch after svn update
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: codeblocks fails to launch after svn update
« Reply #1 on: March 05, 2010, 02:07:24 pm »
Try the dependency walker (http://dependencywalker.com/) and see if there aren't missing dlls
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: codeblocks fails to launch after svn update
« Reply #2 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.
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 stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: codeblocks fails to launch after svn update
« Reply #3 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.





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 mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: codeblocks fails to launch after svn update
« Reply #4 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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: codeblocks fails to launch after svn update
« Reply #5 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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: codeblocks fails to launch after svn update
« Reply #6 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!
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: codeblocks fails to launch after svn update
« Reply #7 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.
« Last Edit: March 10, 2010, 11:41:52 am by mkborregaard »

Offline mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: codeblocks fails to launch after svn update
« Reply #8 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: codeblocks fails to launch after svn update
« Reply #9 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.
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 stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: codeblocks fails to launch after svn update
« Reply #10 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.



« Last Edit: March 10, 2010, 05:43:34 pm by stahta01 »
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 mkborregaard

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: codeblocks fails to launch after svn update
« Reply #11 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.