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

g_file_info_ unset attributes cause errors in the logs #1704

Open
UnoSD opened this issue Mar 19, 2023 · 19 comments
Open

g_file_info_ unset attributes cause errors in the logs #1704

UnoSD opened this issue Mar 19, 2023 · 19 comments

Comments

@UnoSD
Copy link

UnoSD commented Mar 19, 2023

Expected behaviour

Set GFileInfo attributes and avoid errors in the logs

Actual behaviour

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.501: GFileInfo created without standard::sort-order

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.502: file ../glib/gio/gfileinfo.c: line 2061 (g_file_info_get_sort_order): should not be reached

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.502: GFileInfo created without standard::symlink-target

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.502: file ../glib/gio/gfileinfo.c: line 2015 (g_file_info_get_symlink_target): should not be reached

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.752: GFileInfo created without standard::sort-order

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.752: file ../glib/gio/gfileinfo.c: line 2061 (g_file_info_get_sort_order): should not be reached

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.752: GFileInfo created without standard::symlink-target

(caja:11315): GLib-GIO-CRITICAL **: 10:23:35.752: file ../glib/gio/gfileinfo.c: line 2015 (g_file_info_get_symlink_target): should not be reached

Steps to reproduce the behaviour

Use caja

MATE general version

N/A, using Xfce

Package version

MATE caja 1.26.1

Linux Distribution

Arch

@universexplorer
Copy link

Same problem on my system, Mate desktop environment. However, the file gfileinfo.c could not be found at all, but there is a similar file with this full path: /usr/include/glib-2.0/gio/gfileinfo.h

@L-U-T-i
Copy link

L-U-T-i commented May 8, 2023

gfileinfo.c is a part of the source package and not contained in a distribution package. If you'd like to check it, take a look in glib2 source of your distro.

Does this: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1143 help anyhow?

@L-U-T-i
Copy link

L-U-T-i commented May 8, 2023

I've created a patch which should resolve the issue:

diff -up a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c
--- a/libcaja-private/caja-directory-async.c	2023-05-08 18:28:32.971206230 +0200
+++ b/libcaja-private/caja-directory-async.c	2023-05-08 18:28:33.040206707 +0200
@@ -3807,7 +3807,7 @@ static gboolean is_trusted_system_deskto
         return FALSE;
     }
 
-    target = g_file_info_get_symlink_target (info);
+    target = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
     if (!target) {
         goto done;
     }
diff -up a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
--- a/libcaja-private/caja-file.c	2023-05-08 18:28:30.500189123 +0200
+++ b/libcaja-private/caja-file.c	2023-05-08 18:28:30.639190084 +0200
@@ -2396,7 +2396,7 @@ update_info_internal (CajaFile *file,
 	}
 	file->details->size_on_disk = size_on_disk;
 
-	sort_order = g_file_info_get_sort_order (info);
+	sort_order = g_file_info_get_attribute_int32 (info, G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
 	if (file->details->sort_order != sort_order) {
 		changed = TRUE;
 	}
@@ -2451,7 +2451,7 @@ update_info_internal (CajaFile *file,
 		file->details->thumbnailing_failed = (thumbnailing_failed != FALSE);
 	}
 
-	symlink_name = g_file_info_get_symlink_target (info);
+	symlink_name = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
 	if (eel_strcmp (file->details->symlink_name, symlink_name) != 0) {
 		changed = TRUE;
 		g_free (file->details->symlink_name);

Build with this patch went fine, I can however not test it as I am not getting this log...

@fredo-m
Copy link

fredo-m commented Oct 13, 2023

Hi,

Same problem on a machine. I have the impression that I don't have this problem on all machines even though they all have the same version of caja (Debian 1.26.1-1).

oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::sort-order
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2108 (g_file_info_get_sort_order): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::symlink-target
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2062 (g_file_info_get_symlink_target): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::sort-order
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2108 (g_file_info_get_sort_order): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::symlink-target
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2062 (g_file_info_get_symlink_target): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::sort-order
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2108 (g_file_info_get_sort_order): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::symlink-target
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2062 (g_file_info_get_symlink_target): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::sort-order
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2108 (g_file_info_get_sort_order): should not be reached
oct. 13 14:50:35 caja[2405]: GFileInfo created without standard::symlink-target
oct. 13 14:50:35 caja[2405]: file ../../../gio/gfileinfo.c: line 2062 (g_file_info_get_symlink_target): should not be reached
oct. 13 14:50:41 caja[2405]: GFileInfo created without standard::sort-order

@lukefromdc
Copy link
Member

lukefromdc commented Oct 13, 2023

This was already fixed in master with
1096ea0
which is in 1.27.2 sounds like we need to cherrypick this to 1.26

@L-U-T-i your patch is correct and appears to be identical to what I used in the above commit.

@luigifab
Copy link

luigifab commented Oct 21, 2023

Yes please update 1.26.x :) because my .xsession-errors is now more than 100 Mb!
(Debian Testing caja 1.26.1-1)

@xpander69
Copy link

Ohh cheers! I was wondering why the logs get super huge.
Just built the 1.27.2 caja and it seems to have solved the issue.
Not sure if its good idea to mix 1.26 stuff with 1.27 but caja seems to work fine :)

@luigifab
Copy link

luigifab commented Feb 2, 2024

Still no fix? I'm sad.
This is dangerous for space disk for some normal users.

@lukefromdc
Copy link
Member

Fix would be to cherrypick (or if that fails, backport) 1096ea0 to 1.26

@lukefromdc
Copy link
Member

cherrypick to fix this went clean:
4888855
A new 1.26 point release will be needed for distros to pick this up. Rolling release distros will be moving to 1.28 when that comes out, I don't know how many non-rolling releases are going to be using the combination of glib 1.76 or later with MATE 1.26 in perpetuity, but I would assume at least some are.

@lukefromdc
Copy link
Member

We got the docker error on travis for rebuilding 1.26 so that will need to be fixed as in master to do a new release.

A local test build worked fine

@uralets
Copy link

uralets commented Feb 3, 2024

welp... Guess it WILL make it into Ubuntu 24.04

@moof-moof
Copy link

I can confirm that on Ubuntu 24.04.1 Mate and default Caja 1.26.3 the ~/.xsession-errors log file is still writing the
"GLib-GIO-CRITICAL **: ..." messages (as for the OPabove) at a rate of circa 550 lines per minute.

@uralets
Copy link

uralets commented Oct 10, 2024

I can confirm that on Ubuntu 24.04.1 Mate and default Caja 1.26.3 the ~/.xsession-errors log file is still writing the "GLib-GIO-CRITICAL **: ..." messages (as for the OPabove) at a rate of circa 550 lines per minute.

and this is an example of some of the reasons why I'm (a long time MATE and even much longer if we count the GNOME 2 days user) sadly had to move to suffering the gnome 3 FLASHBACK (or fallback whatever this thing is called),

MATE was supposed to be a stable boring thing for grown-ups (to quote the description of Metacity), but instead it can't even handle window focus properly for me (running problem for more than one Ubuntu release), and now (well, not now again for a couple Ubuntu releases) this. Not to mention some bugs that are making a cozy living since the Gnome 2 days (hello Panel and it's bu... ehr.. quirks).

I mean this is not some fringe stuff/weird features, it's well the core of the operation.

Good luck porting to Wayland and polishing text editors and other assorted things that no-one needs (where is the crucial value in carrying it's own text editor? "every DE does this" isn't a valid answer BTW).

/rant

@lukefromdc
Copy link
Member

Until someone who understands Travis and Ruby can fix the deployment issue I have no way to push new releases to the releases page. I simply don't understand much of that part of the workflow, which was set up by others and I have little understanding of it.

@DavidFirefox
Copy link

DavidFirefox commented Oct 24, 2024

Hello !
I have the same error, anybody have news ?
@xpander69 you have build the 1.27 ?
I can't build 1.26.3 or 1.26.4 i have this bug :

configure: error: Package requirements (
    gdk-pixbuf-2.0 >= gdk-pixbuf_minver
    glib-2.0 >= 2.58.1
    mate-desktop-2.0 >= 1.17.3
    gthread-2.0
    gio-unix-2.0
    gio-2.0 >= 2.50.0
    pango >= 1.1.2
    gtk+-3.0 >= 3.22.0
    libnotify
    libxml-2.0 >= 2.4.7
    gail-3.0 >= 3.0.0
) were not met:

Package 'mate-desktop-2.0', required by 'virtual:world', not found
Package 'libnotify', required by 'virtual:world', not found
Package 'libxml-2.0', required by 'virtual:world', not found
Package 'gail-3.0', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ALL_CFLAGS
and ALL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Thanks in advance

@xpander69
Copy link

@DavidFirefox

I have 1.28 already. Arch updated quite some time ago.

@DavidFirefox
Copy link

@xpander69 ok thanks, you know if we can use it on Ubuntu ?
Thanks in advance

@xpander69
Copy link

@xpander69 ok thanks, you know if we can use it on Ubuntu ? Thanks in advance

Don't think arch packages work on ubuntu. You need to build it or wait for them to update the packages.
Can't understand why its not updated on ubuntu. 1.28 was released back in february iirc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants