Error while adding the file monitor. Unsupported operation

Bug #1003185 reported by Iestyn Guest
162
This bug affects 34 people
Affects Status Importance Assigned to Milestone
Shutter
New
Medium
Unassigned
Debian
New
Undecided
Unassigned

Bug Description

Hi there,

I guess I'm missing some critical component needed by Shutter. I'm running Ubuntu 12.04 Precise 64-bit. The backstory is that this was a Kubuntu 12.04 box. I installed unity and removed everything KDE.

When I start Shutter from the command line I get no error messages. Only after I snap the first screenshot do I get the above error message. Also, after I snap the first screenshot, I'm unable to close the tab of the first image. The terminal windows then outputs this error:

*** unhandled exception in callback:
*** Can't call method "cancel" on an undefined value at /usr/bin/shutter line 5728.
*** ignoring at /usr/bin/shutter line 2902.

I'm no perl expert, but it looks like to close the currrent tab we need to get the current file name or file handle?. Perhaps the file name is not available due to the error about not being able to add the file monitor.

Short of re-installing the whole OS, any ideas on what I should check for? Perhaps a missing package?

Thanks,

Iestyn Guest.

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote : Re: [Bug 1003185] [NEW] Error while adding the file monitor. Unsupported operation

Do you save the screenshots to your local harddrive?

Revision history for this message
Iestyn Guest (iguest) wrote :

Umm, well, the screenshots save automatically in /home/iguest/Pictures/ As it happens /home/ is located on an NFS share drive.

So, last night I formatted the disk and installed Ubuntu 12.04 fresh (not Kubuntu). Remounted my NFS share, and the error (Error while adding the file monitor. ) came right back again.

I suspected that either NFS is the problem, or something in my home directory... So, I created a new test user account. Ubuntu creates the users home directory on the NFS share ( /home is mapped to the NFS share) - All is well. Shutter works flawlessley in the new account over NFS. The problem must be something is my own home account. I've checked file and group permissions on all files and directories. Even unmounted .gvfs and deleted it. Rebooted - Same problem still. Not sure what else to check. Any ideas?

Revision history for this message
Iestyn Guest (iguest) wrote :

Hi there,

It appears I made a mistake while setting up my test cases last night (it was late).

NFS looks like the problem. If I comment out the line in /etc/fstab to mount the NFS share ( and reboot ), then create a new account on the local hard disk, Shutter works fine. If I use the Ubuntu guest account (Which is created in /tmp/) shutter work fine also. If I mount the NFS share (edit fstab & reboot) and then create a new user account that lives on that share, Shutter gives me the file monitor error.

Thanks for being patient.

Kind regards,

Iestyn

Revision history for this message
Iestyn Guest (iguest) wrote :

Hello,

Just a quick update - Although not ideal, I've found a work arround to this problem:

1. Deleted the local .shutter/ directory in my home.
2. Start Shutter.
3. Leave "Automatically save file" enabled.
4. Edit -> Preferences. Set Directory to /tmp/

This way the files aren't automatically saved to my NFS $HOME, but are saved local on the machine. If I need to do something with an image, I can use Nautilus or cp to copy it from /tmp to my $HOME.

For reference my fstab mount string looks like this:
192.168.1.151:/home /home nfs rw,intr,soft,noquota,noatime,rsize=8192,wsize=8192,tcp,nolock,async

Kind regards,

Iestyn

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote :

Thanks for your detailed explanations, Iestyn. I am afraid there is no quick fix available here, because GnomeVFS doesn't seem to support monitoring on NFS mounts. There is a migration task to track the GIO transition: https://bugs.launchpad.net/shutter/+bug/1006290

Hopefully GIO supports NFS mounts in this case.

Changed in shutter:
assignee: nobody → Mario Kemper (Romario) (mario-kemper)
importance: Undecided → Medium
milestone: none → road-to-gtk3
status: New → Confirmed
Revision history for this message
Iestyn Guest (iguest) wrote :

Thanks so much for looking into this.

There's some interesting reading on GIO here: http://en.wikipedia.org/wiki/GIO_(GNOME)

Also an interesting read is this posting from Alexander Larsson (Red hat) to the gtk-devel-list explaining the short comings of gnome-vfs. https://mail.gnome.org/archives/gtk-devel-list/2006-September/msg00072.html

Perhaps in the interim I'll try Samba instead of NFS - Who knows; perhaps it will work. My current workaround isn't all that bad anyhow.

Thanks, again.

Kind regards,

Iestyn Guest

Revision history for this message
Profpatsch (profpatsch) wrote :

Same issue here, on a complete different configuration:

When taking a screenshot and the program starts, the error popup appears for each tab that gets loaded in the main window. After that the tabs are non-closable and throw this error message on the console when the x on the tab is clicked:
*** unhandled exception in callback:
*** Can't call method "cancel" on an undefined value at /usr/bin/shutter line 5737, <DATA> line 19.
*** ignoring at /usr/bin/shutter line 2921, <DATA> line 19.

Config:
Shutter 0.89.1 Rev. 1228
Archlinux (installed from AUR, so basically directly compiled from the newest code)
i3 window manager with as slim a setup as possible (only window manager and basic gui-tools)
x86_64

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

I've only just got this error too. In my case, I have no networked drives mounted. However, I've got my directories split over an SSD and a spindle HDD. I've been trying to save to /tmp, which is on the SDD, as are most of the "main" files.

If relevant, this is my setup.
SSD
  /
  /home

HDD via fstab
  /home/sparhawk/HDD/

HDD via mount bind:
  /var/tmp
  /var/log
  /var/cache

HDD via symlinks
  /home/sparhawk/.cache
  /home/sparhawk/.mozilla/firefox/[random].default/Cache
  /home/sparhawk/.local/share/Trash

Revision history for this message
Aaron Roydhouse (aaron-roydhouse) wrote :

I am a long-time user of Shutter. Since sometime in January 2013 I have started getting this error popping up:

  Error while adding the file monitor. Unsupported operation

I get the error for local folders and also if I switch to '/tmp/' as suggested up. I get it after taking each new screen shot, and for each image in the current session when Shutter loads. I am not using NFS, just local folder on my local 12.04 no recent changes except the Ubuntu updates.

If you quit and restart Shutter process, you get the same errors when you start it again.

Revision history for this message
Aaron Roydhouse (aaron-roydhouse) wrote :

I use Shutter on a laptop with 12.04 and Shutter 0.89.1 with a local home directory. I am not using a network folder. Recently I started seeing the "Error while adding the file monitor" whenever you start Shutter (for each session image) and when you take a screen shot.

When I start Shutter from the command line this is what I get:
------
WARNING: Net::DBus::GLib is missing --> Ubuntu One support will be disabled!

WARNING: Gtk2::AppIndicator is missing --> there will be no icon showing up in the status bar when running Unity!

(shutter:2037): gnome-vfs-modules-WARNING **: Could not initialize inotify
------

Is it the inotify problem that leads to the errors when using Shutter?

Revision history for this message
misterich (misterich) wrote :
Download full text (11.0 KiB)

Ditto on this bug for me.

     richw@watson:~$ shutter --version
        0.90 Rev.1252

I have some NFS mounts -- however, when I set shutter to use the default ( ~ ) -- which is not mounted via NFS, I still get the error.

I also noticed that there are a few packages that probably should be added as dependencies for shutter as well:

    libimage-exiftool-perl
    libnet-dbus-glib-perl

These will twart the warnings for the following:

    WARNING: Net::DBus::GLib is missing --> Ubuntu One support will be disabled!
    WARNING: Image::ExifTool is missing --> writing Exif information will be disabled!

##MY ENVIRO
- Release: Ubuntu 12.04 (precise)
- GNOME: unknown (unknown)
- Xfce: 4.8
  - Note: I use Xubuntu
- Kernel: 3.2.0-36-generic (#57-Ubuntu SMP Tue Jan 8 21:44:52 UTC 2013)

## STARTING SHUTTER FROM COMMAND LINE
    richw@watson:~$ rm -rf .shutter/
    richw@watson:~$ shutter

        ERROR: settingsfile /home/richw/.shutter/settings.xml does not exist

        INFO: new plugin information detected - /usr/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion
        ... blah blah info plugin...
        INFO: new upload-plugin information detected - /usr/share/shutter/resources/system/upload_plugins/upload/TwitPic

        (shutter:17724): gnome-vfs-modules-WARNING **: Could not initialize inotify

USER ACTION: take a screenshot

<Error message 'Error while adding the file monitor. Unsupported operation' pops up>
USER ACTION: click cancel

<Image appears in the main window>
USER ACTION: click the 'x' to close the image tab in the main window

        *** unhandled exception in callback:
        *** Can't call method "cancel" on an undefined value at /usr/bin/shutter line 5655, <DATA> line 19.
        *** ignoring at /usr/bin/shutter line 2893, <DATA> line 19.

## STARTING SHUTTER FROM COMMAND LINE WITH DEBUG
    richw@watson:~$ rm -rf .shutter/
    richw@watson:~$ shutter --debug

        INFO: gathering system information...
        Linux watson 3.2.0-36-generic #57-Ubuntu SMP Tue Jan 8 21:44:52 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
        Ubuntu 12.04.1 LTS \n \l

        Glib 1.241
        Gtk2 1.223
        Glib built for 2.30.1, running with 2.32.3
        Gtk2 built for 2.24.6, running with 2.24.10

        ERROR: settingsfile /home/richw/.shutter/settings.xml does not exist

        INFO: new plugin information detected - /usr/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion
        Barrel Distortion - /usr/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion
         ... blah blah info plugin...

        Current window manager: Xfwm4
        Current window manager: Xfwm4

        type_changed was emitted by widget Gtk2::ComboBox=HASH(0xaf8b58)
        qvalue_changed was emitted by widget Gtk2::HScale=HASH(0x3530508)

        (shutter:21906): gnome-vfs-modules-WARNING **: Could not initialize inotify

        progname_toggled was emitted by widget Gtk2::CheckButton=HASH(0xae27e0)
        im_colors_changed was emitted by widget Gtk2::ComboBox=HASH(0xae27b0)
        im_colors_toggled was emitted by widget Gtk2::CheckButton=HASH(0x348365...

Revision history for this message
misterich (misterich) wrote :

Actually, my workaround (comment #11) really didn't end up working for me. It seems that the session is needed for successful editing :-(

I do apologize, but I had to create up a VERY clunky shell script to get done what I need to get done. ***please, please please post if you would like further data or if you have a fix.*** Shutter is a really neat tool without comparison on Linux!

####MY CLUNKY SHELL SCRIPT
$HOME/bin/fake-shutter.sh

                   #!/bin/sh
                   # Fake shutter. See https://bugs.launchpad.net/shutter/+bug/1003185
                   #
                   destination='/data/screenshots';
                   timestamp=`date +%Y-%m-%d_%H-%M-%S.%N`;
                   windowName='';
                   windowId='';

                   #1. Get the window ID and name of the window to select
                   windowId=`xdotool selectwindow`;
                   windowName=`xdotool getwindowname $windowId | sed -e 's/[ \t]/_/g' | sed -e 's/[\/\!\~\`\*\&\\\$\|\^\#\@]//g'`;

                   #2. Set the filename
                   filename=$destination/$timestamp.$windowName.png

                   #3. Raise the window and get a screenshot
                   `xdotool windowactivate --sync $windowId`;
                   `import -frame -window $windowId $filename`;

                   #4. Open Inkscape in background to make edits
                   inkscape -g -f $filename &

                   exit

Revision history for this message
Aaron Roydhouse (aaron-roydhouse) wrote :

I've done more investigation and it mostly points to the libgnomevfs or inotify getting into a bad state. Please try a full reboot and note here if the problem (temporarily) goes away. New reports are coming in of the same error (see #1043118 and #1098772).

The key error from Shutter is on start-up:

  gnome-vfs-modules-WARNING **: Could not initialize inotify

The the pop-up error when add a screenshot, and the inability to close/delete existing screenshots are the follow-on symtoms.

I tried upgrading Shutter to latest stable release (0.90~ppa4~precise1) but same problem. I tried downgrading the libgnomevfs packages from the current 1:2.24.4-1ubuntu2.1 release back to 1:2.24.4-1ubuntu2, then logging out and logging in, but that didn't help either, so I reverted to latest stable.

I tried increasing the number of files that can be watched with inotify from the default 65535 to 100000, in case between Dropbox and Shutter it was running out (though I only have 5000 Dropbox files and 12 Shutter files).

  /proc/sys/fs/inotify/max_user_watches

But that didn't help either. In fact Dropbox stopped working too, says 'Can't access DropBox folder'. Again this is a local filesystem folder. I assume gnomevfs and/or inotify flaked for Dropbox too.

At that stage a full reboot appears to clear the problem, and Shutter and Dropbox sprang to life again. inotify is a kernel service so I guess it is possible that the kernel, inotify, or gnomevfs has some sort of resource leak, and one of them is the root cause of our Shutter problems. Anyone more knowledgeable on inotify think that is a valid theory?

Shutter and Dropbox are pretty mission-critical for me so this Ubuntu 12.04 LTS regression is obsessing me :)

Revision history for this message
misterich (misterich) wrote :

RE #11, #12:
- I installed `gnome`, `gnome-shell` ...and the rebooted. The problem went away.
    sudo apt-get install gnome gnome-shell
- Note that I have never installed Gnome until now as I use XFCE.

**Do others experiencing this problem have Gnome installed (even if it isn't the current window manager?)**

RE #13:
- I concur -- the issue is with `gnome-vfs-modules`
- I will utilize a bit more tomorrow (30 Jan 2013) and see if the problem returns.

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

I'm on KDE. I never saw this problem in the past when I was using Unity and Gnome Shell.

Revision history for this message
misterich (misterich) wrote :

RE #15 (Sparhawk):
I'm thinking that there might be some sort of dependency that is unknown here. You run KDE and I run XFCE. Neither of which are Gnome. After a full day of having `gnome` and `gnome-shell` installed, I don't see the problem.

> Note that I am **not** running Gnome as my window manager, they are merely installed. I still run XFCE as my WM.

A couple of things for the group:
1. Does anyone else duplicate the issue who has `gnome` and `gnome-shell` installed (note, this doesn't have to be the WM in use)?
2. If you did not have `gnome` and `gnome-shell` installed -- after you install them, does the problem go away?

Revision history for this message
Iestyn Guest (iguest) wrote : Re: [Bug 1003185] Re: Error while adding the file monitor. Unsupported operation

On 01/31/2013 12:03 PM, misterich wrote:
> RE #15 (Sparhawk):
> I'm thinking that there might be some sort of dependency that is unknown here. You run KDE and I run XFCE. Neither of which are Gnome. After a full day of having `gnome` and `gnome-shell` installed, I don't see the problem.
>
>> Note that I am **not** running Gnome as my window manager, they are
> merely installed. I still run XFCE as my WM.
>
> A couple of things for the group:
> 1. Does anyone else duplicate the issue who has `gnome` and `gnome-shell` installed (note, this doesn't have to be the WM in use)?
> 2. If you did not have `gnome` and `gnome-shell` installed -- after you install them, does the problem go away?
>

The workaround I'm using is to set the local storage directory to /tmp
(Shutter -> Preferences -> Main Tab -> Directory: tmp and file name is
Default: $name_%NNN)

The default directory was my $HOME which is an NFS share. Never had the
problem with 10.04 Lucid (Same NFS Share, same server setup) Upgraded to
12.04 Precise and the problem appeared. For what it's worth I have two
machines at the house now, and both behave the same way.

Kind regards,

Iestyn

Revision history for this message
Aaron Roydhouse (aaron-roydhouse) wrote :

I think the NFS/AFS issue is a bit of red herring or actually a different problem.

The error we all experiencing at their core are all inotify errors, inotify is a kernel service, so it affects lots of software, like Shutter, like Dropbox, gnome-vfs, etc. NFS/AFS never supported inotify anyway, so that seems peripheral (IMHO).

The problem doesn't happen after a reboot, and hits people who use inotify a lot, so it smells like a resource leak. And given this is a kernel service, probably a leak in the kernel. For me it seems to have started about 3 months back, so probably someone on the kernel team made a boo boo.

This bug-fix here #1101666 looks like worth trying, it is specifically a kernel fix for a leak in inotify (of file descriptors).

  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666

It has just be pushed as a kernal update (3.2.0-37.58), so you don't need to go to too much trouble to try it. I suggest we all update, reboot, and then wait and see if this problem ever returns.

If after this update you still get the NFS/AFS issues, then I think that is a separate bug.

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

I was attempting to replicate the bug so that I could see whether installing gnome and gnome-shell would fix it for me. I cannot replicate it any more. This might be the fix: this morning I installed the new kernel from the Ubuntu repos.
$ uname -r
3.5.0-23-generic

@Aaron: I didn't read the whole page that you linked, but the latest comment suggests that that bug may have been fixed with this same kernel
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/comments/55

Revision history for this message
Aaron Roydhouse (aaron-roydhouse) wrote :

Thanks @Sparhawk, I believe the same patch that is in 3.5.0-23 is also in 3.2.0-37.58. The checked the release notes for 3.2.0-37.58 and it specifically mentions the patch from #1101666.

https://launchpad.net/ubuntu/+source/linux/3.2.0-37.58

So if you are on 12.04 like me, it should be enough to update to 3.2.0-37.58.

#1101666: "This bug is awaiting verification that the kernel for Precise in -proposed solves the problem (3.2.0-37.58)."
(and it is now in -updates as of 1 Feb 2013)

Revision history for this message
Iestyn Guest (iguest) wrote :

Hello,

It's been quite some time since I looked at this bug. For what it's worth, I still have the problem. I'm still running Ubuntu Precise on a desktop with Nvidia drivers= 310.14. Kernel= 3.5.0-28-generic #48~precise1-Ubuntu SMP x86_64. I'm running Unity, but have all of Gnome and Gnome-Shell installed. I'm using Shutter version=0.90, Rev=1252. I still have my $HOME mounted on an NFS share. Also installed libimage-exiftool-perl and libnet-dbus-glib-perl as per MisterRich comment above. Still have the exact same error message (Error while adding file monitor) from Shutter.

Again just to point out, Ubuntu 10.04 didn't have this problem and I my $HOME was mounted on an NFS share back then too.

Not a critical bug. I'll go back to using /tmp to store the screenshots. Perhaps it will resolve itself on some future upgrade.

Kind regards.

Iestyn

Revision history for this message
Alexander Skwar (alexander-skwar) wrote :

Hey,

another "me too".

I'm on Ubuntu 13.04 with Unity. My /home is on a btrfs subvol, mounted like that:

a@ask-home:~$ mount | grep /home
/dev/mapper/ssd-Data on /home type btrfs (rw,noatime,ssd,discard,subvol=home)

Interestingly, on my Ubuntu 13.04 system at work, I don't have that problem and there /home is also on btrfs:

a@ewzw032:~$ mount | grep " "/home' '
/dev/mapper/system-Root on /home type btrfs (rw,subvol=@home)

Increasing /proc/sys/fs/inotify/max_user_watches didn't help - at work, it's set to 16k; at home, it was set to 8k and I now increased it VERY much:

a@ask-home:~$ echo 216384|sudo tee /proc/sys/fs/inotify/max_user_watches

Problem still exists.

I do not have gnome-vfs erros in the output on the terminal were I started shutter and also not in ~/.xsession-errors. WHen taking a screenshot, I get:

INFO: DBus connection to org.freedesktop.compiz failed --> skipping compiz related tasks

org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not provided by any .service files

Well?

Revision history for this message
Alexander Skwar (alexander-skwar) wrote :

Hi

Ah, found something. It's somehow related to btrfs.

At home, I've got these subvolumes:

a@ask-home:~$ sudo btrfs subv list /.btrfs/ssd-Data/
ID 256 gen 44598 top level 5 path home
ID 257 gen 44599 top level 5 path home/a
ID 258 gen 37865 top level 5 path Cloud
ID 276 gen 37848 top level 5 path Media
ID 277 gen 44596 top level 5 path Cloud/Dropbox
ID 283 gen 44470 top level 5 path VirtualBox
ID 320 gen 44599 top level 5 path home/b

My $HOME is /home/a, which is the btrfs subvolume with the ID 257. When I'm in ~, even "df" has issues:

a@ask-home:~$ LC_ALL=C df ~
Filesystem 1K-blocks Used Available Use% Mounted on
- 53493760 38565788 14559080 73% /home/a

Pay attention to what's shown in the "Filesystem" column - a dash "-".

When I'm in /home, df works fine. I made a test directory "/home/test", writable by everyone. I can then successfully set the Shutter save path to /home/test and all's well.

So, don't know where the issue is, but it's somehow related to Shutter, gnome and btrfs, I'd guess.

Alexander

Revision history for this message
MarkJ (marker) wrote :

I had the same problem, "Error while adding the file monitor" shows up as a dialog when shutter boots up, when running shutter 0.89 rev.1219 on ubuntu 13.04 running from a usb drive.

The 2013-06-20 comment on the duplicate issue, says to comment out calls to fct_add_file_monitor:
    https://bugs.launchpad.net/bugs/1003185

I ended up having to do a similar thing, I commented out
    $sd->dlg_error_message( Gnome2::VFS->result_to_string($result), $d->get("Error while adding the file monitor.") );

Mario, can't we just change the error message to print to STDERR as a warning? ie:
   print "Warning! Unable to adding the file monitor."; instead of dlg_error_message()?

That way, people like https://bugs.launchpad.net/ubuntu/+source/shutter/+bug/1043118/comments/7
  can still do a command line screenshot without getting a dialog every time?

Revision history for this message
Hendy Irawan (ceefour) wrote :

I have only ext4 & NTFS partitions yet I also get this error.

Revision history for this message
Hendy Irawan (ceefour) wrote :

I'm using Linux Mint 15 64-bit

Here's command line errors: ironically no errors are printed during the dialog error messages.

> shutter

WARNING: Net::DBus::GLib is missing --> Ubuntu One support will be disabled!

WARNING: Image::ExifTool is missing --> writing Exif information will be disabled!

WARNING: Gtk2::AppIndicator is missing --> there will be no icon showing up in the status bar when running Unity!

Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.

(shutter:21301): gnome-vfs-modules-WARNING **: Could not initialize inotify

WARNING: DBus connection to org.freedesktop.compiz failed --> setting keyboard shortcuts may not work when using compiz

org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not provided by any .service files

Revision history for this message
Hendy Irawan (ceefour) wrote :

My kernel is :

Linux amanah.dev 3.11.0-8-generic #15-Ubuntu SMP Fri Sep 20 04:11:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Scottix (scottix) wrote :

Finally it bugged me enough to create a small patch that will handle the errors.
This doesn't solve the issue but lets it handle the errors that will bug it out.

Revision history for this message
Meekreau (mail-pfhvb) wrote :

I experience the same symptoms on Kubuntu 14.04 LTS running the following kernel: 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64

I am another long time Shutter user and have used it successfully in KDE since Kubuntu 13.04. However, I have not used it for a while (couple of months) so I am unable to point out the exact time it broke. Starting from approximately 3.13.0-61-generic kernel update I experience system-wide multiple appearing and disappearing issues, among them with inotify (e.g. SpaceFM file manager was affected for some time). That is the issues are hard to reproduce / are fixed (~disappear) in the next kernel update (just an impression, untested).

Workaround suggested in #16 by misterich (apt-get install gnome) works for. So it seems to be indeed some dependency issue potentially triggered by kernel updates.

For the sake of completeness, my terminal output:

(shutter:22480): gnome-vfs-modules-WARNING **: Could not initialize inotify
INFO: DBus connection to org.freedesktop.compiz failed --> skipping compiz related tasks
org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not provided by any .service files
INFO: DBus connection to org.freedesktop.compiz failed --> skipping compiz related task
org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not prov
GLib-CRITICAL **: Source ID 665 was not found when attempting to remove it at /usr/bin/
*** unhandled exception in callback:
*** Can't call method "cancel" on an undefined value at /usr/bin/shutter line 5655.
*** ignoring at /usr/bin/shutter line 2893.

Revision history for this message
Meekreau (mail-pfhvb) wrote :

Just another observation:

As udisks2 causes trouble in my workflow (many open Dolphin - KDE file manager - windows turn mad and eat up 100% CPU for at least a minute when udisks2 recognises new device) I've uninstalled it and use udevil from SpaceFM instead. After having installed Gnome as described in my comment #29, udisks2 was pulled back as dependency. An attempt to remove it yields the following output:

# apt-get remove udisks2
...
The following packages will be REMOVED:
  brasero gnome gnome-applets gnome-core gnome-disk-utility
  gnome-session-flashback gnome-shell-extensions gnome-sushi gvfs
  gvfs-backends gvfs-daemons nautilus nautilus-sendto udisks2

Which creates a conflict for me.

So perhaps having gvfs, gvfs-daemons and gvfs-backends (and as a result udisks2) installed could solve this issue.

Revision history for this message
Meekreau (mail-pfhvb) wrote :

It seems that on my system shutter was missing udisks2 only that was pulled as dependecy by gnome (or by gvfs to be a bit more accurate). So I must have stopped using shutter before I got rid of udisks2. The whole gnome installation was redundant and thus reverted. Shutter is still happy. The problem seems to be that udisks2 is not marked as dependency of Shutter (or of libgnome2-vfs-perl which Shutter depends on) in Ubuntu, at least 14.04 LTS version.

If someone runs into the same problem as me, i.e. make udisks2 ignore device changes, the following line in /etc/udev/rules.d/10-local.rules should help:

ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="sd*|sr|dm*", ENV{UDISKS_IGNORE}:="1"

Revision history for this message
Moritz (6-ubuktuone-n) wrote :

Since the upgrade of my system to Ubuntu 16.04.1 LTS with KDE I'm having the same problem (Error while adding the file monitor.). Since I try to automatically save the screenshots to my home folder and the home folder is encrypted, I suspect the encrypted home folder as cause of the problem.

The debug ouput is unsuspicious without warnings.

Revision history for this message
DJ Stauffer (m-ubuntuont-8) wrote :

I had this problem also. As it turns out, I had downloaded some files into the $HOME/Downloads directory of a normal user as root, so those files were owned by root. I'm guessing that shutter barfed while trying to read the contents of the directory. chowning the directory and its contents back to the normal user allowed shutter to start without the error.

Prior to this I had tried removing the ~/.shutter directory, but the error persisted after doing so.

Revision history for this message
Michael Kogan (michael-kogan) wrote :

Could please somebody test if installing udisks2 and adding a udev rule as proposed by Meekreau helps? If so, this might be a packaging level problem (adding udisks2 dependency). As of myself, I have udisks2 installed on my machine and never saw this error so far, which supports the hypothesis.

Changed in shutter:
status: Confirmed → Incomplete
Revision history for this message
B@MB@M (bart-bamweb) wrote :

I have the same issues, where the location where I write the photos to is on a NFS share.

Revision history for this message
Michael Kogan (michael-kogan) wrote :

Could you please check, if udisks2 is installed on your machine and if not install it and test again?

Revision history for this message
1448412 (uli-rgbg) wrote :

Ran into the same Problem. udisks2 is installed on my machine.

Revision history for this message
Michael Kogan (michael-kogan) wrote :

Did you also add the udev rule as proposed in comment #31?

Revision history for this message
Meekreau (mail-pfhvb) wrote :

The udev rule in my older comment #31 is basically offtopic - that was merely a workaround to prevent automount of storage devices by udisks2 because I was using some other tool for that. I guess I did not make it clear enough. So the directly relevant part for problem is only that I installed udisks2 back then.

Changed in shutter:
status: Incomplete → New
Revision history for this message
Gregory (gmarthews-1) wrote :

I think this only happens when within a network situation, the permissions
seem unable to deal with that scenario - just a guess based on two machines
one at work within a network and one standalone at home.
G

On 31 December 2017 at 02:41, Photon <email address hidden> wrote:

> ** Changed in: shutter
> Status: Incomplete => New
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1575986).
> https://bugs.launchpad.net/bugs/1003185
>
> Title:
> Error while adding the file monitor. Unsupported operation
>
> Status in Shutter:
> New
>
> Bug description:
> Hi there,
>
> I guess I'm missing some critical component needed by Shutter. I'm
> running Ubuntu 12.04 Precise 64-bit. The backstory is that this was a
> Kubuntu 12.04 box. I installed unity and removed everything KDE.
>
> When I start Shutter from the command line I get no error messages.
> Only after I snap the first screenshot do I get the above error
> message. Also, after I snap the first screenshot, I'm unable to close
> the tab of the first image. The terminal windows then outputs this
> error:
>
> *** unhandled exception in callback:
> *** Can't call method "cancel" on an undefined value at
> /usr/bin/shutter line 5728.
> *** ignoring at /usr/bin/shutter line 2902.
>
> I'm no perl expert, but it looks like to close the currrent tab we
> need to get the current file name or file handle?. Perhaps the file
> name is not available due to the error about not being able to add the
> file monitor.
>
> Short of re-installing the whole OS, any ideas on what I should check
> for? Perhaps a missing package?
>
> Thanks,
>
> Iestyn Guest.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/shutter/+bug/1003185/+subscriptions
>

Revision history for this message
Jason (lingfish) wrote :

I don't agree that this is network related. Happening to me as well, with local directories.

This is a quite annoying bug, and has been around since 2012; is there anything more we can supply to get this resolved?

Revision history for this message
Jason (lingfish) wrote :

Looking at the source, I'm quite lost as to why shutter needs to register any watches via inotify anyway?

#setup a new filemonitor, so we get noticed if the file changed

Why? What if anything does Shutter do in that case?

Either way, a setting to disable it completely would be very handy...

Revision history for this message
David Dombrowsky (davek) wrote :

> Either way, a setting to disable it completely would be very handy...

That would be wonderful.

dino99 (9d9)
Changed in shutter:
assignee: Mario Kemper (Romario) (mario-kemper) → nobody
Revision history for this message
Adam Bolte (boltronics) wrote :

I'm on Debian Stretch and have hit this issue. I'm using cryptsetup/LUKS -> LVM -> btrfs and already have udisks2 installed. I'm running an Xfce desktop.

I've extended the patch scottix made so I can not only avoid the pop-up but get image file deletion working again too.

Of course, an option to disable this issue completely from the GUI would be preferred.

Revision history for this message
Marco Righi (marco-righi) wrote :

I have the same problem and I do not use NFS or crypto-directory. Is is a bug and shutter is not usable at the moment. The error does not permit to delete previous screenshoot. Please resolve or back to a previous version.

Revision history for this message
Marco Righi (marco-righi) wrote :

delete the configuration does not resolve the problem

Revision history for this message
Pieter (peterdeltafm) wrote :

Since yesterday i had the same problem, so today i deleted the sesion.xml file on mij Ubuntu system.

This can be found under $HOME/.shutter

This solved it for me.
I noticed the problem started after a screenshot of a QRC and trying to save it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.