Bug 461120 - No xterm comes up when running a console program in Codeblocks
Summary: No xterm comes up when running a console program in Codeblocks
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: codeblocks
Version: 9
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-04 11:49 UTC by Stephen So
Modified: 2008-10-16 02:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-16 02:12:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
*.cdp file (836 bytes, application/x-codeblocks)
2008-09-07 11:28 UTC, Stephen So
no flags Details
screenshot when removing value of shell (52.50 KB, image/png)
2008-09-07 13:26 UTC, Stephen So
no flags Details

Description Stephen So 2008-09-04 11:49:54 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

When I create a new project for a C console application, and build the app, and then run, no console/terminal comes up that shows the program.

The build log says:

Checking for existence: /home/stephen/projects/hello/bin/Debug/hello
Executing: xterm -T hello -e /bin/sh -c /usr/bin/cb_console_runner /home/stephen/projects/hello/bin/Debug/hello  (in /home/stephen/projects/hello/.)
Process terminated with status 0 (0 minutes, 0 seconds)

However, if I use the Debug/Continue button, an xterm does come up.

Reproducible: Always

Steps to Reproduce:
1.  Open up codeblocks
2.  Make new project
3.  Select console application
4.  Select C language
5.  Click the build and run button
Actual Results:  
It compiles the application but it doesn't run the program in an xterm.

Expected Results:  
It should come up with an xterm with the running program.

As mentioned before, if I use Debug/continue, the xterm comes up with the running program.

Comment 1 Dan Horák 2008-09-05 10:11:20 UTC
Looks like it is a known bug in Code::Blocks - http://forums.codeblocks.org/index.php/topic,7247.0.html, but unfortunately there was no reaction from upstream yet. I am working on a patch, but all the logic in the function that runs applications is quite complex.

Comment 2 Dan Horák 2008-09-07 11:20:00 UTC
Hm, I have a different command line when trying to run a console application (empty "Console application" created with the wizard):

Checking for existence: /home/dan/projects/cd-test/bin/Debug/cd-test
Executing: xterm -T cd-test -e /usr/bin/cb_console_runner /home/dan/projects/cd-test/bin/Debug/cd-test  (in /home/dan/projects/cd-test/.)

the "/bin/sh -c" part is missing. Can you attach your project file (*.cbp)?

Comment 3 Stephen So 2008-09-07 11:28:09 UTC
Created attachment 315966 [details]
*.cdp file

Here is my cdp file from an console application that is created using the wizard

Comment 4 Dan Horák 2008-09-07 13:07:53 UTC
The projects files are the same, that could not make the difference. But what is your default shell? Does it's name contain "csh"?
What will be the result when you remove the value of "Settings/Environment Settings/General Settings/Shell to run commands in"?

Comment 5 Stephen So 2008-09-07 13:26:17 UTC
Created attachment 315968 [details]
screenshot when removing value of shell

Yes I am using tcsh as my main shell.

I've tried deleting the shell command in the environment settings.  When I run my program, it doesn't work and the command line is still the same, as you can see in the screenshot.

I've also tried changing to /bin/tcsh -c but still get the same problem (i.e. it *defaults* to /bin/sh -c)

Comment 6 Dan Horák 2008-09-08 08:43:48 UTC
The results of my investigation are posted upstream - http://forums.codeblocks.org/index.php/topic,9144.0.html

You can grab a test rpms at http://koji.fedoraproject.org/koji/taskinfo?taskID=812993

Comment 7 Dan Horák 2008-09-19 13:04:38 UTC
any results?

Comment 8 Stephen So 2008-09-19 14:12:37 UTC
How do I grab the test rpm?

Comment 9 Dan Horák 2008-09-19 14:35:17 UTC
Hm, the build system already removed the test rpms. I will post here a new link when they will be available.

Comment 10 Dan Horák 2008-09-19 15:38:31 UTC
the test rpms are now at https://koji.fedoraproject.org/koji/taskinfo?taskID=833342
download them all to one location and then run as root "rpm -Fvh codeblocks*.i686.rpm"

Comment 11 Stephen So 2008-09-20 03:21:16 UTC
It works now.  Only issue was that I had to go into Environment Settings and in the "Shell to run commands" put "/bin/sh -c" or else it wouldn't run the compiler properly.  It probably was empty when I was playing with it last time.


But an xterm comes up and the build log says:

Checking for existence: /home/stephen/projects/test2/bin/Release/test2
Executing: /usr/bin/xterm -T test2 -e /bin/sh -c '/usr/bin/cb_console_runner /home/stephen/projects/test2/bin/Release/test2 ' (in /home/stephen/projects/test2/.)
Process terminated with status 0 (0 minutes, 4 seconds)

Comment 12 Fedora Update System 2008-09-22 07:12:47 UTC
codeblocks-8.02-2.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/codeblocks-8.02-2.fc8

Comment 13 Fedora Update System 2008-09-22 07:13:31 UTC
codeblocks-8.02-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/codeblocks-8.02-2.fc9

Comment 14 Fedora Update System 2008-09-24 23:58:21 UTC
codeblocks-8.02-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update codeblocks'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-8159

Comment 15 Fedora Update System 2008-09-25 00:06:29 UTC
codeblocks-8.02-2.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update codeblocks'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8218

Comment 16 Fedora Update System 2008-10-16 02:10:49 UTC
codeblocks-8.02-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2008-10-16 02:12:21 UTC
codeblocks-8.02-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.