segfault if .desktop file is not installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Messaging Menu |
Fix Released
|
High
|
Lars Karlitski | |
| indicator-messages (Ubuntu) |
High
|
Unassigned |
Bug Description
If the application's .desktop file isn't install, it will crash after creating a MessagingMenu.App object. This simple Vala program demonstrates this:
void main(string[] args) {
Gtk.init(ref args);
MessagingMe
app.register();
Gtk.main();
}
To compile:
$ valac --pkg=gtk+-3.0 --pkg=Messaging
(GTK may not be strictly required to repro this bug.)
At a minimum, I wouldn't expect the application to crash in this situation.
What would be *better* is if the caller could supply a path to a .desktop file rather than MessagingMenu expect to find it in /usr/share/
Related branches
- jenkins (community): Needs Fixing (continuous-integration) on 2012-10-02
- Charles Kerr (community): Approve on 2012-10-02
-
Diff: 62 lines (+14/-3)1 file modifiedlibmessaging-menu/messaging-menu.c (+14/-3)
Jim Nelson (yorba-jim) wrote : | #1 |
Changed in indicator-messages: | |
milestone: | none → 12.10.4 |
assignee: | nobody → Lars Uebernickel (larsu) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in indicator-messages: | |
status: | In Progress → Fix Committed |
Changed in indicator-messages: | |
status: | Fix Committed → Fix Released |
Changed in indicator-messages (Ubuntu): | |
importance: | Undecided → High |
status: | Triaged → Fix Committed |
Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package indicator-messages - 12.10.4-0ubuntu1
---------------
indicator-messages (12.10.4-0ubuntu1) quantal; urgency=low
* New upstream release:
- don't segfault if .desktop file is not installed (lp: #1058386)
- Use fallback icon names (without status emblems).
(lp: #1056595)
-- Sebastien Bacher <email address hidden> Tue, 02 Oct 2012 23:20:19 +0200
Changed in indicator-messages (Ubuntu): | |
status: | Fix Committed → Fix Released |
Hi Jim, thanks for reporting the crash. The attached branch fixes the issue.
I disagree on allowing to pass desktop filenames. The messaging menu uses g_desktop_ app_info_ new, which follows the XDG spec for desktop files. This is useful for distributors and users to override desktop files.
Passing paths directly can also be misused easily: only correctly installed applications should ever be shown in the messaging menu, so that users can find the same application in the dash.
> We like to be able to build, run, and test our apps from the build directory.
Easiest would be to copy the desktop file into ~/.local/ share/applicati ons/ temporarily. Alternatively, you could restart indicator- messages- service with XDG_DATA_DIRS set to the source path of your application.