SN (v0.4.6) crashes in Trusty 14.04.2 w/ Unity

Asked by Cedric Bhihe

[Trusty 14.04.2 v 3.16.9-41-generic on an x86_64 machine]

indicator-stickynotes 0.4.6-0~ppa1 systematically crashes as I log in my session in Ubuntu Desktop.
No other user (with login rights) on the same platform is affected.
The disappearance of SN coincided with the clock (indicator-datetime) disappearing from the Unity bar.
In the menatime the clock has been reestablished by reconfiguring it with:

$ dconf reset -f /com/canonical/indicator/datetime/

I use SN _all the time_. I am interested in helping to solve that issue.

Question information

Language:
English Edit question
Status:
Solved
For:
indicator-stickynotes Edit question
Assignee:
No assignee Edit question
Solved by:
Cedric Bhihe
Solved:
Last query:
Last reply:
Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#1

Steps I undertook in the hope of restoring the Unity bar applets' functionality (datetime-indicator and Sticky Notes):

$ sudo dpkg-reconfigure --frontend noninteractive tzdata
$ sudo killall unity-panel-service
-> no result, no change
$ sudo restart lightdm
-> causes the system to reboot
-> the applet icon for stickynotes on the unity bar has disappeared.

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#2

Further steps:

I checked the Ubuntu Service Center for the package indicator-stickynotes.
It was shown as installed, but _curiously_ the install missed an installation date.
So I proceeded with purging the package and re-installing it.

$ sudo apt-get purge -y indicator-stickynotes
The following packages will be REMOVED:
  indicator-stickynotes*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 492 kB disk space will be freed.
Removing indicator-stickynotes (0.4.6-0~ppa1) ...
Purging configuration files for indicator-stickynotes (0.4.6-0~ppa1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...

$ sudo apt-get install indicator-stickynotes
[...]
The following NEW packages will be installed:
  indicator-stickynotes
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.0 kB of archives.
After this operation, 492 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/umang/indicator-stickynotes/ubuntu/ trusty/main indicator-stickynotes all 0.4.6-0~ppa1 [50.0 kB]
Fetched 50.0 kB in 0s (70.2 kB/s)
Selecting previously unselected package indicator-stickynotes.
(Reading database ... 561263 files and directories currently installed.)
Preparing to unpack .../indicator-stickynotes_0.4.6-0~ppa1_all.deb ...
Unpacking indicator-stickynotes (0.4.6-0~ppa1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up indicator-stickynotes (0.4.6-0~ppa1) ...

No change. Stickynotes app-indicator still does not appear on the Unity bar.

& sudo killall unity-panel-service

No change.

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#3

Other Unity bar app-indicators work fine:
  - Dropbox, Skype, Psensor, Moz Thunderbird
Others are correctly integrated in the Unity Sound indicator: Clementine and VLC.
 I have no other indicators except for the two missing ones:
 - indicator-datetime
 - indicator-stickynotes

Revision history for this message
Umang Varma (umang) said :
#4

Can you run indicator-stickynotes from a terminal? The command is just indicator-stickynotes. Do you get an error?

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#5

Hello ! Thank you for your response.
Here is the result of running indicator-stickynotes in terminal:

$ indicator-stickynotes
Traceback (most recent call last):
   File "/usr/bin/indicator-stickynotes", line 196, in <module>
     main()
   File "/usr/bin/indicator-stickynotes", line 189, in main
     indicator = IndicatorStickyNotes(args)
   File "/usr/bin/indicator-stickynotes", line 56, in __init__
     self.nset.showall()
   File "/usr/share/indicator-stickynotes/stickynotes/backend.py", line 143, in showall
     note.show(*args)
   File "/usr/share/indicator-stickynotes/stickynotes/backend.py", line 70, in show
     self.gui = self.gui_class(note=self)
   File "/usr/share/indicator-stickynotes/stickynotes/gui.py", line 50, in __init__
     self.css_template = Template(css_file.read())
   File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
     return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 17: ordinal not in range(128)

After multiple re-boots since yesterday the indicator still does not
show on the Unity bar.

*Cédric*
cedric dot bhihe at gmail dot com
------------------------------------------------------------------------

On 06/23/15 23:11, Umang Varma wrote:
> Your question #268452 on indicator-stickynotes changed:
> https://answers.launchpad.net/indicator-stickynotes/+question/268452
>
> Status: Open => Needs information
>
> Umang Varma requested more information:
> Can you run indicator-stickynotes from a terminal? The command is just
> indicator-stickynotes. Do you get an error?
>

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#7

Hi !

- I reworded my first post to make it more readable.

- Upon session login, I see an error message put out by the Ubuntu OS to report on SN's crash:
Traceback is identical to that spewed out when running from terminal:
$ /usr/bin/indicator-stickynotes

==================== Start of error report ==========================
Sorry, Ubuntu 14.04 has experienced an internal error.
If you notice further problems, try restarting the computer.
ExecutablePath:
    /usr/share/indicator-stickynotes/indicator-stickynotes.py
Package:
    indicator-stickynotes 0.4.6-0~ppa1 [origin: LP-PPA-umang-indicatorstickynotes]
ProblemType:
    Crash
Title:
    indicator-stickynotes.py crashed with UnicodeDecodeError in decode(): ' ascii' codec can't decode byte 0xc2 in position17:
        ordinal not in range(128)
Traceback:
Traceback (most recent call last):
File "/usr/bin/indicator-stickynotes", line 196, in <module> main ()
File "/usr/bin/indicator-stickynotes", line 189, in main
    indicator = IndicatorStickyNotes(args)
File "/usr/bin/indicator-stickynotes", line 56, in __init__ self.nset.showall()
File "/usr/share/indicator-stickynotes/stickynotes/backend.py", line 143, in showall
   note.show(*args)
File "/usr/share/indicator-stickynotes/stickynotes/backend.py", line 70 in show
   self.gui = self.gui.class(note=self)
File "/usr/share/indicator-stickynotes/stickynotes/gui.py", line 50, in __init__
   self.css_template = Template(css_file.read())
File "/usr/lib//python3.4/encoding/ascii.py, line 26, in decode
   return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 17: ordinal not in range(128)

ApportVersion:
   2.14.1-0ubuntu3.11
Architecture:
   amd64
CrashCounter:
   1
CurrentDesktop:
   Unity
Date:
   Sat Jun 27 08:31:58 2015
Dependencies:
  I cannot copy by hand all 80 of them !
DistroRelease:
   Ubuntu 14.04
InstallationDate:
   2014-05-09
InstallationMedia:
    Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
InterpreterPath:
   /usr/bin/python3.4
PackageArchitecture:
   all
ProcCmdline:
   /usr/bin/python3 /usr/bin/indicator-stickynotes
ProcCwd:
    /home/ckb
ProcEnviron:
    LANGUAGE=en:US.en
    LC_TIME=en_IE.UTF-8
    LC_MONETARY=en_IE.UTF-8
    PATH=(custom, user)
    LC_ADDRESS=en_IE.UTF-8
    XDG_RUNTIME_DIR=<set>
    LC_TELEPHONE=en_IE.UTF-8
    LANG=en_US.UTF-8
    SHELL=/bin/bash
    LC_NAME=en_IE.UTF-8
    LC_IDENTIFICATION=en_IE.UTF-8
    LC_NUMERIC=en_IE.UTF-8
    LC_PAPER=en_IE.UTF-8
ProcMaps:
    lookup Dropbox public file:
    https://www.dropbox.com/s/fzodetxje8whew5/ProcMap_SN_crash-20150627.jpg?dl=0
ProcStatus
    lookup Dropbox public file:
    https://www.dropbox.com/s/ck7wajr6s4uw7f9/ProcStatus_SN-crash_20150627.jpg?dl=0
ProcVersionSignature:
    Ubuntu 3.16.0-41.57--14.04.1-generic 3,16.7-ckt11
PythonArgs:
   ['/usr/bin/indicator-stickynotes']
SourcePackage:
     indicator-stickynotes

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#8

When trying to contribute a review on indicator-stickynotes
in the Ubuntu Software Center, I get the error message:

=====================
Failed to submit review:
   Error Details:
   Server's response was:
        package indicator-stickynotes not in lp-ppa-umang-indicator-stickynotes trusty for trusty
=====================

Revision history for this message
Umang Varma (umang) said :
#9

Hi,

Given that there is a UnicodeDecodeError, you should expect that you get the message about the crash. However, since indicator-stickynotes is not part of the official Ubuntu repositories, you cannot submit the crash report using the interface and you cannot review it in the software center.

I will try to investigate what is causing the error and post any changes here. Thank you for taking the time to share this information.

Revision history for this message
Umang Varma (umang) said :
#10

Could you download this, extract, and run indicator-stickynotes.py? (To run it, you will have to open a terminal, make sure you are in the directory with indicator-stickynotes.py and the run ./inidicator-stickynotes.py )

https://github.com/umangv/indicator-stickynotes/archive/master.zip

I hope that this fixes your problem.

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#11

@umang: Thanks a lot.
In the meantime I fixed the problem late the day before yesterday.
Here is what had happened.
In an effort to have an environment consitent between different Linux OS among them two servers, I set my locale to
export LC_ALL=C
in my .bashrc
I knew I did not have to do this on the particular machine on which the problem occured with `stickynotes` because:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en_AU:en_CA:en_GB:en_NZ:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_IE.UTF-8
LC_TIME=en_IE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_IE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_IE.UTF-8
LC_NAME=en_IE.UTF-8
LC_ADDRESS=en_IE.UTF-8
LC_TELEPHONE=en_IE.UTF-8
LC_MEASUREMENT=en_IE.UTF-8
LC_IDENTIFICATION=en_IE.UTF-8

already gave me a satisfactorily compatible environment with other remote machines set to the spanish locale, BUT for the sake of clenliness I went ahead and overrode all LC_* parameters by setting LC_ALL=C.
I went back to my log book where I write down the chronology of every change I make on every system I control. I do this to ease recovery from errors as I am a near-noob still. Doing so I noticed that just at the approximate time I started seeing `indicator-datetime` and indicator-stickynotes doing strange things and disappearing, I also registered failure when writing accented letters in Terminal or in my skype chat windows. (Spanish uses a lot of accents). Typically extended letter-space, meaning e, E -> é, è, ê, ë + upper cases is only covered under the UTF-8 extended format codes. THat's when I realized that LC_ALL=C negated UTF-8. I commented LC_ALL=C in my .bashrc, rebooted and everything was fine again. stickynotes functions normally and so do Skype and my terminal windows' support of extended format codes.
So in the end it appears that all the apparent corruption was due to the fact that LC_ALL=C seems to conflict with some indicator apps at `unity`'s level.
I hope this will help in preventing future problem for other users and I do thank you again for your attention and time and dedication. I am truly very happy that I can have sticky notes again as I run a thoroughly paperless operation.
Cheers,
-cedric

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#12

@umang: Thanks a lot.
In the meantime I fixed the problem late the day before yesterday.
Here is what had happened.
In an effort to have an environment consitent between different Linux OS among them two servers, I set my locale to
export LC_ALL=C
in my .bashrc
I knew I did not have to do this on the particular machine on which the problem occured with `stickynotes` because:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en_AU:en_CA:en_GB:en_NZ:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_IE.UTF-8
LC_TIME=en_IE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_IE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_IE.UTF-8
LC_NAME=en_IE.UTF-8
LC_ADDRESS=en_IE.UTF-8
LC_TELEPHONE=en_IE.UTF-8
LC_MEASUREMENT=en_IE.UTF-8
LC_IDENTIFICATION=en_IE.UTF-8

already gave me a satisfactorily compatible environment with other remote machines set to the spanish locale, BUT for the sake of clenliness I went ahead and overrode all LC_* parameters by setting LC_ALL=C.
I went back to my log book where I write down the chronology of every change I make on every system I control. I do this to ease recovery from errors as I am a near-noob still. Doing so I noticed that just at the approximate time I started seeing `indicator-datetime` and indicator-stickynotes doing strange things and disappearing, I also registered failure when writing accented letters in Terminal or in my skype chat windows. (Spanish uses a lot of accents). Typically extended letter-space, meaning e, E -> é, è, ê, ë + upper cases is only covered under the UTF-8 extended format codes. THat's when I realized that LC_ALL=C negated UTF-8. I commented LC_ALL=C in my .bashrc, rebooted and everything was fine again. stickynotes functions normally and so do Skype and my terminal windows' support of extended format codes.
So in the end it appears that all the apparent corruption was due to the fact that LC_ALL=C seems to conflict with some indicator apps at `unity`'s level.
I hope this will help in preventing future problem for other users and I do thank you again for your attention and time and dedication. I am truly very happy that I can have sticky notes again as I run a thoroughly paperless operation.
Cheers,
-cedric

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#13

PS: Perhaps making indicator-stickynotes "immune" to the local machine's locale could help toward preventing the problem. That however is outside my league altogether. Again thank you for your help and dedication.

Revision history for this message
Umang Varma (umang) said :
#14

Hi Cedric,

You're right, this has to do with the open() function in python3: https://docs.python.org/3/library/functions.html#open Specifically it says "if encoding is not specified the encoding used is platform dependent".

The latest version fixes this by specifying the encoding (of the stylesheet) as "utf-8", thus making it "immune".

It would be great if you could change your settings back to ones that were causing you a problem and check if Indicator Stickynotes still crashes. I expect that it should not crash now.

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#15

Absolutely no problem. I will report here tomorrow. Now is too late to play. Thank you for confirming. Really nice on your part.

Revision history for this message
Cedric Bhihe (cedric-bhihe) said :
#16

Hi Umang !

All good. Everything checks.

- sourced my ~/.bashrc with LC_ALL=C
- saw how my terminal ceases to be able to display extended characters such as "á", etc.
- unpacked your zipped archive https://github.com/umangv/indicator-stickynotes/archive/master.zip
- launched indicator-stickynotes.py where it ended up
- checked tha all is perfectly functional even with LC_ALL=C (i.e. non UTF-8) system locale.

Your upgrade and fix work perfectly well and thank you for providing background info with a link to the py3 library documentation. Not everybody does that.
I updated to your new rolled out version through USC.

Remarkably swift changes on your part. Thanks a lot. Really.
-ced

Revision history for this message
Umang Varma (umang) said :
#17

Thank you for checking. I'm glad it helped.