Author Topic: help: no console in newer daily builds... or 64-bit ubuntu 12.04  (Read 11994 times)

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Greetings.  I've been developing an application with codeblocks on 64-bit ubuntu 10.04 LTS for a couple years.  A couple weeks ago I bought a new disk drive and performed a fresh install of 64-bit ubuntu 12.04 LTS to continue development.  I also set up my new system to update with daily builds via the pasgui ppa.  Thus I am running codeblocks svn 8024 at this point.

At various places in my application (which is a very speed-sensitive 3D game/graphics/simulation engine), my code performs timing measurements with the CPU timer and then has printf() statements to print out timing information into the console.  This was working fine before I moved onto my new installation, but now the console doesn't display, and I don't see any tab that indicates console output is being send elsewhere inside the codeblocks IDE.  So I can't be sure whether this change is due to my switch from ubuntu 10.04 to ubuntu 12.04, or due to the newer daily build.

Note: I copied over my .codeblocks directory from my old build, as well as my project directory that contains all my project.cbp files, so I did not expect the codeblocks IDE behavior to change.

What did I do wrong?  How do I fix this?

PS: Seperately, why can I not display local [and function] variables any more?  Or how can I make them display?  All I see now under "watches" is 3-element input fields where I can input variable-names, or something (with no headers to indicate what are the fields).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #1 on: June 09, 2012, 07:23:53 am »
Which terminal-emulator is set up in "Settings -> Environment -> General settings -> terminal to launch console programs:" ?
Is it installed on your new system ?

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #2 on: June 11, 2012, 11:35:23 am »
Which terminal-emulator is set up in "Settings -> Environment -> General settings -> terminal to launch console programs:" ?  Is it installed on your new system ?

It says "xterm -T $TITLE -e".

When I type "xterm" in console/terminal window, an xterm/console/terminal-type window does appear.

Before I upgraded from 64-bit ubuntu 10.04 LTS to 64-bit ubuntu 12.04 LTS I had never worried about consoles, and they had always appeared.

This setting above must be what is the default, because I didn't change it.

I also tried replacing "xterm" with "gnome-terminal", but still no console window is displayed.  The "gnome-terminal" is the application I usually run to execute text commands, but "xterm" also works.

Any ideas?
« Last Edit: June 11, 2012, 11:40:12 am by bootstrap »

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #3 on: June 11, 2012, 07:23:45 pm »
What's it say in "shell to run commands in:" (same location)

But what it sounds like to me is that maybe you haven't fully rebuilt your project. (check your pre-compiled headers too)

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #4 on: June 12, 2012, 05:04:44 am »
What's it say in "shell to run commands in:" (same location)

But what it sounds like to me is that maybe you haven't fully rebuilt your project. (check your pre-compiled headers too)

The entry for "shell to run commands in:" is /bin/sh -c

In every case I select "build ===>> clean" before I select "build ===>> build".  I wish I could just disable PCH, but I just leave it on the original setting (generate PCH alongside original header).  But frankly, I don't see any pre-compiled header files in any of my project directories, soooooo.... maybe they're not being generated.

Boo hoo... how can I made my console window appear so I can see what the printf() calls in my program are printing?   :'(

-----  LATER  -----

Here is a strange bit of information.  I created a new project... essentially just a one function program:

Code
int main (int argc, chart** argv) {

  int a = 0;
  printf ("hello output console window... i know you are there somewhere.\n")

  return (0);
}

What's going on here, anyway?
« Last Edit: June 12, 2012, 05:33:00 am by bootstrap »

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #5 on: June 12, 2012, 07:55:49 pm »
Hmm... Well maybe your program is finishing before the window even appears. I've seen that happen before. You might want to add a delay or pause in your code. Try looking at the process manager or run "top" in a terminal to see if the thing even starts. I would also try running a debugger on your code and see if something odd pops up.

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #6 on: June 13, 2012, 03:00:49 am »
Hmm... Well maybe your program is finishing before the window even appears. I've seen that happen before. You might want to add a delay or pause in your code. Try looking at the process manager or run "top" in a terminal to see if the thing even starts. I would also try running a debugger on your code and see if something odd pops up.

Hahaha!!!  No such luck.  The program is my 3D engine which runs forever --- until you click the close button or click the red x-mark in the codeblocks IDE to stop execution.

With my little "hello world" program I just did "run to cursor" because that one would have been a problem to see.

I also tried stepping into the first few lines of my 3D engine, just in case (by some miracle) some code had been put in my program by a hidden gremlin to hide the console window.  But this just confirmed that no console window appears at all.

!!!!!  HELP  !!!!!   I can't run timings or perform printf()-style debugging.  :-(  And unfortunately, I ***must*** perform printf()-style debugging because codeblocks won't display or allow input-into the 16 256-bit wide SIMD/AVX registers!!!  Hint, hint.  I was tempted to fix that myself, but was told not to months ago.  :-o

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #7 on: June 13, 2012, 11:41:55 pm »
Well are you sure codeblocks is even set to show the console for that build target yet? Go to your project settings and look at the build targets tab and make sure type is set to Console Application.

Other than that I don't know what the issue is.

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #8 on: June 14, 2012, 08:30:08 am »
Well are you sure codeblocks is even set to show the console for that build target yet? Go to your project settings and look at the build targets tab and make sure type is set to Console Application.

Other than that I don't know what the issue is.
I checked, and it was set to "console application", just as it always has been.

Just for fun, I changed the setting to "GUI application", then did:
 - build => clean
 - build => build
 - run
 - the application runs normally with no console window
 - stop execution (red x mark)

Then I change the setting back to "console application", performed the same steps as above.  Unfortunately, no console was displayed.

Question:  Since I am continuing development of this project that I was developing on 64-bit ubuntu 10.04 on my new fresh installation of 64-bit ubuntu 12.04 (on a new disk drive), after I install the new OS, and before I run codeblocks for the first time, I copy my whole "/home/bootstrap/project" directory from my old drive to my new drive, and I also copy my whole "/home/bootstrap/.codeblocks" directory from my old drive to my new drive.  I guess the question is whether there is some difference between the old .cbp files and/or the old .codeblocks contents that will screw up codeblocks svn8024 when it starts for the first time with these files already in place?

LATER:  On a lark, sort-of investigating my question just stated above, I loaded the ig.cbp project file into an editor and found the following slightly suspicious line:
 
  <Option use_console_runner="0" />

I deleted the line, saved the file, and clicked the green "run" arrow again in codeblocks.

Presto-chango... the console window appeared.

So I guess the question for the gurus is... how did this happen?  Presumably it had something to do with me adopting my old "ig.cbp" file.  But I checked, and my old "ig.cbp" file on my old disk drive also has this line, and that program/codeblocks/OS combination definitely displays the console window.  I guess the other question is why did me switching to "GUI application" and back to "console application" not "clear out the problem" in the ig.cbp file.  For that matter, what is the problem?  What is that line supposed to do?
« Last Edit: June 14, 2012, 08:41:01 am by bootstrap »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #9 on: June 14, 2012, 06:16:44 pm »
I can confirm this.
As workaround make sure that the type is "Console application" and also "Pause when execution ends" is checked.
Nevertheless "Console application" should be enough, so I think this is a bug/regression.
I will look into it.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: help: no console in newer daily builds... or 64-bit ubuntu 12.04
« Reply #10 on: June 15, 2012, 10:16:27 am »
The issue should be fixed in svn r8047.