Fails to play a file with a # (hash symbol) in the path
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
John McAleely | ||
| | media-hub (Ubuntu) |
High
|
Jim Hodapp | ||
| | media-hub (Ubuntu RTM) |
High
|
Jim Hodapp | ||
| | qtubuntu-media (Ubuntu) |
High
|
Jim Hodapp | ||
| | qtubuntu-media (Ubuntu RTM) |
High
|
Jim Hodapp | ||
Bug Description
Playing a song from the music app will fail if the path contains a # symbol. The failure appears to be at the media-hub level.
Example: Try to play track under "Music/Lots of #1 hits/annoying_
What should happen: Song should play
What actually happens: Song info loads in music player screen but track does not play and duration is set to zero.
This bug has been confirmed by ahayzen on #ubuntu-touch who submitted this example log: http://
The file plays normally if the # is removed from the path.
Related branches
- Alfonso Sanchez-Beato: Approve on 2016-02-22
- PS Jenkins bot: Needs Fixing (continuous-integration) on 2016-02-22
-
Diff: 2525 lines (+1300/-1040)14 files modifiedREADME (+7/-0)
src/aal/aalmediaplayerservice.cpp (+10/-2)
src/aal/aalmediaplaylistprovider.cpp (+24/-9)
tests/integration/integration.pro (+6/-23)
tests/integration/playlists/playlists.pro (+25/-0)
tests/integration/playlists/tst_mediaplaylist.cpp (+896/-0)
tests/integration/playlists/tst_mediaplaylist.h (+110/-0)
tests/integration/tst_mediaplaylist.cpp (+0/-896)
tests/integration/tst_mediaplaylist.h (+0/-110)
tests/integration/uris/generate_test_files.sh (+25/-0)
tests/integration/uris/remove_test_files.sh (+7/-0)
tests/integration/uris/tst_mediauris.cpp (+116/-0)
tests/integration/uris/tst_mediauris.h (+51/-0)
tests/integration/uris/uris.pro (+23/-0)
- Alfonso Sanchez-Beato: Approve on 2016-02-22
- PS Jenkins bot: Approve (continuous-integration) on 2016-02-12
-
Diff: 780 lines (+429/-67)13 files modifiedinclude/core/media/player.h (+5/-0)
src/core/media/gstreamer/engine.cpp (+6/-3)
src/core/media/gstreamer/playbin.cpp (+129/-28)
src/core/media/gstreamer/playbin.h (+3/-0)
src/core/media/mpris/player.h (+8/-0)
src/core/media/player.cpp (+6/-0)
src/core/media/player_implementation.cpp (+2/-2)
src/core/media/player_skeleton.cpp (+57/-22)
src/core/media/player_stub.cpp (+2/-0)
src/core/media/track_list_implementation.cpp (+0/-1)
src/core/media/track_list_skeleton.cpp (+46/-11)
src/core/media/track_list_stub.cpp (+5/-0)
src/core/media/util/uri_check.h (+160/-0)
| Neil McPhail (njmcphail) wrote : | #1 |
| Andrew Hayzen (ahayzen) wrote : | #2 |
Thank you for taking the time to report this bug and helping to make Ubuntu better.
I can confirm that when using the package media-hub on vivid-proposed #182 mako using the steps provided by Neil that I can reproduce the bug. Therefore I have set this bug to confirmed.
| Changed in media-hub: | |
| status: | New → Confirmed |
| Jim Hodapp (jhodapp) wrote : | #3 |
This seems to be an issue with a function that gstreamer provides that checks for a valid URI. Might need to use something else to verify a valid URI since a '#' should be able to be used in a filename.
| Changed in media-hub: | |
| status: | Confirmed → Triaged |
| assignee: | nobody → Canonical Phone Foundations (canonical-phonedations-team) |
| Andrew Hayzen (ahayzen) wrote : | #4 |
We just had another duplicate (bug 1476311) of this in music, can we get a priority and/or milestone set for this?
| Changed in media-hub: | |
| status: | Triaged → Confirmed |
| James Lewis (james-fsck) wrote : | #5 |
OK, my mistake... It was always my understanding that Confirmed was after Triaged... but that seems not to be the case...
Can someone clarify this?
| Jim Hodapp (jhodapp) wrote : | #6 |
Just think logically about it. Confirmed is when two or more people have been able to reproduce the bug and triaged is when the bug supervisor has been able to reproduce it which is vital to it being able to be fixed. Triaged is more important than confirmed because the person who is going to fix it can reproduce the bug.
| Changed in media-hub: | |
| status: | Confirmed → Triaged |
| Changed in canonical-devices-system-image: | |
| status: | New → Confirmed |
| James Lewis (james-fsck) wrote : | #7 |
Yes, i read that before observing that it was a mistake.... In medicine however, if you have a lot of patients at once, triage is the first step..... Thats the source of the confusion....
| Changed in media-hub: | |
| importance: | Undecided → High |
| Andrew Hayzen (ahayzen) wrote : | #8 |
This comment I made in one of the duplicates and should probably be shown on the main bug :-)
https:/
So trying this locally with gst-launch
This works correctly
$ gst-launch-1.0 -v playbin uri=file:
But this fails
$ gst-launch-1.0 -v playbin uri="file:
Setting pipeline to PAUSED ...
/GstPlayBin:
/GstPlayBin:
/GstPlayBin:
/GstPlayBin:
/GstPlayBin:
/GstPlayBin:
/GstPlayBin:
/GstPlayBin:
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstURIDecodeBi
Additional debug info:
gstgiosrc.c(321): gst_gio_
Could not open location file://
Setting pipeline to NULL ...
Freeing pipeline ...
I suspect this latter case is occurring and either we or media-hub need to be encoding the URI correctly.
| Jim Hodapp (jhodapp) wrote : | #9 |
The issue is definitely that playbin is getting passed the raw URI, which it does not like. It seems from Andrew's comment above that it prefers a fully encoded URI which makes sense given that the playbin property's field name is "uri".
| Neil McPhail (njmcphail) wrote : | #10 |
Interestingly, the qt encode/decode functions don't seem to alter # symbols. I have been hacking the qtubuntu-media code to manually convert # symbols to "%23" all the way to the "m_hubPlayerSes
| Jim Hodapp (jhodapp) wrote : | #11 |
So you've passed what you are sure is a correctly encoded URI to AalMediaPlayerS
| Neil McPhail (njmcphail) wrote : | #12 |
My final experiment was as per the attached patch (from bzr rev 68), so I _think_ this takes care of the latest point qtmedia-ubuntu touches those uri's.
| Jim Hodapp (jhodapp) wrote : Re: [Bug 1449790] Re: Fails to play a file with a # (hash symbol) in the path | #13 |
Did you give QUrl::toEncoded a try? I think this function will accomplish
exactly what you want without needing to do specific manual encoding of the
string: http://
On Sun, Aug 16, 2015 at 3:07 PM, Neil McPhail <email address hidden> wrote:
> My final experiment was as per the attached patch (from bzr rev 68), so
> I _think_ this takes care of the latest point qtmedia-ubuntu touches
> those uri's.
>
> ** Patch added: "fromr68.diff"
>
> https:/
>
> --
> You received this bug notification because you are a member of Canonical
> Phone Foundations, which is a bug assignee.
> https:/
>
> Title:
> Fails to play a file with a # (hash symbol) in the path
>
> Status in Canonical System Image:
> Confirmed
> Status in Media Hub:
> Triaged
>
> Bug description:
> Playing a song from the music app will fail if the path contains a #
> symbol. The failure appears to be at the media-hub level.
>
> Example: Try to play track under "Music/Lots of #1
> hits/annoying_
>
> What should happen: Song should play
>
> What actually happens: Song info loads in music player screen but
> track does not play and duration is set to zero.
>
>
> This bug has been confirmed by ahayzen on #ubuntu-touch who submitted
> this example log: http://
>
> The file plays normally if the # is removed from the path.
>
> To manage notifications about this bug go to:
>
> https:/
>
| Neil McPhail (njmcphail) wrote : | #14 |
Yes, I've played with the various option for that function. I don't think any of them affect # symbols anyway, but coding the replace by hand ensures the hash symbol is replaced at the point "m_hubPlayerSes
It still doesn't work.
So something either happens to the std::string which is used to make the "const media::
Any help appreciated.
| Jim Hodapp (jhodapp) wrote : | #15 |
media-hub doesn't do a thing to the URI. media::
typedef for std::string. So that's why I'm recommending that you first know
what URI encodings will work for GStreamer via gst-launch-1.0 because then
you can be sure that you are passing the right thing to media-hub. If at
that point it still doesn't work, then perhaps something is affecting it
somewhere on its way down to playbin.
On Sun, Aug 16, 2015 at 3:38 PM, Neil McPhail <email address hidden> wrote:
> Yes, I've played with the various option for that function. I don't
> think any of them affect # symbols anyway, but coding the replace by
> hand ensures the hash symbol is replaced at the point
> "m_hubPlayerSes
>
> It still doesn't work.
>
> So something either happens to the std::string which is used to make the
> "const media::
> mangled somewhere further downstream. Chasing the code further is beyond
> my skill, as the media-hub code gets into proper C++ territory and I
> only really know C.
>
> Any help appreciated.
>
> --
> You received this bug notification because you are a member of Canonical
> Phone Foundations, which is a bug assignee.
> https:/
>
> Title:
> Fails to play a file with a # (hash symbol) in the path
>
> Status in Canonical System Image:
> Confirmed
> Status in Media Hub:
> Triaged
>
> Bug description:
> Playing a song from the music app will fail if the path contains a #
> symbol. The failure appears to be at the media-hub level.
>
> Example: Try to play track under "Music/Lots of #1
> hits/annoying_
>
> What should happen: Song should play
>
> What actually happens: Song info loads in music player screen but
> track does not play and duration is set to zero.
>
>
> This bug has been confirmed by ahayzen on #ubuntu-touch who submitted
> this example log: http://
>
> The file plays normally if the # is removed from the path.
>
> To manage notifications about this bug go to:
>
> https:/
>
| Changed in media-hub (Ubuntu): | |
| status: | New → Triaged |
| Changed in media-hub (Ubuntu RTM): | |
| status: | New → Triaged |
| no longer affects: | media-hub |
| Changed in media-hub (Ubuntu): | |
| importance: | Undecided → Low |
| Changed in media-hub (Ubuntu RTM): | |
| importance: | Undecided → Low |
| Changed in qtubuntu-media (Ubuntu): | |
| status: | New → Triaged |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| status: | New → Triaged |
| Changed in qtubuntu-media (Ubuntu): | |
| importance: | Undecided → Low |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| importance: | Undecided → Low |
| Changed in canonical-devices-system-image: | |
| importance: | Undecided → High |
| assignee: | nobody → John McAleely (john.mcaleely) |
| milestone: | none → ww08-2016 |
| Michał Sawicz (saviq) wrote : | #16 |
Related is bug #1535798, need to coordinate what are the comm points and what is expected where.
| Jim Hodapp (jhodapp) wrote : | #17 |
Bumped importance to High since this is blocking other work.
| Changed in media-hub (Ubuntu): | |
| importance: | Low → High |
| Changed in media-hub (Ubuntu RTM): | |
| importance: | Low → High |
| Changed in qtubuntu-media (Ubuntu): | |
| importance: | Low → High |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| importance: | Low → High |
| James Henstridge (jamesh) wrote : | #18 |
'#' and '?' are reserved URI characters, used as separators for the query and fragment components respectively. So a URI like "file:/
If music-app is producing URIs containing these characters but intending them to be part of the path component, then that is an error. If you want to convert between URLs and file names, Qt provides QUrl::toLocalFile and QUrl::fromLocalFile methods. These will take care of the necessary escaping. They don't seem to be exposed on the QML URL type though, so would probably need a C++ plugin to expose.
If music-app still has the URIs provided by mediascanner, they should also be well formed with correct escaping.
| Albert Astals Cid (aacid) wrote : | #19 |
James, that doesn't matter, it's just on the phone that it fails, not on the desktop, so it's obviously not QML's fault.
https:/
| Jim Hodapp (jhodapp) wrote : | #20 |
Adding a media-hub.log for reference, see: http://
| Changed in canonical-devices-system-image: | |
| status: | Confirmed → In Progress |
| Changed in media-hub (Ubuntu): | |
| status: | Triaged → In Progress |
| Changed in media-hub (Ubuntu RTM): | |
| status: | Triaged → In Progress |
| Changed in qtubuntu-media (Ubuntu): | |
| status: | Triaged → In Progress |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| status: | Triaged → In Progress |
| Changed in media-hub (Ubuntu): | |
| assignee: | nobody → Jim Hodapp (jhodapp) |
| Changed in media-hub (Ubuntu RTM): | |
| assignee: | nobody → Jim Hodapp (jhodapp) |
| Changed in qtubuntu-media (Ubuntu): | |
| assignee: | nobody → Jim Hodapp (jhodapp) |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| assignee: | nobody → Jim Hodapp (jhodapp) |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| status: | In Progress → Fix Committed |
| Changed in qtubuntu-media (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in media-hub (Ubuntu RTM): | |
| status: | In Progress → Fix Committed |
| Changed in media-hub (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Albert Astals Cid (aacid) wrote : | #21 |
Which package version of qtubuntu-media and media-hub should i be using for this to be fixed? Or alternatively which branches have the fixes?
| Changed in media-hub (Ubuntu): | |
| status: | Fix Committed → In Progress |
| Changed in media-hub (Ubuntu RTM): | |
| status: | Fix Committed → In Progress |
| Changed in qtubuntu-media (Ubuntu): | |
| status: | Fix Committed → In Progress |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| status: | Fix Committed → In Progress |
| Changed in media-hub (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in media-hub (Ubuntu RTM): | |
| status: | In Progress → Fix Committed |
| Changed in qtubuntu-media (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in qtubuntu-media (Ubuntu RTM): | |
| status: | In Progress → Fix Committed |
| Łukasz Zemczak (sil2100) wrote : | #22 |
This bug was fixed in the package qtubuntu-media 0.8.0+15.
---------------
qtubuntu-media (0.8.0+
* URI encode the URI that we call setMedia() on or add to the playlist
(LP: #1449790)
qtubuntu-media (0.8.0+
* Make sure to catch and report the exception
Insufficien
qtubuntu-media (0.8.0+
[ Andrew Hayzen ]
* Until bug 1518157 (RandomAndLoop playbackMode) is fixed set Random
to be always looping due to bug 1531296 (LP: #1531296, #1518157)
qtubuntu-media (0.8.0+
[ CI Train Bot ]
* No-change rebuild.
qtubuntu-media (0.8.0+
[ CI Train Bot ]
* No-change rebuild.
-- Jim Hodapp <email address hidden> Mon, 22 Feb 2016 19:00:10 +0000
| Changed in qtubuntu-media (Ubuntu RTM): | |
| status: | Fix Committed → Fix Released |
| Łukasz Zemczak (sil2100) wrote : | #23 |
This bug was fixed in the package media-hub 4.1.0+15.
---------------
media-hub (4.1.0+
* Make sure to interpret the incoming path as a URI which makes sure
media-hub will always be able to open the track with an encoded URI
(LP: #1449790)
media-hub (4.1.0+
[ Simon Fels ]
* Don't depend on a specific hybris version anymore.
[ Thomas Voß ]
* Adjust apparmor profile to enable flawless audio/video playback.
media-hub (4.1.0+
* Make sure that an apparmor profile_name of the format com.ubuntu.my-
app is supported as well as improve the error handling and reporting
for when a client does not have the proper apparmor permissions to
play a given media URI (LP: #1533779)
media-hub (4.1.0+
* Enable dual landings.
media-hub (4.1.0+
* Fix bug #1479036 which prevents the out_of_range exception from
causing media-hub-server from crashing when a player key is not
found (LP: #1479036)
media-hub (4.1.0+
[ Simon Fels ]
* Prevent us from leaking file descriptors and memory due to not releasing
gstreamer elements correctly.
[ Alfonso Sanchez-Beato ]
* Avoid getting additional references for audio_sink, which were not
being freed. Also, remove unneeded unrefs that must be performed in
gstreamer instead.
* Emit CanPlay, CanPause, and CanGo[Next|
[ Jim Hodapp ]
* Make sure the correct player is set as the current player controled by
MPRIS.
* Improved the can_go_next() and can_go_previous() logic to always return
true if the loop_status is currently set to loop over the entire
playlist.
[ CI Train Bot ]
* No-change rebuild.
-- Jim Hodapp <email address hidden> Mon, 22 Feb 2016 18:59:52 +0000
| Changed in media-hub (Ubuntu RTM): | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #24 |
This bug was fixed in the package media-hub - 4.1.0+16.
---------------
media-hub (4.1.0+
* Make sure to interpret the incoming path as a URI which makes sure
media-hub will always be able to open the track with an encoded URI
(LP: #1449790)
-- Jim Hodapp <email address hidden> Mon, 22 Feb 2016 18:59:52 +0000
| Changed in media-hub (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | In Progress → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #25 |
This bug was fixed in the package qtubuntu-media - 0.8.0+16.
---------------
qtubuntu-media (0.8.0+
* URI encode the URI that we call setMedia() on or add to the playlist
(LP: #1449790)
-- Jim Hodapp <email address hidden> Mon, 22 Feb 2016 19:00:10 +0000
| Changed in qtubuntu-media (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Neil McPhail (njmcphail) wrote : | #26 |
This doesn't seem to be fixed 100% in OTA10:
1) Play a track without a "#" in the path from the music app
2) Click the "Search" area in the "Songs" tab, and search for your track with a "#" in the path
3) select the track - instead of playing the new file with the "#" in the path, the original track will be restarted
| Changed in canonical-devices-system-image: | |
| status: | Fix Committed → Fix Released |
| Jim Hodapp (jhodapp) wrote : | #27 |
@Neil: Can you please give me an example or two of the filenames that still don't play? Please copy and paste them verbatim. Also, please give me the media-hub.log file located at /home/phablet/

krillin RTM release 21