Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDG_* environment variables: Setting XDG_DATA_DIRS prevents CoqIDE from starting #16211

Open
jfehrle opened this issue Jun 17, 2022 · 0 comments
Labels
kind: bug An error, flaw, fault or unintended behaviour. kind: question Issues seeking an answer to a question. Consider asking on zulip instead. part: CoqIDE Issues and PRs related to CoqIDE or other IDE features of coq.

Comments

@jfehrle
Copy link
Member

jfehrle commented Jun 17, 2022

If I set $XDG_DATA_DIRS to an arbitrary list, CoqIDE fails with a GPointer.Null exception which IIUC is from lablgtk3.

CoqIDE calls Glib.get_user_data_dir () in GTK to determine XDG data directories. If $XDG_DATA_DIRS is not set, the value is
[ /usr/local/share; /usr/share]. The second directory has the following entries that are apparently essential: gtk-3.0, gtk-doc, gtk-engines and gtksourceview-3.0. It works normally if I include /usr/share in $XDG_DATA_DIRS.

Coq uses $XDG_DATA_DIRS as one of many things that determines the load path. Given that $COQPATH is also a list of directories, is there still a need to use $XDG_DATA_DIRS for the load path given that it breaks CoqIDE if not set correctly? Also, is $XDG_DATA_HOME really needed? While it doesn't cause a CoqIDE startup problem, it duplicates the functionality of $COQPATH.

Also, while I expect the Glib routine follows XDG base directory specification, the coq side doesn't--it simply examines 3 XDG_* variables. The only other thing the server uses them for is to locate the "coqrc" startup script.

Finally, we have only a sentence or so in the doc mentioning the things that GTK etc. look for in /usr/share and what can be configured there (and how). I haven't tried to find this info, if anyone knows where it is, please let me know.

console output ``` $ dune exec -- dev/shim/coqide-prelude -async-proofs off -R Foo Foo

(coqide:13368): Gtk-WARNING **: 11:36:43.444: Could not find the icon 'document-save'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'document-save' for stock: Icon 'document-save' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Could not load a pixbuf from /org/gtk/libgtk/icons/24x24/status/image-missing.png.
This may indicate that pixbuf loaders or the mime database could not be found.

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.445: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'document-save' for stock: Icon 'document-save' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.445: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'window-close' for stock: Icon 'window-close' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.445: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'window-close' for stock: Icon 'window-close' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.445: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'go-down' for stock: Icon 'go-down' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.445: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.445: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'go-down' for stock: Icon 'go-down' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.446: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'go-up' for stock: Icon 'go-up' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.446: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'go-up' for stock: Icon 'go-up' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.446: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'go-jump' for stock:

(coqide:13368): Gtk-WARNING **: 11:36:43.446: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.446: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'go-jump' for stock:

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.447: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'go-bottom' for stock: Icon 'go-bottom' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.447: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'go-bottom' for stock: Icon 'go-bottom' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.447: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'system-run' for stock: Icon 'system-run' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.447: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.447: Error loading theme icon 'system-run' for stock: Icon 'system-run' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.448: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'process-stop' for stock: Icon 'process-stop' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.448: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'process-stop' for stock: Icon 'process-stop' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.448: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'go-top' for stock: Icon 'go-top' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.448: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'go-top' for stock: Icon 'go-top' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.448: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.448: Error loading theme icon 'go-previous' for stock:

(coqide:13368): Gtk-WARNING **: 11:36:43.449: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.449: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.449: Error loading theme icon 'go-previous' for stock:

(coqide:13368): Gtk-WARNING **: 11:36:43.449: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.449: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.449: Error loading theme icon 'go-next' for stock:

(coqide:13368): Gtk-WARNING **: 11:36:43.449: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.449: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): Gtk-WARNING **: 11:36:43.449: Error loading theme icon 'go-next' for stock:

(coqide:13368): Gtk-WARNING **: 11:36:43.450: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/24x24/status/image-missing.png: Unrecognized image file format

(coqide:13368): GLib-GObject-CRITICAL **: 11:36:43.450: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(coqide:13368): GtkSourceView-WARNING **: 11:36:43.455: Unknown parent scheme 'classic' in scheme 'coq_style'

(coqide:13368): GtkSourceView-WARNING **: 11:36:43.455: Failed to load '/home/proj/coq2/_build/default/../install/default/share/coq/coq.lang': could not find the RelaxNG schema file

(coqide:13368): Gtk-WARNING **: 11:36:43.489: Error loading theme icon 'window-close' for stock: Icon 'window-close' not present in theme ubuntu-mono-dark

(coqide:13368): Gtk-WARNING **: 11:36:43.489: Error loading theme icon 'image-missing' for stock: Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
CoqIDE internal error: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
Fatal error: exception Gpointer.Null


</details>
@jfehrle jfehrle added part: CoqIDE Issues and PRs related to CoqIDE or other IDE features of coq. kind: question Issues seeking an answer to a question. Consider asking on zulip instead. kind: bug An error, flaw, fault or unintended behaviour. labels Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug An error, flaw, fault or unintended behaviour. kind: question Issues seeking an answer to a question. Consider asking on zulip instead. part: CoqIDE Issues and PRs related to CoqIDE or other IDE features of coq.
Projects
None yet
Development

No branches or pull requests

1 participant