Bug 8111 - Catorise creates issues for dbus-activate apps (phone, messaging ui, etc ..)
: Catorise creates issues for dbus-activate apps (phone, messaging ui, etc ..)
Status: NEW
Product: Catorise
General
: 0.0.2
: All Maemo
: Unspecified major with 1 vote (vote)
: ---
Assigned To: Andrew Flegg
: general
:
:
:
: 8328
  Show dependency tree
 
Reported: 2010-01-16 09:49 UTC by Michael
Modified: 2014-03-08 11:37 UTC (History)
2 users (show)

See Also:


Attachments
Phone launch screenshot (17.38 KB, image/png)
2010-01-16 09:50 UTC, Michael
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Michael (reporter) 2010-01-16 09:49:49 UTC
SOFTWARE VERSION:
(Settings > General > About product)
Maemo Version: 2.2009.51-1.002
Catorise version: 0.0.1 - 0.0.3

EXACT STEPS LEADING TO PROBLEM: 
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Install catorise
2. launch phone app using a shortcut over and over.
3. See the phone launch window, but the actual phone does not show.
4. Wait till the window closes.
5. Launch again.... phone launches ok

EXPECTED OUTCOME:
Phone launches should end up with phone launching everytime.

ACTUAL OUTCOME:
Phone launches only ever other time.
When it does not launch, you get a window (see screenshot) but the phone
actually does not launch. 
The open window will take some time to close automatically before you can
successfully launch the phone again.

Workaround:
open terminal and run:
/etc/init.d/hildon-desktop stop; sleep 10; /etc/init.d/hildon-desktop start

After that dbus opened apps launch everytime.

REPRODUCIBILITY:
always if you follow instructions.

OTHER COMMENTS:
Phone rebooting does not work even though that starts up hildon-desktop
properly.
You still have to do the workaround before it works.

My feeling is that the initial parsing of the catorise generated menu by
hildon-desktop produces parsing errors that messes up something up. Not sure
how to confirm that. I'll try to research this farther.

By comparison, I have tried a couple version of MyMenu does not have this
problem.
Comment 1 Michael (reporter) 2010-01-16 09:50:18 UTC
Created an attachment (id=2008) [details]
Phone launch screenshot
Comment 2 Andrew Flegg maemo.org 2010-01-16 11:08:37 UTC
Interesting. Workaround: press power button and select "Phone"; however the
device will then stay in portrait mode.

I'm not sure about your hypothesis. During development I managed to have an
invalid hildon.menu file and you just get "(no applications)". Similarly, if
you point to files which aren't present (in the menu definition) hildon-desktop
properly crashes.
Comment 3 Michael (reporter) 2010-01-16 12:01:36 UTC
So I did some extensive testing, tested a large number of apps and looked over
every .desktop file:

Here is my current theory:
All the apps that have
 * duplicate entries menu entries (i.e exist in All and in a specific category) 
 * with X-Maemo-Prestarted=always in .desktop file

So basically those apps that run in the background and get brought forward by
secondary launches.

This definitely happens when the app is launched from either the category or
from a desktop shortcut.

It's interesting to note that when launched from "All" category it always
launches for me ... but maybe that due to the fact that it take a few seconds
to get to that app.

Disabling either "All" category or the menu item in a specific category fixes
this. I am not sure what this has if anything has to do with the earlier work
around of restarting hildon-desktop.

I mentioned earlier that MyMenu did not have this issue, but I believe it also
does not have duplicate entries.
Comment 4 Andrew Flegg maemo.org 2010-01-16 12:57:14 UTC
Thanks for the analysis. As you'll have noticed, there isn't an explicit entry
for "Phone" in "All", it just uses "<Include><All/></Include>".

hildon-desktop developer marcoil offers to help here:
http://talk.maemo.org/showpost.php?p=473671&postcount=278 - I'll send an email
to maemo-developers and make sure he's aware of it.
Comment 5 Andrew Flegg maemo.org 2010-01-16 14:09:00 UTC
Having added <Exclude><Filename>rtcom-call-ui.desktop</Filename></Exclude> to
the "all" menu in /etc/xdg/menus/hildon.menu, the Phone app no longer presents
odd behaviour.

However, according to a grep of /usr/share/applications/hildon/*.desktop, the
following apps should be affected:
  * browser.desktop
  * calendar.desktop
  * image-viewer.desktop
  * mediaplayer.desktop
  * modest.desktop
  * osso-addressbook.desktop
  * rtcom-call-ui.desktop
  * rtcom-messaging-ui.desktop
  * worldclock.desktop

The only icon I've had a problem with, though, is Phone. This is the only one
which also has "X-Maemo-Prestarted-Ignore-Load=true", and is the only one which
rotates into portrait on start (on my device).
Comment 6 Andrew Flegg maemo.org 2010-01-16 14:19:57 UTC
Hmm, no - I can now reproduce it. But, to clarify, it has to be via a desktop
shortcut; not via either of the icons in the Catorised menu.

I will probably push a 0.0.5 which, as an interim fix, excludes
X-Maemo-Prestarted items from "All".
Comment 7 Andrew Flegg maemo.org 2010-01-16 15:46:40 UTC
0.0.5 is now in Extras-devel, with the workaround mentioned in comment #6
(X-Maemo-Prestarted items are excluded from "All").
Comment 8 Andrew Flegg maemo.org 2010-01-16 16:10:46 UTC
Reducing severity since there's now a workaround in-place.
Comment 9 Michael (reporter) 2010-01-16 21:01:48 UTC
(In reply to comment #6)
> Hmm, no - I can now reproduce it. But, to clarify, it has to be via a desktop
> shortcut; not via either of the icons in the Catorised menu.

Just to clarify. It was also happening for me when I launched it when I was
launching from categories too (but not from ALL)

> 
> I will probably push a 0.0.5 which, as an interim fix, excludes
> X-Maemo-Prestarted items from "All".
> 

Just a thought.
How about removing All category and having an additional "Uncategorised"
category for those icons who caterise could not determine a category for.
Comment 10 Andrew Flegg maemo.org 2010-01-18 11:49:49 UTC
(In reply to comment #9)
>
> How about removing All category and having an additional "Uncategorised"
> category for those icons who caterise could not determine a category for.

They go in "Other" already.
Comment 11 Eero Tamminen nokia 2010-02-09 13:10:10 UTC
(In reply to comment #5)
> The only icon I've had a problem with, though, is Phone. This is the only one
> which also has "X-Maemo-Prestarted-Ignore-Load=true",

This setting will pre-restart the application on exit even if system has load,
other prestarted apps are pre-started only if system load is low enough (below
0.5 I think).  Phone is critical functionality so it has this setting, nothing
else should be using it.

If system is running low on memory, then pre-started apps are killed (all I
think).
Comment 12 Andrew Flegg maemo.org 2010-02-09 13:32:35 UTC
I think this should now be moved to hildon-desktop as X-Maemo-Prestarted=always
.desktops must have EXACTLY one occurrence in the menu to work properly.

If they have zero occurrences, shortcuts on the desktop won't work at all;
If they have more than one, you get the problem described here.
Comment 13 Eero Tamminen nokia 2010-02-09 14:27:15 UTC
(In reply to comment #12)
> I think this should now be moved to hildon-desktop as X-Maemo-Prestarted=always
> .desktops must have EXACTLY one occurrence in the menu to work properly.
> 
> If they have zero occurrences, shortcuts on the desktop won't work at all;

This issue could be in the applications implementing pre-starting support
themselves (they need 2 separate D-BUS messages to come up instead of one). 
Does this particular issue happen with all the pre-startable apps?


> If they have more than one, you get the problem described here.
Comment 14 Andrew Flegg maemo.org 2010-02-09 15:05:52 UTC
(In reply to comment #13)
> 
> This issue could be in the applications implementing pre-starting support
> themselves (they need 2 separate D-BUS messages to come up instead of one). 
> Does this particular issue happen with all the pre-startable apps?

I saw it with Phone, Contacts and Calendar.

I can probably produce a trivial /etc/xdg/menus/hildon.menu which demonstrates
the problem.
Comment 15 Todor Tsankov 2010-03-07 22:29:42 UTC
Hi,
using the patch from this bug:
https://bugs.maemo.org/show_bug.cgi?id=9418
and further stripping the workaround (for this bug) that creates the
catorise-*.desktop custom files - I was able go have a working menu+apps. But
the rule for only one occurrence in the menu of those specific packages still
applies.