SDK not able to provide further hint about missing apparmor policy

Bug #1362028 reported by XiaoGuo, Liu
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qtcreator-plugin-ubuntu (Ubuntu)
Fix Released
Wishlist
Benjamin Zeller

Bug Description

As miss the "audio" policy in the apparmor file. However, the output window produces the indirect error message instead of printing "missing audio policy" kind of error. Attached please find the error message:
============================
        MediaPlayer {
            id: player
            source: "sounds/blast.wav"
        }
============================
virtual void AalMediaPlayerControl::play()
virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const
Cannot start playback without a valid media-hub player session
Cannot get current playback position without a valid media-hub player session
...

This kind of problem happens to the rest of the APIs as well. If we cannot output the correct clear information like "missing audio security policy", a developer has to spend a lot of time in figuring out what could be wrong. Sometimes, a developer may be misled to troubleshoot API usage instead of adding the correct security policies.

Tags: univ-train

Related branches

Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :
Zoltan Balogh (bzoltan)
Changed in qtcreator-plugin-ubuntu:
status: New → Invalid
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The application is doing the right thing-- it is simply responding to what the kernel/dbus is doing, which is blocking access to media-hub. The SDK could look at /var/log/syslog for apparmor denials and display them to the user which could be helpful. Documentation could also help in this regard.

Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

I do not think a developer needs to open a terminal to check the syslog file, which is not practical. The error messages should be intuitive to developer to follow the right action.

Revision history for this message
Rex Tsai (chihchun) wrote :

A feature wish list would be qtcreator should recommand the developer to add `audio' policy group, if the developer added MediaPlayer or called QtMultimedia. Or check policy groups are added correctly from click-check-lint.

summary: - SDK output window produces the wrong error messages
+ SDK not able to provide further hint about missing apparmor policy
description: updated
tags: added: univ-train
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

The feature request is certainly valid to add some helpful checks at some level. I like the suggestion in comment #6 to queue the developer based on calls they may have used that imply need for a permission. The first step might be documentation providing that mapping and then automation of a check.

Changed in qtcreator-plugin-ubuntu:
assignee: nobody → Benjamin Zeller (zeller-benjamin)
importance: Undecided → Wishlist
status: Invalid → New
description: updated
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

I'm going to go with jdstrand's suggestion and show the syslog output on stderr, which shows up as red text in the application output.

Changed in qtcreator-plugin-ubuntu:
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtcreator-plugin-ubuntu - 3.1.1+15.10.20150616-0ubuntu1

---------------
qtcreator-plugin-ubuntu (3.1.1+15.10.20150616-0ubuntu1) wily; urgency=medium

  [ Benjamin Zeller ]
  * Fix Bug lp:1362028 "SDK not able to provide further hint about
    missing apparmor policy" (LP: #1362028)
  * Fix Bug lp:1455566 "ubuntu sdk references obsolete system-image
    channel names" (LP: #1455566)
  * Fix bug lp:1456627 "Almost unusuable while non-Ubuntu device
    connected through adb" (LP: #1456627)

  [ Marcus Tomlinson ]
  * Split scope template into "14.10" and "Current" variations (LP:
    #1464108)

  [ Nicholas Skaggs ]
  * Update qml based templates to best practicies

  [ Niklas Wenzel ]
  * Allow parallel builds using "dpkg-buildpackage -jN", reducing build
    time on multi-core CPUs (LP: #1465018)
  * Fix building translations (LP: #1257313)

  [ nskaggs ]
  * Update qml based templates to best practicies

 -- CI Train Bot <email address hidden> Tue, 16 Jun 2015 14:48:19 +0000

Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → Fix Released
Changed in qtcreator-plugin-ubuntu:
status: In Progress → Fix Released
Zoltan Balogh (bzoltan)
no longer affects: qtcreator-plugin-ubuntu
Changed in qtcreator-plugin-ubuntu (Ubuntu):
importance: Undecided → Wishlist
assignee: nobody → Benjamin Zeller (zeller-benjamin)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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