Bug 461120 - No xterm comes up when running a console program in Codeblocks
No xterm comes up when running a console program in Codeblocks
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: codeblocks (Show other bugs)
9
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-04 07:49 EDT by Steve
Modified: 2008-10-15 22:12 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-15 22:12:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Steve 2008-09-04 07:49:54 EDT
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 06:11:20 EDT
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 07:20:00 EDT
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 Steve 2008-09-07 07:28:09 EDT
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 09:07:53 EDT
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 Steve 2008-09-07 09:26:17 EDT
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 04:43:48 EDT
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 09:04:38 EDT
any results?
Comment 8 Steve 2008-09-19 10:12:37 EDT
How do I grab the test rpm?
Comment 9 Dan Horák 2008-09-19 10:35:17 EDT
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 11:38:31 EDT
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 Steve 2008-09-19 23:21:16 EDT
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 03:12:47 EDT
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 03:13:31 EDT
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 19:58:21 EDT
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-24 20:06:29 EDT
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-15 22:10:49 EDT
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-15 22:12:21 EDT
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.