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 604958 - Fix crash in runDialog
Fix crash in runDialog
Status: RESOLVED DUPLICATE of bug 604978
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 604957 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-12-18 22:30 UTC by Florian Müllner
Modified: 2009-12-21 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix crash in runDialog (2.60 KB, patch)
2009-12-18 22:30 UTC, Florian Müllner
none Details | Review
Patch for this bug (1.11 KB, patch)
2009-12-19 06:41 UTC, Maxim Ermilov
none Details | Review

Description Florian Müllner 2009-12-18 22:30:12 UTC
The run dialog crashes when PATH contains non-existing directories:

("Chained exception")@gjs_throw:0
'
    JS ERROR: !!!   Exception was: Error: Error invoking Gio.query_info: Error stating file '/usr/bin/perlbin/site': No such file or directory
    JS ERROR: !!!     lineNumber = '0'
    JS ERROR: !!!     fileName = 'gjs_throw'
    JS ERROR: !!!     message = 'Error invoking Gio.query_info: Error stating file '/usr/bin/perlbin/site': No such file or directory'
    JS ERROR: !!!     stack = 'Error("Error invoking Gio.query_info: Error stating file '/usr/bin/perlbin/site': No such file or directory")@:0
("Error invoking Gio.query_info: Error stating file '/usr/bin/perlbin/site': No such file or directory")@gjs_throw:0

So we can either get distros to set up a sane PATH, or filter out bad entries.
Comment 1 Florian Müllner 2009-12-18 22:30:16 UTC
Created attachment 150039 [details] [review]
Fix crash in runDialog

The run dialog crashes when PATH contains non-existing directories (some
distros seem to do that ...).
Fix by filtering those out before setting up file monitors.
Comment 2 Maxim Ermilov 2009-12-19 06:41:05 UTC
Created attachment 150053 [details] [review]
Patch for this bug

+            if (! file.query_exists(null))
+                continue;
+
+            let info = file.query_info(Gio.FILE_ATTRIBUTE_STANDARD_TYPE,
+                                       Gio.FileQueryInfoFlags.NONE, null);

g_file_query_exists is implemented using g_file_query_info() and as such does blocking I/O.
This can be implemented more easy way.

This patch is included in patch for bug https://bugzilla.gnome.org/show_bug.cgi?id=604978.
Comment 3 Florian Müllner 2009-12-19 11:55:14 UTC

*** This bug has been marked as a duplicate of bug 604978 ***
Comment 4 Owen Taylor 2009-12-21 15:24:09 UTC
*** Bug 604957 has been marked as a duplicate of this bug. ***