Bug 485627
Summary: | libmtp 0.3.6-1.fc10 = segmentation fault + crash of Gnomad2, Amarok, etc. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | nicofo <nicofo> | ||||
Component: | libmtp | Assignee: | Linus Walleij <triad> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 10 | CC: | rdieter, triad | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-03-08 13:32:33 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
nicofo
2009-02-15 14:51:53 UTC
(In reply to comment #0) > Remark: perhaps is it related to the bug #478774 Sorry, I meant bug #478474 Can you produce a GDB backtrace? Like > gdb gnomad2 > run .... crash ... > bt So we can see something about where it gave up? I have libmtp 0.3.6 running on this machine (x86_64 tho) and no problem in running any of the apps so cannot reproduce the problem :-/ [linus@fecusia ~]$ gnomad2 Queried Creative Zen Micro [linus@fecusia ~]$ [no crash] I wonder if it only occurs on the iRiver T10 and possibly other iRivers and what may be causing that... Created attachment 332462 [details]
gdb traces with gnomad2 => Shows the Segmentation Fault
Hello,
here is your "gdb" traces. (I'm not used to using gdb => if it's not complete or if you want more info, just ask me)
Add. info: my T10 is a Samsung YP-T10 (not an iRiver)
Excellent! I think I can see the bug anyway. YP-T10 supports Ogg files, so the bug should be here in libmtp.c: if (track->filetype == LIBMTP_FILETYPE_UNKNOWN && (FLAG_IRIVER_OGG_ALZHEIMER(ptp_usb) || FLAG_OGG_IS_UNKNOWN(ptp_usb))) { // Repair forgotten OGG filetype char *ptype; ptype = strrchr(track->filename,'.')+1; if (ptype != NULL && !strcasecmp (ptype, "ogg")) { // Fix it. track->filetype = LIBMTP_FILETYPE_OGG; } else { // This was not an OGG file so discard it and continue LIBMTP_destroy_track_t(track); continue; } } That strrchr() is not enough here, especially if track->filename is NULL. I think the reason to why you see this error is that you have unknown files on the device with NULL names, which are investigated to see if they are OGG files and then it crashes. Fixed like this: if (track->filetype == LIBMTP_FILETYPE_UNKNOWN && track->filename != NULL && (FLAG_IRIVER_OGG_ALZHEIMER(ptp_usb) || FLAG_OGG_IS_UNKNOWN(ptp_usb))) { // Repair forgotten OGG filetype int namelen = strlen(track->filename); if (namelen < 4)) { // Must be atleast 4 characters to end with ".ogg" LIBMTP_destroy_track_t(track); continue; } if (!strcasecmp(track->filename+namelen-4, ".ogg")) { // Fix the filetype track->filetype = LIBMTP_FILETYPE_OGG; } else { // This was not an OGG file so discard it and continue LIBMTP_destroy_track_t(track); continue; } } Fixed in libmtp upstream, just need to get a fix out to Bodhi, hold on. OK, thank you for your rapid reaction ! I'll wait for the update and keep you up to date. In fact, concerning the ogg files, is it norwal that I don't see them in my device (they aren't not listed using libmtp) though they are well present on the device ? : => I can transfer ogg files from my computer to my Samsung YP-T10 without any problem using for instance amarok or gnomad2 (the ogg are well transfered on the device - I can listen to them: OK) => BUT amarok or gnomad2, ... don't show them: they only list the mp3 files that are on the device, not the ogg. (Should I open another bug for this ?) Hello, I have tried the last version of libmtp (compiled from cvs today): OK, it works: thanks ! (concerning the problem of the ogg files not seen by libmtp (see previous comment), I have opened the bug #489176) |