Summary: | Canon EOS 400D, no thumbnails displayed then digikam segfaults | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Mark Ovens <parish> |
Component: | Import-IconView | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | marcus, vic |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | FreeBSD Ports | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | 0.9.4 | |
Sentry Crash Report: |
Description
Mark Ovens
2008-01-22 23:13:12 UTC
Marcus, What do you think about this report ? Gilles Comments posted in the mailing list thread show that this works on Linux so it appears to be a FreeBSD-specific issue. I'll post on the FreeBSD Ports mailing list about it. I'll close this bug if it does turn out to be a FBSD Ports issue. it should not crash there. Can you reproduce with the commandline client ( gphoto2 -L ) ? Hi Marcus, No, the commandline client works just fine: /usr/ports/graphics/digikam/work/digikam-0.9.3{120}# gphoto2 --auto-detect -L Model Port ---------------------------------------------------------- Canon EOS 400D (PTP mode) usb: There is no file in folder '/'. There is no file in folder '/store_00000001'. There is no file in folder '/store_00000001/DCIM'. There are 196 files in folder '/store_00000001/DCIM/100CANON'. #1 IMG_0001.JPG 3804 KB 3888x2592 image/jpeg #2 IMG_0002.JPG 4729 KB 3888x2592 image/jpeg #3 IMG_0003.JPG 5146 KB 3888x2592 image/jpeg #4 IMG_0004.JPG 2772 KB 3888x2592 image/jpeg [snip] #193 IMG_0201.JPG 3327 KB 3888x2592 image/jpeg #194 IMG_0202.JPG 3518 KB 3888x2592 image/jpeg #195 IMG_0203.JPG 3518 KB 3888x2592 image/jpeg #196 IMG_0204.JPG 3758 KB 3888x2592 image/jpeg /usr/ports/graphics/digikam/work/digikam-0.9.3{121}# The CPR() is a preprocessor define which returns on failure. However, gphoto2 -L works fine, so this code should not return failure. You can try "gphoto2 -T" to download all thumbnails, and "gphoto2 -P" to download all images, but I suspect this will just work too. What also could be are multiple calls to gphoto2 in a row :/ Not sure.:/ >> You can try "gphoto2 -T" to download all thumbnails, and "gphoto2 -P" to download all images, but I suspect this will just work too.
Yes, they work fine too.
digikam fails in GPCamera::getSubFolders() here:
errorCode = gp_camera_folder_list_folders(d->camera, QFile::encodeName(folder), clist, m_status->context);
if (errorCode != GP_OK)
{
DDebug() << "Failed to get folders list from camera!" << endl;
Since gphoto2 works OK could this mean that the problem is with what is being passed to gp_camera_folder_list_folders() ?
I got same problem with Canon-400D after update from digikam-0.9.2 to digikam-0.9.3 I am at loss a bit, because the code looks good. :/ Vic, which OS are you using? >Vic, which OS are you using? [vic@vic-home: ./digikam] $ uname -a FreeBSD vic-home.stream.net.ua 6.3-RELEASE FreeBSD 6.3-RELEASE #2: Sun Feb 3 16:24:19 EET 2008 root@vic-home.stream.net.ua:/usr/obj/usr/src/sys/W_STATION i386 I think problem not in OS. I update to FreeBSD 6.3 one week ago. Marcus, I'm familiar with C/C++ and KDE, so if you help me and say what module need to debug I can do it. Or I can run FreeBSD + VNC for you once day and you can try debug project online. Marcus, Vic, What's news about this entry ? Some progress ? Gilles Caulier I continue using digikam-0.9.2..... Mark and Vic, following Marks comment #c6 could you maybe add some DWarning() << ... << endl; statements before the call to gp_camera_folder_list_folders which display the parameters passed to that routine? Maybe also the error code could give an indication about what is going on? Best, Arnd Arnd, you'll need to help me out a bit here - I'm not too hot on C++ and can't work out how to dereference these pointers to display the data. I've added this: DWarning() << "d->camera: " << d->camera << endl; DWarning() << "QFile::encodeName(folder): " << QFile::encodeName(folder) << endl; DWarning() << "clist: " << clist << endl; DWarning() << "m_status->context: " << m_status->context << endl; which produces this output: digikam: WARNING: d->camera: 0x8967a80 digikam: WARNING: QFile::encodeName(folder): / digikam: WARNING: clist: 0x8a43000 digikam: WARNING: m_status->context: 0x8a32200 Not much use I guess? Oneother thing I've noticed is that once DK has accessed the camera once, it can't find it again unless I disconnect and reconnect it. This occurs even when using Auto-detect in the Camera dialogue. However, using ``gphoto --auto-detect'' from the commandline works repeatedly without dis-/re-connecting the camera. The problem has been found, and fixed. It was a problem in libusb on FreeBSD. Since the version of that library I was using was the same for 0.9.2 and 0.9.3 I can only assume that some changes in digikam exposed the bug in libusb. Anyway, a huge thank you to Markus Brueffer who responded to a post I made on the FreeBSD mailing lists asking for help debugging this. He was having similar problems with his Nikon D60 and came up with the fix which I have tested and confirmed that it also fixes my problem: I'll include two messages from Markus here for completeness in case anyone else looks at this bug: > > Anyway, digikam has severe problems with the Nikon D60 as well (only > > partly downloading images, camera not accessible after downloading and > > failing on some images, etc). Although these are different than your > > specific problem, the actual cause of the problem is probably the same as > > digikam 0.9.2 works just fine. > I finally found the cause of the problem (at least the one that happens here > with the Nikon D60, but I'm confident that it's the cause of yours as well). > What happens is the following: > > When downloading data form the camera, digikam invokes usb_bulk_read from > libusb through the libgphoto2 functions. usb_bulk_read uses read(2) to get > data from the camera. read(2) now gets interrupted by a signal (SIGCHLD) that > gets delivered to digikam and returns with EINTR, which is the actual cause > of the problem. The attached patch for libusb suspends signal delivery during > bulk reads and writes for SIGCHLD which lets read(2) succeed and the signal > gets delivered to digikam after the read(2) call. Closing this bug as it is now no longer an issue. |