Add singleton check to Chinese-calendar

Bug #1227147 reported by Aron Xu
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Chinese-calendar
Fix Released
High
Shine Huang
Ubuntu Kylin
Fix Released
High
Jack Yu
chinese-calendar (Ubuntu)
Fix Released
Undecided
Aron Xu

Bug Description

When logging into the desktop environment, it appears two instances are started and this is not the desired behavior:

aron@aron-v4400u> ps aux | grep chinese-calendar
aron 2078 0.1 0.9 687756 34956 ? Sl 21:49 0:00 /usr/bin/chinese-calendar
aron 2147 0.1 0.9 687776 34968 ? Sl 21:49 0:00 /usr/bin/chinese-calendar
aron 2988 0.0 0.0 13660 960 pts/0 S+ 21:57 0:00 grep -I --color=auto chinese-calendar

Attached is a screenshot showing two calendar icons in the indicator.

Tags: iso-testing
Revision history for this message
Aron Xu (happyaron) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in chinese-calendar (Ubuntu):
status: New → Confirmed
Revision history for this message
Jack Yu (jackyu) wrote :

Yes, it dose exist. While when installed as default in UbuntuKylin, it's OK. Hope to fix it with a patch.

Changed in chinese-calendar:
importance: Undecided → High
assignee: nobody → Shine Huang (shine)
Revision history for this message
mutse (mutse-young) wrote : Re: [Ubuntukylin-members] [Bug 1227147] Re: Starts two instances when log in to the desktop

But in my branch, there is no this problem in V0.8.0.

2013/9/18 Jack Yu <email address hidden>

> ** Also affects: chinese-calendar
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of
> UbuntuKylin Members, which is subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1227147
>
> Title:
> Starts two instances when log in to the desktop
>
> Status in Chinese calendar:
> New
> Status in “chinese-calendar” package in Ubuntu:
> Confirmed
>
> Bug description:
> When logging into the desktop environment, it appears two instances
> are started and this is not the desired behavior:
>
> aron@aron-v4400u> ps aux | grep chinese-calendar
> aron 2078 0.1 0.9 687756 34956 ? Sl 21:49 0:00
> /usr/bin/chinese-calendar
> aron 2147 0.1 0.9 687776 34968 ? Sl 21:49 0:00
> /usr/bin/chinese-calendar
> aron 2988 0.0 0.0 13660 960 pts/0 S+ 21:57 0:00 grep -I
> --color=auto chinese-calendar
>
> Attached is a screenshot showing two calendar icons in the indicator.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/chinese-calendar/+bug/1227147/+subscriptions
>
> --
> Mailing list: https://launchpad.net/~ubuntukylin-members
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~ubuntukylin-members
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Shine Huang (shine) wrote : Re: Starts two instances when log in to the desktop

这个是安装脚本没有判断覆盖安装造成的。
当覆盖安装时,启动脚本会重复写入系统配置文件中,安装几次就会有几条。

Revision history for this message
Aron Xu (happyaron) wrote :

Shall we use libunique to avoid multiple instance problem?

Revision history for this message
Shine Huang (shine) wrote :

libunique is a good idea : )

Changed in chinese-calendar:
status: New → Triaged
Revision history for this message
jiaowen520li (jiaowen520li) wrote :

使用命令 “update-manager -d -c” 升级的UK13.10系统中,也出现了!任务栏出现两个农历图标,重启后仍然是两个,并且都能用!

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1227147

tags: added: iso-testing
Aron Xu (happyaron)
Changed in ubuntukylin:
importance: Undecided → High
milestone: none → trusty-alpha1
status: New → Triaged
Jack Yu (jackyu)
Changed in ubuntukylin:
assignee: nobody → Jack Yu (jackyu)
Changed in chinese-calendar:
milestone: none → 0.8.1
Revision history for this message
Joey Zheng (jzheng) wrote :

It is also necessary to have a check for running status as it does not make sense to start the application again if it is already running in background. The worse consequence will be that we will get lots of chinese-calender running in background when we try to run it from applications several times.

Shine Huang (shine)
Changed in chinese-calendar (Ubuntu):
assignee: nobody → Shine Huang (shine)
Revision history for this message
Shine Huang (shine) wrote :

在新版本的chinese-calendar中,已经修改了开机启动的实现逻辑,在今后的版本中不会再出现这个问题了,从测试结果来看,仅会发生在从0.7版本升级到0.8版本的情况中,这个bug可以关闭了。
相比之下,可以在下个版本中加入单例判断,以确保重复执行时会出现多个chinese-calendar进程。

Changed in chinese-calendar:
status: Triaged → Invalid
Changed in ubuntukylin:
status: Triaged → Invalid
Changed in chinese-calendar (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Shine Huang (shine) wrote :

已经将bug改成了,增加chinese-calendar的单例启动判断

summary: - Starts two instances when log in to the desktop
+ Add singleton check to Chinese-calendar
Changed in chinese-calendar:
status: Invalid → Triaged
Changed in chinese-calendar (Ubuntu):
status: Invalid → Confirmed
Changed in ubuntukylin:
milestone: trusty-alpha1 → trusty-alpha2
status: Invalid → Triaged
Revision history for this message
Shine Huang (shine) wrote :

已经在0.8.1中实现,稍后release

Shine Huang (shine)
Changed in chinese-calendar (Ubuntu):
status: Confirmed → Fix Committed
Changed in ubuntukylin:
status: Triaged → Fix Committed
Changed in chinese-calendar:
status: Triaged → Fix Released
Aron Xu (happyaron)
Changed in chinese-calendar (Ubuntu):
assignee: Shine Huang (shine) → Aron Xu (happyaron)
status: Fix Committed → In Progress
Aron Xu (happyaron)
Changed in chinese-calendar (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package chinese-calendar - 0.8.1-0ubuntu1

---------------
chinese-calendar (0.8.1-0ubuntu1) trusty; urgency=low

  * New upstream release
    - Add singleton check (LP: #1227147)
    - Improved background image rendering (LP: #1233937)
  * debian/control:
    - Update Uploaders.
    - Bump std-ver: 3.9.4 -> 3.9.5, no change required.
  * debian/patches/update-version-info.patch:
    - Update version info for 0.8.1 (LP: #1279219)
 -- Aron Xu <email address hidden> Thu, 20 Feb 2014 15:49:58 +0800

Changed in chinese-calendar (Ubuntu):
status: Fix Committed → Fix Released
Jack Yu (jackyu)
Changed in ubuntukylin:
status: Fix Committed → 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.