[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-hardware-devel
Subject: Re: [Kde-hardware-devel] Review Request 111626: Fix Amarok crash with Audio CD inserted
From: "Mark Kretschmann" <kretschmann () kde ! org>
Date: 2013-08-16 7:18:37
Message-ID: 20130816071837.22755.87090 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111626/#review37921
-----------------------------------------------------------
What's up with this one, is it already shipped?
- Mark Kretschmann
On July 21, 2013, 12:28 p.m., Christoph Feck wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111626/
> -----------------------------------------------------------
>
> (Updated July 21, 2013, 12:28 p.m.)
>
>
> Review request for Amarok, kdelibs and Solid.
>
>
> Description
> -------
>
> https://bugs.kde.org/show_bug.cgi?id=314544#c40 says:
>
> "Looking at the backtrace, KFilePlacesItem tries to detect Audio CDs as follows:
>
> Solid::Device d = device();
> if (d.isValid()) {
> if (m_access) {
> return QUrl(KUrl(m_access->filePath()));
> } else if (m_disc && (m_disc->availableContent() & Solid::OpticalDisc::Audio)!=0) {
> QString device = d.as<Solid::Block>()->device();
> return QUrl(QString("audiocd:/?device=%1").arg(device));
> }
> }
>
> The crash happens, because d.as<Solid::Block> returns 0, in other words, Audio CDs \
> are no longer treated as block devices.
> Failure of said cast can be easily detected, but the question is rather, if it's \
> not a Solid bug, how the code needs to be modified to correctly get the audiocd:/ \
> URL for the block device."
> While I did not yet figure out, how I can get the block device URL for a disc in \
> case block is 0, I propose this temporary fix. It should fix the crash, but could \
> fail to correctly invoke the audiocd:/ kio with multiple disc drives.
>
> This addresses bug 314544.
> http://bugs.kde.org/show_bug.cgi?id=314544
>
>
> Diffs
> -----
>
> kfile/kfileplacesitem.cpp 5a12486
>
> Diff: http://git.reviewboard.kde.org/r/111626/diff/
>
>
> Testing
> -------
>
> I could not test, my system has no disc drives.
>
>
> Thanks,
>
> Christoph Feck
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/111626/">http://git.reviewboard.kde.org/r/111626/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What's up with this \
one, is it already shipped?</pre> <br />
<p>- Mark</p>
<br />
<p>On July 21st, 2013, 12:28 p.m. UTC, Christoph Feck wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Amarok, kdelibs and Solid.</div>
<div>By Christoph Feck.</div>
<p style="color: grey;"><i>Updated July 21, 2013, 12:28 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">https://bugs.kde.org/show_bug.cgi?id=314544#c40 says:
"Looking at the backtrace, KFilePlacesItem tries to detect Audio CDs as follows:
Solid::Device d = device();
if (d.isValid()) {
if (m_access) {
return QUrl(KUrl(m_access->filePath()));
} else if (m_disc && (m_disc->availableContent() & \
Solid::OpticalDisc::Audio)!=0) { QString device = \
d.as<Solid::Block>()->device();
return QUrl(QString("audiocd:/?device=%1").arg(device));
}
}
The crash happens, because d.as<Solid::Block> returns 0, in other words, Audio \
CDs are no longer treated as block devices.
Failure of said cast can be easily detected, but the question is rather, if it's \
not a Solid bug, how the code needs to be modified to correctly get the audiocd:/ URL \
for the block device."
While I did not yet figure out, how I can get the block device URL for a disc in case \
block is 0, I propose this temporary fix. It should fix the crash, but could fail to \
correctly invoke the audiocd:/ kio with multiple disc drives.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I could not test, my system has no disc drives.</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=314544">314544</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kfile/kfileplacesitem.cpp <span style="color: grey">(5a12486)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111626/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic