When I run "mtp-delfile -f Halloween.m3u", it crashes. Backtrace: #0 0x08048a28 in parse_path (path=0xbfdfeb60 "Halloween.m3u") at delfile.c:45 #1 0x08048d46 in main (argc=3, argv=0xbfdfdf84) at delfile.c:120 The code is: int len = strlen(strrchr(path,'/')); But the path doesn't contain a '/'. (And why should it? I got the filename from the output of "mtp-files": File ID: 393218 Filename: Halloween.m3u File size 2069 (0x00000815) bytes Parent ID: 393216 Filetype: Undefined filetype which doesn't have any paths.) emerge --info: Portage 2.1.1-r1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo i686) ================================================================= System uname: 2.6.18-gentoo i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.12.5 Last Sync: Mon, 30 Oct 2006 21:00:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=athlon-xp -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.noved.org/" LC_ALL="en_US.UTF-8" LINGUAS="en uk ru" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X aac aalib acl acpi aim alsa apache2 asf audiofile bcmath bitmap-fonts browserplugin bzip2 cairo cdparanoia cli cracklib crypt css cups curl dbus dga directfb divx4linux dlloader dri dvd dvdr elibc_glibc emboss encode fam fbcon fbsplash ffmpeg flash foomaticdb gdbm gif glitz glut gpm gstreamer gtk gtk2 hal iconv icq idn imlib input_devices_keyboard input_devices_mouse ipv6 isdnlog javascript jikes jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kernel_linux lcms lesstif libg++ libwww linguas_en linguas_ru linguas_uk live lm_sensors logitech-mouse mad mikmod mmx mng mp3 mpeg mplayer msn mtp musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg openexr opengl oscar pam pcre pdf pic png povray ppds pppd qt3 qt4 quicktime rdesktop readline reflection rtc samba scanner sdl session sftplogging slp snmp speex spell spl sse ssl startup-notification subversion svg sysfs tcpd tetex theora tiff timidity truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_ati video_cards_radeon vorbis wifi win32codecs xcomposite xine xinerama xml xorg xscreensaver xv xvid yahoo zeroconf zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Sending to herd wrt Bug 122588
*** Bug 157620 has been marked as a duplicate of this bug. ***
Judging by the date on this, odds are it has been addressed upstream and will be fixed by bug 159056. I'll poke this bug again when libmtp-0.1.2 lands in portage and we will see if it is resolved or not.
The ebuild posted in bug 159056 doesn't solve the crash. It may be a gcc-related problem. I'm re-emerging GCC 3.4 and will report my results.
It crashes with GCC 3.4.6 too, even with empty CFLAGS and CXXFLAGS.
A "gcc-related problem"? You're kidding me... I posted the exact line that causes a crash: int len = strlen(strrchr(path,'/')); "path" doesn't contain a "/", so strrchr returns NULL, and strlen crashes. It's as simple as that.
If you read the bug I reported, and I got marked as a duplicate of this one, you'll see what I mean. And if you read the comment I wrote just before yours, you'll see I discarded any GCC misbehaviour.
I did an emerge -e libmtp and it didn't solve my problems. I tested two old versions that used to work: 0.0.16 and 0.0.12, and now they don't work anymore. So, it may be libusb or kernel related...
Could you please see whether this is resolved with libmtp 0.1.5 please? Apologies for the stalled bug, it appears Gentoo developers haven't had access to suitable test hardware for quite a while.