Author Topic: CB keeps crashing (my fault)  (Read 10349 times)

_teo_

  • Guest
CB keeps crashing (my fault)
« on: October 21, 2006, 10:58:57 am »
Thanks to your help I managed to compile CB on my machine. However it crashes constantly. It's enough to start it and open a project. After few seconds CB will disappear!

Any idea?

I tried to set paths to include files. Is it possible that I did something wrong?
Teo

Ubuntu 6.06 (64-bit)
« Last Edit: October 22, 2006, 12:23:39 pm by _teo_ »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CB keeps crashing
« Reply #1 on: October 21, 2006, 11:32:12 am »
Revision?
Be patient!
This bug will be fixed soon...

_teo_

  • Guest
Re: CB keeps crashing
« Reply #2 on: October 21, 2006, 12:05:41 pm »
Revision?
3115

I just updated to 3116 - it is running already ~15 min.
I should set include path to point to /opt/wx/2.6/include/wx-2.6. Where should I do that? Perhaps in "Settings" > "Compiler and Debugger Settings" and then in Directories?

Edit: Is there any wiki page (for instance) where I can see how to setup my environment?
« Last Edit: October 21, 2006, 12:12:15 pm by _teo_ »

_teo_

  • Guest
Re: CB keeps crashing
« Reply #3 on: October 21, 2006, 01:30:36 pm »
Edit: Is there any wiki page (for instance) where I can see how to setup my environment?
Additional details: in Build Log pane

Code
-------------- Build: Debug in test ---------------
Compiling: app.cpp
/ bin / sh: wx-config: command not found
In file included from /opt/wx/2.6/include/wx-2.6/wx/wxprec.h:13,
                 from app.h:4,
                 from app.cpp:1:
/opt/wx/2.6/include/wx-2.6/wx/defs.h:41:13: error: #error "No Target! You should use wx-config program for compilation flags!"

How to fix this one?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CB keeps crashing
« Reply #4 on: October 21, 2006, 03:52:21 pm »
sudo apt-get install wx-common
Be patient!
This bug will be fixed soon...

_teo_

  • Guest
Re: CB keeps crashing
« Reply #5 on: October 21, 2006, 11:01:51 pm »
sudo apt-get install wx-common
I compiled wxGTK from source. wx-config is available when I type in the terminal. Should I install wx-common anyway or should I update CB settings?

Here is the output:
> which wx-config
> /opt/wx/2.6/bin/wx-config

and
> wx-config --prefix
> /opt/wx/2.6

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CB keeps crashing
« Reply #6 on: October 21, 2006, 11:32:06 pm »
This:
Code
/ bin / sh: wx-config: command not found

and this:

Code
> wx-config --prefix
> /opt/wx/2.6

are not saying the same thing...
IOW, one of them is wrong. Which is?
Be patient!
This bug will be fixed soon...

_teo_

  • Guest
Re: CB keeps crashing
« Reply #7 on: October 21, 2006, 11:59:56 pm »
IOW, one of them is wrong. Which is?
I wish I know. Look as I said before I am on Ubuntu 6.06. I checked the "Run command as login shell" in terminal's profile. Otherwise wx-config isn't found there.

As opposite to above in C::B when I try to build a GUI test application (generated with wizards) I can see in "Build Log" that wx-config isn't found.

mandrav, I really appreciate your help. Thank you.
btw, I just updated to latest revision - 3124

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CB keeps crashing
« Reply #8 on: October 22, 2006, 12:46:35 am »
OK, I somehow doubt that "/opt/wx/2.6/bin" is in your path.
Either add it to your path, or edit the build options of the generated project and adjust all "wx-config" occurrences with "/opt/wx/2.6/bin/wx-config".

Why did you build wx from source? Is something missing from the version in the repositories?
Be patient!
This bug will be fixed soon...

_teo_

  • Guest
Re: CB keeps crashing
« Reply #9 on: October 22, 2006, 12:22:55 pm »
Why did you build wx from source? Is something missing from the version in the repositories?
Well, this is my fault. I didn't know that wxWidgets library is available there. That's why I downloaded latest version, which is 2.7 and built it. Then I wasn't able to build C::B. Later I searched C::B web-site and found the wiki page with explanation on how to build C::B. I tried to uninstall version 2.7 and install 2.6 from repositories. But 2.7 wasn't uninstalled and I had troubles with C::B.

Finally guys in this forum pointed to me that the actual problem is the newer wxWidgets version. They told me to use version 2.6.3 with patch 2. That's why I built 2.6 from source.

Right now, C::B is recompiled and running. I followed your advice to install 2.6 from repositories and rebuilt C::B against it. It compiles my test application. If I notice any further problems I will first ask here for advice before doing something in the wrong way.

Thank you for the nice IDE. I am impressed. Since I use MS Developer Studio on daily basis I can compare.
Teo

_teo_

  • Guest
Re: CB keeps crashing
« Reply #10 on: October 23, 2006, 01:28:13 pm »
Why did you build wx from source? Is something missing from the version in the repositories?
mandrav, actually there is something that's missing: wxChoice::GetCurrentSelection method is used in some of contributed plugins. In wxWidgets online-help one can read following:

"This function is new since wxWidgets version 2.6.2 (before this version GetSelection itself behaved like this)."
The URL: http://www.wxwindows.org/manuals/2.6.3/wx_wxchoice.html

In Ubuntu repositories there is an older version.

However I managed to build 2.6.3 from source (patch 2 is applied) and I built C::B against it. This works, but I get an error about missing CBProfiles.zip file (I noticed the other thread in this forum).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CB keeps crashing (my fault)
« Reply #11 on: October 23, 2006, 02:21:02 pm »
Quote
mandrav, actually there is something that's missing: wxChoice::GetCurrentSelection method is used in some of contributed plugins.

Well, post the errors here so we can fix them. Normally (as in the core sdk and plugins), we use #ifdef guards around calls to wxChoice::GetCurrentSelection() so that compilation works.
Be patient!
This bug will be fixed soon...

_teo_

  • Guest
Re: CB keeps crashing (my fault)
« Reply #12 on: October 23, 2006, 11:58:27 pm »
I just compiled C::B 3126 against wx 2.6.1 from Ubuntu repositories. There seems to be only one single problem:

/trunk/src/plugins/contrib/symtab/symtabconfig.cpp
Line 340

PS: CBProfiler.zip isn't found and Settings > Compiler and debugger crashes C::B

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CB keeps crashing (my fault)
« Reply #13 on: October 24, 2006, 08:28:17 am »
/trunk/src/plugins/contrib/symtab/symtabconfig.cpp
Line 340
Do you read the changelog (http://svn.berlios.de/wsvn/codeblocks/?op=log&rev=0&sc=0&isdir=1)?
Check out revision 3129... ;-)
With regards, Morten.
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

_teo_

  • Guest
Re: CB keeps crashing (my fault)
« Reply #14 on: October 24, 2006, 10:19:12 am »
/trunk/src/plugins/contrib/symtab/symtabconfig.cpp
Line 340
Do you read the changelog (http://svn.berlios.de/wsvn/codeblocks/?op=log&rev=0&sc=0&isdir=1)?
Check out revision 3129... ;-)
With regards, Morten.
Well, I don't. Anyway I'm going to use 2.6.3. Keep the good work!