unity-place-applications.menu has double-hyphen in XML comment, causing "cxmenu:error: unable to parse '/etc/xdg/menus/unity-place-applications.menu': Invalid string in comment field [Ln: 157, Col: 8]"

Bug #772152 reported by Daniel Holbert
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Low
Mikkel Kamstrup Erlandsen
unity-lens-applications
Fix Released
Low
Mikkel Kamstrup Erlandsen
unity (Ubuntu)
Fix Released
Undecided
Unassigned
Natty
Won't Fix
Undecided
Unassigned
unity-place-applications (Ubuntu)
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Unassigned

Bug Description

Install unity-place-applications 0.2.46-0ubuntu3.1 from natty-proposed. Then logout and login again in the session.
Check that the output is sane now (see below for the steps)

STEPS TO REPRODUCE:
 1. Obtain an .deb for some crossover product. e.g. here's the demo for crossover-games: (32 and 64 bit)
http://media.codeweavers.com/pub/crossover/cxgames/demo/crossover-games-demo_10.1.0-1_i386.deb
http://media.codeweavers.com/pub/crossover/cxgames/demo/ia32-crossover-games-demo_10.1.0-1_amd64.deb

 2. Install the .deb with dpkg:
      sudo dpkg -i crossover-games-demo_10.1.0-1_i386.deb

ACTUAL RESULTS: This output:
Selecting previously deselected package crossover-games-demo.
(Reading database ... 166164 files and directories currently installed.)
Unpacking crossover-games-demo (from crossover-games-demo_10.1.0-1_i386.deb) ...
Setting up crossover-games-demo (10.1.0-1) ...
cxmenu:error: unable to parse '/etc/xdg/menus/unity-place-applications.menu': Invalid string in comment field [Ln: 157, Col: 8]
Processing triggers for menu ...

EXPECTED RESULTS: No "cxmenu:error" line for unity-place-applications.menu.

From hand-tweaking unity-place-applications.menu, I've discovered it's due to this chunk of the file:
  <!-- Note: Software Center uses an OnlyUnallocated clause to generate
    -- the System section. We can't do that because we have the All Apps
    -- section. Let's cross fingers and hope we match somewhat
    -->

Those stray "--" markers are bad XML*, and if I remove them, this issue goes away. (crossover products install without any such warning.)

*From https://developer.mozilla.org/en/The_Importance_of_Correct_HTML_Commenting#XML :
     For compatibility, the string "--" (double-hyphen) must not occur within comments.

Related branches

Revision history for this message
Daniel Holbert (dholbert) wrote :

Here's a patch. When I cd to "/" and apply this with "patch -p1", it fixes the problem for me.

(Please advise on how best to get this patch reviewed / committed - I'm not familiar with the process here.)

Revision history for this message
Daniel Holbert (dholbert) wrote :

(I hit this bug in Ubuntu 11.04 Natty, installed from the beta2 release and updated all the way, btw.)

description: updated
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@kamstrup: seems easy enough to fit that into a SRU. Can you have a look please?
Thanks!

Thanks Daniel for the bug report and the patch ;)

tags: added: patch
Changed in unity:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Low
milestone: none → 3.8.14
status: New → In Progress
Changed in unity-place-applications:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Low
milestone: none → 0.2.48
status: New → In Progress
Changed in unity:
status: In Progress → Fix Committed
Changed in unity-place-applications:
status: In Progress → Fix Committed
Changed in unity-place-applications (Ubuntu):
status: New → Fix Committed
Revision history for this message
Nate Moore (putermd) wrote :

Tried running the patch, and it just sat there for 10min. No disk activity.

Re-looked at the file, and still can't figure out why it'd be just sitting there.

Revision history for this message
Daniel Holbert (dholbert) wrote :

Nate: You're probably applying the patch wrong. If you don't feed anything to the patch program, it just sits there doing nothing.

Supposing you'd downloaded it to your Desktop as "unity-xml-comment-fix.patch", you'd apply the patch as follows:
  cd /
  sudo patch -p1 < $HOME/Desktop/unity-xml-comment-fix.patch

That should complete pretty much instantly.

Honestly, though, I wouldn't worry about it :) I don't think this bug actually causes any problems, and I imagine the fix will be shipped as an update in the not-too-distant future. (It's already been committed upstream.)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

bad bug number, pasting manually:

unity-place-applications (0.2.46-0ubuntu4) oneiric; urgency=low

  * Cherry-pick some fixes:
    - Allow the Core category to be included under All Applications (and hence
      show up in Dash searches as well). This means that one can now find Help,
      Home Folder, Computer, and Network. The ommision of this xdg category was
      probably a relic of our netbook launcher past (LP: #758042)
    - Fix illegal XML in unity-place-applications.menu.in. xmllint is happy now.
      Patch courtesy Daniel Holbert (LP: #772152)
    - trim the alt + F2 command line (LP: #767750)
    - ensure we are matching files as files (no space in the command). This
      enables to launch gvim rrr:rrr.txt which is matched (LP: #776731)

Changed in unity:
status: Fix Committed → Fix Released
Changed in unity-place-applications:
status: Fix Committed → Fix Released
Changed in unity-place-applications (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted unity-place-applications into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in unity-place-applications (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've tested the proposed package and it behaves correctly now, the package can be installed without any issues, marking this as verification-done; Thanks all.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-place-applications - 0.2.46-0ubuntu3.1

---------------
unity-place-applications (0.2.46-0ubuntu3.1) natty-proposed; urgency=low

  * Cherry-pick some fixes:
    - Allow the Core category to be included under All Applications (and hence
      show up in Dash searches as well). This means that one can now find Help,
      Home Folder, Computer, and Network. The ommision of this xdg category was
      probably a relic of our netbook launcher past (LP: #758042)
    - Fix illegal XML in unity-place-applications.menu.in. xmllint is happy now.
      Patch courtesy Daniel Holbert (LP: #772152)
    - trim the alt + F2 command line (LP: #767750)
    - ensure we are matching files as files (no space in the command). This
      enables to launch gvim rrr:rrr.txt which is matched (LP: #776731)
 -- Didier Roche <email address hidden> Thu, 26 May 2011 15:25:53 +0200

Changed in unity-place-applications (Ubuntu Natty):
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

natty has seen the end of its life and is no longer receiving any updates. Marking the natty task for this ticket as "Won't Fix".

Changed in unity (Ubuntu Natty):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

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