News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Process terminated with status 255

Started by silverzhao, November 30, 2010, 11:19:09 AM

Previous topic - Next topic

silverzhao

Hello, I have a problems here: whenever I run a program, even just a simple "HelloWorld", it will say "Process terminated with status 255" as the red line shows.I wonder why it is not 0 . Thank you!
Well, I'm using codeblocks svn 6840 on ubuntu 10.10, and in "settings --> Environmet", I use "gnome-terminal -t $TITLE -x".

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

silverzhao

Quote from: thomas on November 30, 2010, 11:32:43 AM
http://forums.next.codeblocks.org/index.php/topic,13743.msg92605.html#msg92605
Thank you for your kind reply, but I still do not quite understand it. I have xterm installed, but I prefer gnome-terminal. So is there any way that I can change return value 255 to 0? Thank you!

Jenna

Does it work from a console ?

I use gnome-terminal on my system and have no such issues.

silverzhao

Quote from: jens on December 01, 2010, 08:07:40 AM
Does it work from a console ?

I use gnome-terminal on my system and have no such issues.

I've just tried it. If I start CodeBlocks in gnome-terminal,  it works well, no more the annoying red line! But if I open it from "Applications" --> "Programming" --> "Code::Blocks IDE", the annoying red line comes back again! So why is this? Thank you!

silverzhao

I've found something interesting: if I open the gnome-terminal before executing the program in codeblocks, it will not show the red line any more. But once I close the gnome-terminal and execute the program again, the annoying red line comes back at once! Is there anything different here?

wangdong1226

#6
Here is a 'solution':

=========
Here's the command I use:

Code:
--------
gnome-terminal --disable-factory -t $TITLE -x
--------

The "--disable-factory" argument runs gnome-terminal in it's own process, apart from other gnome-terminal processes you have running. Without it gnome-terminal will return 255 upon exit, unless you have another gnome-terminal already open.

This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns... If anyone has a solution to this problem, please let us know.
=========

This solution quoted from: http://www1.ubuntuforums.org/showthread.php?p=10251821

And you can make a little bit change:

--------
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
--------

or

--------
gnome-terminal --disable-factory --hide-menubar  -t $TITLE -e
--------
(maybe can not works)

Jenna

Quote from: wangdong1226 on February 11, 2011, 09:05:35 AM
Here is a 'solution':

=========
Here's the command I use:

Code:
--------
gnome-terminal --disable-factory -t $TITLE -x
--------

The "--disable-factory" argument runs gnome-terminal in it's own process, apart from other gnome-terminal processes you have running. Without it gnome-terminal will return 255 upon exit, unless you have another gnome-terminal already open.

This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns... If anyone has a solution to this problem, please let us know.
=========

This solution quoted from: http://www1.ubuntuforums.org/showthread.php?p=10251821

And you can make a little bit change:

--------
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
--------

or

--------
gnome-terminal --disable-factory --hide-menubar  -t $TITLE -e
--------
(maybe can not works)

For me it works without --disable-factory, but this might be due to my gnome settings.

gnome-terminal --disable-factory --hide-menubar  -t $TITLE -e

does not work, because it needs quotation around the command after the -e, otherwise only the first parameter is used as command and that can not work (in almost any cases), -x uses the remaining parameters as command.

wangdong1226

#8
or if want to resize the size of the window, can do like this:

gnome-terminal --disable-factory --hide-menubar --geometry 70x24+50+0 -t $TITLE -x

70x24: size of the window;
+50+0: window position in screen.

Dear Jens,
does "This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns..." will happen in your system?

Jenna

Quote from: wangdong1226 on February 11, 2011, 12:39:00 PM
Dear Jens,
does "This is still only a partial solution, since gnome-terminal will return 0 to Code::Blocks, regardless of what your program returns..." will happen in your system?

Unfortunately yes !