clipboard menu doesn't get updated after clearing history

Bug #1383013 reported by Rainer Rohde
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Diodon
Fix Released
Medium
Oliver Sauder
diodon (Ubuntu)
Fix Released
High
Unassigned

Bug Description

After first booting when Diodon starts in some rare circumstances it seems that clipboard menu doesn't get updated. Examples are Clear is hit but nothing gets cleared or content gets copied but not added. Those actions are actually properly executed in the background but only the menu is not updated.

Workaround for this issue till we are able to fix it is to quit Diodon and start it again and clipboard menu should work normally again.

Also this issue is not to be confused with a similar behavior which is usually caused through a privacy option see http://esite.ch/2014/08/11/why-does-diodon-not-save-anything-to-the-clipboard-history/

Related branches

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :
Revision history for this message
Oliver Sauder (sao) wrote :

I haven't been able to reproduce this issue on my machine.

Can you therefore try to do the following:
* Close Diodon
* run diodon from the command line: G_MESSAGES_DEBUG=all diodon > diodon_debug.txt
* let it run and occasionally clear history till the error occurs as you have described it
* close Diodon straight away and attach diodon_debug.txt to this bug

Thanks,
Oliver

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Oliver,

since I started Diodon with G_MESSAGES_DEBUG=all diodon > diodon_debug.txt, I was no longer able to reproduce the bug.

However, I did a restart of the system, with Diodon launching automatically at boot, and now the clipboard history can not be cleared.

So, could it be that Diodon is affected by being launched on startup vs. manually launching it? And, in doing so, does it make a difference if it is launched from Unity or the command-line?

I am going to stop Diodon now, and continue to work with it based on the G_MESSAGES_DEBUG=all diodon > diodon_debug.txt launch approach.

Revision history for this message
Oliver Sauder (sao) wrote :

Needs to be checked whether there is a race condition.

I think you should also be able to change your startup application command of Diodon to
G_MESSAGES_DEBUG=all diodon > diodon_debug.txt

you will have to give the txt file a full path e.g. /home/username/diodon_debug.txt

Haven't tried this before but should technically work... maybe this way you are able to reproduce the issue and with a debug log file.

I will have a closer look at the source code to see whether I find anything which could cause this.

Revision history for this message
Oliver Sauder (sao) wrote :

just when I posted my above comment have I thought about one fix I had to do in a newer Ubuntu version which was a race condition with grabbing a hotkey.

Could you therefore check whether you can reproduce this issue in the newest Diodon version in the daily ppa ppa:diodon-team/daily?

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Okay, I am on Diodon 1.3.0-daily now and will test this some more.

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Up until now I wasn't able to reproduce the issue with the daily build, but then after logging in again after a reboot, there it is. See the little Desktop screencast attached.

Revision history for this message
Oliver Sauder (sao) wrote :

The issue seems to be that the history gets cleared but the menu doesn't refreshed.... have to analyze the code on what could go wrong here.

Revision history for this message
Oliver Sauder (sao) wrote :

After analyzing it again there is most likely an error message logged by Diodon when starting up when this error appears. As I am not able to reproduce the bug do I really need a log file to see what exact error is thrown.

I have done some testing and it is actually possible to change Diodon command in the Startup Applications Preferences to the following:
bash -c "G_MESSAGES_DEBUG=all setsid /usr/local/bin/diodon &>/home/user/diodon_debug.log"

replace user with your username. Whenever Diodon is now started it will log into diodon_debug.log. When the error occurs simply attach that log file to this bug (log file is overwritten each time you startup your machine again, so it won't grow to an infinite size...)

Thanks for your help.

Revision history for this message
Oliver Sauder (sao) wrote :

/usr/local/bin/diodon has to be /usr/bin/diodon on your system.

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Alright -- the glitch just happened again, right after logging in. Please see logfile attached.

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :
Revision history for this message
Oliver Sauder (sao) wrote :

Thanks.... unfortunately there is not a single indication in the log file that anything went wrong... weird.

Can you try the following as well when the bug occurs: After clearing the history if the menu doesn't not update, copy another item to the clipboard and check the clipboard menu again whether this content has been added.

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Okay, so I logged in just now after a reboot, and the Diodon history did not initially clear. I then copied another line and that line was added, and, at the same time, the previous history that survived the reboot got deleted. Within the same session, I was able to delete all history just fine.

It seems as if Diodon doesn't remove its history when the history is kept when logging out and rebooting, and is still there after a reboot. Could that be a clue?

For good measure, I added the current debug log as well.

Revision history for this message
Oliver Sauder (sao) wrote :

Thanks that's good to know.

Most likely the error is in a library Diodon uses and not Diodon itself.

One library we use is that a service will notify Diodon when new items are inserted or deleted. It seems that inserting items works but in some cases Diodon doesn't get notified first time when items are being deleted (resp. cleared).

Have to dive into the source code of the library as well to see what's happening.

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Here's to confirm (and visualize) what I described earlier.

1) Log in after a reboot

2) History still there

3) Try to clear history - fails

4) Add new item to history - item is added, previous history is gone

See new screencast attached to help visualize this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in diodon (Ubuntu):
status: New → Confirmed
Changed in diodon (Ubuntu):
importance: Undecided → High
Oliver Sauder (sao)
summary: - Diodon on 14.10 does not clear history consistently
+ clipboard menu doesn't get updated when first time running it
Oliver Sauder (sao)
description: updated
description: updated
Oliver Sauder (sao)
Changed in diodon:
status: New → Confirmed
importance: Undecided → Medium
Oliver Sauder (sao)
Changed in diodon:
milestone: none → 1.4.0
assignee: nobody → Oliver Sauder (sao)
summary: - clipboard menu doesn't get updated when first time running it
+ clipboard menu doesn't get updated after clearing history
Revision history for this message
Oliver Sauder (sao) wrote :

Forcing rebuilding of recent menu when clearing history which should solve this issue.

Fix is available in daily ppa for testing - please confirm whether this has been fixed for you.

This issue is not to be confused with Bug #1435033.

Changed in diodon:
status: Confirmed → Fix Committed
Oliver Sauder (sao)
Changed in diodon:
status: Fix Committed → Fix Released
Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

This issue re-appeared in Ubuntu 16.04: When restarting my laptop while Diodon still has some clipboard data left that hasn't been cleared before the reboot, upon restarting and then accessing Diodon again, the clipboard content cannot be cleared out. Diodon has to be stopped, and started again...

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Forgot to add: The version of Diodon currently installed is 1.3.0.

Revision history for this message
Oliver Sauder (sao) wrote :

Bug has been fixed in version 1.4.0 - the official package in Ubuntu repo is still 1.3.0 - as 16.04 is still a development version newest version is only available in daily ppa https://launchpad.net/~diodon-team/+archive/ubuntu/daily

also see Bug #1563435

Changed in diodon (Ubuntu):
status: Confirmed → Fix Released
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.