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 678119 - GLib.find_program_in_path() crashes for unknown programs
GLib.find_program_in_path() crashes for unknown programs
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: martin.pitt
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-14 17:59 UTC by Martin Pitt
Modified: 2012-06-20 10:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Pitt 2012-06-14 17:59:50 UTC
When the program is found, it works:

$ jhbuild run python3 -c 'from gi.repository import GLib; print(GLib.find_program_in_path("bash"))'
/bin/bash

But if not, and it should return None, it crashes:
$ jhbuild run python3 -c 'from gi.repository import GLib; print(GLib.find_program_in_path("unknown"))'
Segmentation fault
Comment 1 Martin Pitt 2012-06-20 10:24:23 UTC
Fixed in git with a test case:

http://git.gnome.org/browse/pygobject/commit/?id=379c1474a071292a1e8da413af2f5438cff09fc8