Codelite 5 Problems running release versions

CodeLite installation/troubleshooting forum
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by eranif »

Assuming that you installed wxWidgets under E:\x86\wxWidgets-2.9.4 It seems fine to me...
Does the release version crashes under the debugger?

Can you also share here your 'Environment' variable (the ones defined in codelite)

Eran
Make sure you have read the HOW TO POST thread
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by ColinTaylor »

The release version app crashes when run from within codelite, and also crashes when run as a standalone app

Codelite env variables

CodeLiteDir=E:\x86\CodeLite
WXWIN=E:\x86\wxWidgets-2.9.4
PATH=$(WXWIN)\lib\gcc_dll;$(PATH)
WXCFG=gcc_dll\mswu
UNIT_TEST_PP_SRC_DIR=E:\x86\UnitTest
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by eranif »

I am running out of ideas here..

Try this:

Right click on your project (Release configuration): Settings -> Compiler -> C++ Compiler Options
and remove the flags:
-O2

In addition, add at the end:

Code: Select all

;-g
Select the Linker page Settings -> Linker, and remove the '-s' flag

Rebuild the sample program and run it under debugger, does it still crashes?
You should be able to get a more clear backtrace now

I would place a breakpoint at MainApp::OnInit() and see if it hits it
It might be the optimization level that crashes your application

Eran
Make sure you have read the HOW TO POST thread
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by ColinTaylor »

Thanks again for the suggestions, sadly none have helped.

I'm next going to do a complete reinstall of codelite/wxwidgets/Mingw.

After uninstalling the current install, are there any registry settings I should remove?

Thanks, Colin
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by eranif »

2 registry keys are there but they are only used for installation - so they dont matter.

To *really* uninstall codelite:
- Uninstall codelite
- Delete the installation folder manually
- Delete the folder %appdata%\CodeLite

If GCC 4.7.1 causes problems on your OS (I am using Windows 7, I don't have 8 yet...)
Try this:
After uninstalling codelite as described above, re-install codelite 4.1 with wx + mingw
Then install codelite 5 on top of it (install only the IDE without MinGW / WX)
This will let you enjoy codelite 5 with the MinGW / WX of codelite 4.1

Eran
Make sure you have read the HOW TO POST thread
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by ColinTaylor »

Thanks a lot for the re-installation notes

Glad to say that a clean re-install has 'fixed' this. I'm baffled but relieved that its now fine.

I'll be trying a repeat of all this on Windows 7 later. Fingers crossed ... ;-)

Thanks, Colin
wittend
CodeLite Enthusiast
Posts: 44
Joined: Thu Oct 09, 2008 9:11 pm
Contact:

Re: Codelite 5 Problems running release versions

Post by wittend »

Eran,

First, Thank you for the excellent tools that you provide. I am astonished by their quality and at your productivity as the developer.

I am encountering similar problems to those posted above on Win7. I installed codelite-5.0.6213-mingw4.7.1-wx2.9.4.exe from sourceforge. Because I use Codelite and MinGW/MSys *a lot* for work on important projects, I carefully duplicated and renamed my Codelite, MinGW/MSys and wx2.9.4 folders before i ran the install. I also installed the free version of wxCrafter (I'm eagerly awaiting the full version). To test the new collection of tools, I created an entirely new GUI/wxCrafter project with a splitter frame containing a treeview control in one frame and an AUI Notebook with two pages in the other. The notebook pages each contain a static bitmap. I have made no modifications to the generated source except for replacing tab characters with spaces.

Sometimes, just after manipulating the layout in wxCrafter and generating the source code, I can build and run the project in the debugger. If I rebuild it in Release mode, I just receive the SEGV message. It seems a pointer has gone awry, and depending on the state of memory when the program loads I get this failure.

It took some digging in the current interface to see that it was, in fact pointing to the MinGW-4.7.1 installation rather than the previous MinGW-4.6.1 folder. I had overlooked the version change when I was downloading the file. The only references to the MinGW path locations seem to be in Settings->Tags->ctags->include files and Settings->Tags->clang, not where I would have expected to look.

I have not yet tried the Uninstall/Reinstall that you recommended to Colin, but I will.

But it seems that something is not quite right doing it the way I did.

Codelite: 5.0.6213
Is it a self compiled version of codelite?: No
OS: Win 7 Ultimate, Service pack 1
Compiler version: MinGW 4.7.1

1) If it is a 'Debugger' related bug, make sure to also post:

Not just a debugger problem, compiled project does SEGV with a stack error when running in the debugger.
GDB version: Seemingly the version in MinGW 4.7.1 - Looks like gdb 7.5 (Output: See attached file).

Environment variables:

CodeLiteDir=D:\bin\CodeLite
WXWIN=D:\bin\wxWidgets-2.9.4
PATH=$(WXWIN)\lib\gcc_dll;$(PATH)
WXCFG=gcc_dll\mswu
UNIT_TEST_PP_SRC_DIR=D:\bin\UnitTest++-1.3

N.B.: Neither full system nor full user path on this machine includes MinGW or Msys (or WxWidtets Dlls as best I can tell)

Thanks,

Dave
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by eranif »

wittend wrote:It took some digging in the current interface to see that it was, in fact pointing to the MinGW-4.7.1 installation rather than the previous MinGW-4.6.1 folder
There is another hidden place where codelite reads its MinGW path: /path/to/coedlite/installation/registry.ini
Make sure that the entry there is pointing to the correct 'mingw' as well

Eran
Make sure you have read the HOW TO POST thread
wittend
CodeLite Enthusiast
Posts: 44
Joined: Thu Oct 09, 2008 9:11 pm
Contact:

Re: Codelite 5 Problems running release versions

Post by wittend »

I'm still having this problem, currently on two Win-7 machines. Both with fresh installs from codelite-5.0.6213-mingw4.7.1-wx2.9.4.exe and the current wxCrafter. I cleaned the previous installations of Codelite, MinGW (all versions), etc. according to your suggestions, and reinstalled over top.

I am not certain whether I got past this problem when I first encountered it. I've been busy with other stuff, and don't think that I did. The symptoms are exactly as described by Colin & myself in this thread, everything builds without a hitch, but running as either release or under the debugger gives a seg fault on the first instantiation of the app object.

My assumption at this point is that there is a conflict with the wxWidgets libs that are being loaded, but I have not been able to find the culprit(s) so far.

Any additional insight would be appreciated.

Dave Witten
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite 5 Problems running release versions

Post by eranif »

In the past I also encountered problems when debugging wxWidgets application with gdb under windows.
The fix for me was to update to a another gdb version.

Note that I myself don't use the gdb that I ship with MinGW for one main reason:
I am not able to debug wxWidgets applications...

Instead, I am using this gdb: http://code.google.com/p/qp-gcc/downloa ... p&can=2&q=

Note that that reason I am not shipping it is because it requires python 2.7.3 - so make sure you install python 2.7.3 from here:

python installer for 64 bit Windows 7 or python installer for 32 bit Windows 7

How to install it:
- Install python and make sure its in your system path ( open a cmd after the installation and type 'python' to make sure)
- Restart codelite (if it was opened) - to make sure it uses the updated system path
- Download the above gdb zip - and extract it somewhere on your disk
- In codelite, go to: settings -> debugger settings -> GNU gdb debugger -> General, and populate the "debugger path" field with the full path to gdb.exe (for me its: C:\GDB-7.5.5\bin\gdb.exe)

Try debugging your application see if it helps

BTW, you can also try and debug your release version - it might gives us another insight on the crash reason (HINT: when it crashes, right click on the "Call stack" tab and select 'Copy backtrace')
Eran
Make sure you have read the HOW TO POST thread
Post Reply