After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723509 - Crash when running program that does not exist
Crash when running program that does not exist
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: run-program
3.10.x
Other Linux
: Normal critical
: ---
Assigned To: Michael Catanzaro
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-03 02:44 UTC by Michael Catanzaro
Modified: 2014-02-03 22:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix crash when launching nonexistant program (1.13 KB, patch)
2014-02-03 03:10 UTC, Michael Catanzaro
none Details | Review
Fix crash when launching nonexistant program (1007 bytes, patch)
2014-02-03 03:14 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2014-02-03 02:44:59 UTC
I messed up my Run -> Program Parameters configuration today.  I had the following configuration:

Program: /home/mcatanzaro/jhbuild
Arguments: run four-in-a-row

But I don't have a jhbuild binary in my home directory, so that cannot succeed.  When I click Run, the terminal plugin opens and prints:

EXECUTING:
/home/mcatanzaro/jhbuild run four-in-a-row 
----------------------------------------------

** (process:28515): ERROR **: Unable to execute the command (not found)


----------------------------------------------
Program has been terminated receiving signal 5 (Trace/breakpoint trap)
Press the Enter key to close this terminal ...

Then, ABRT pops up to inform me that Anjuta has crashed.

Uneducated guess: after forking, Anjuta is hitting an assertion when it can't execute the command.  Instead of asserting, Anjuta should instead exit with a nonzero status code.
Comment 1 Michael Catanzaro 2014-02-03 02:48:42 UTC
See also https://retrace.fedoraproject.org/faf/problems/1022888/
Comment 2 Michael Catanzaro 2014-02-03 03:10:39 UTC
Created attachment 267910 [details] [review]
Fix crash when launching nonexistant program

The crash is in a subprocess, but it will be picked up by distro bug
reporting tools like ABRT.

The problem is a bad use of g_error(), which is always fatal and so
should be reserved for programming errors.
Comment 3 Michael Catanzaro 2014-02-03 03:14:33 UTC
Created attachment 267911 [details] [review]
Fix crash when launching nonexistant program

The crash is in a subprocess, but it will be picked up by distro bug
reporting tools like ABRT.

The problem is a bad use of g_error(), which is always fatal and so
should be reserved for programming errors.
Comment 4 Sébastien Granjoux 2014-02-03 21:09:25 UTC
Review of attachment 267911 [details] [review]:

Thanks for your bug report and your fix. I haven't get this here. Your patch is fine you can commit it.
Comment 5 Michael Catanzaro 2014-02-03 22:47:48 UTC
Attachment 267911 [details] pushed as 8b79bf7 - Fix crash when launching nonexistant program