Caja: what does this RuntimeError mean exactly?

Hi All,

In the name of science I'm logging 'caja' at the moment :wink:

I get a very peculiar error every time I cange directory:

RuntimeError: object at 0x7fd5c084c7c0 of type FolderColorMenu is not initialized

Let me show you :

Now I have three questions:

  1. what does the error mean exactly ?
  2. does it affect caja's stability ?
  3. what is the most plausable cause ?
1 Like

In the journey/adventure of logging I collect some gems here and there:
This is another little snag, seems to be an old one (2015)
Closing a caja window results in:

(caja:488077): Gtk-CRITICAL **: 22:08:44.074: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed

contrary to what is claimed: it seems to be not critical at all

As for the first bug that you mentioned: That message is actually not produced by Caja itself, technically. It is produced by an "extension" to Caja that is installed on all versions of Ubuntu MATE that I can remember. The extension is called Folder Colors (IIRC), and lets you change the color of a folder's icon when you right-click on the folder -- there's a submenu near the bottom of the main right-click menu called something like Change Folder's Color.

It's a pretty simple -- I'd say overly simple -- extension that, like most other Caja extensions (sadly) probably isn't maintained all that well. In older releases of Ubuntu MATE, there was another extension that was causing odd messages in log files. That extension was the Deja Dup Backup extension for Caja, and like this Folder Color extension, it added an entry to the right-click menu -- the Deja Dup Backup extension added an entry which, when clicked, would restore an older version of the selected file(s) from a recent backup, using the Deja Dup backup program. Well, suffice it to say that, the way this extension integrated with Deja Dup was rather indirect and error-prone, and when another unrelated component (technically the AST module from Python) changed, the extension broke and the Deja Dup extension didn't even show its menu item! Worse, every time you right-clicked on a file, an annoyingly verbose error message was written to the log! The issue was eventually fixed, and then I introduced my own version of the extension which used a far more direct and less error-prone method to integrate with Deja Dup, so that isn't a problem anymore.

By the way, while I was quality assurance testing 21.10, I came across an issue wherein even the Caja Extensions dialog (that lists all the extensions you have installed) acted weird. I was too busy dealing with my primary focus that release cycle -- working support for screen-reader-guided installation of the operating system -- to bother reporting the issue. But I might as well start bringing it up now:

I hovered over one line in the list, and the name and description of the extension suddenly changed! That is just one of the myriad screenshots I took of the wonky behavior I mentioned above.

TL;DR: I think we have a problem with these unofficial Caja extensions. They need better maintainership, and it's probably a good idea to open a bug report regarding this issue.

As for your second issue, the link you provide links to a GNOME application that has literally nothing to do with Caja. I think it's coincidence that the errors have the same format. I couldn't find a Caja bug report specifically for this, but I have seen this issue myself. It seems to be related to the Caja Icon View. So far that's all I know about the issue.

1 Like

You hit the nail on the head :grin:

I knew of the existence of folder colors but never even considered that It was a plugin

Indeed, when I disabled Python: folder-color it stopped the error-messsage.
Good to know, because now I have something more solid to put in the bugreport.

As for the second issue, you are right again, it must be some library that is commonly shared between apps. do you have an educated guess which one it could be ?

P.S. Related to the wonky behaviour of caja extensions window you showed,
not only 'caja' but also 'transmission-gtk' is affected.
I suspect more a GTK issue than a python-plugin issue here.
Strangely enough after a recent update, both behaved normally again.
I wonder if it lasts.

... and filed a bug:

1 Like

Yay progress,

apport revealed that "folder-colors" was not installed, even though, caja's folder-colors worked without problem. After installing "folder-colors" , the errormessage disappeared.

I think, something must have gone sideways during update 20.04 ->22.04