[Digikam-users] DEBUGGING: 0.9.3 & Canon 400D: No thumbnails, then segfaults

Mark Ovens parish at magichamster.com
Mon Jan 21 21:49:49 GMT 2008


Gilles/Arnd,

OK, I've done some debugging and found where it's failing.

digikam calls gp_camera_folder_list_folders() in
GPCamera::getSubFolders()

In gphoto, gp_camera_folder_list_folders() calls 
gp_filesystem_list_folders() in the macro  CHECK_RESULT_OPEN_CLOSE


     CHECK_RESULT_OPEN_CLOSE (camera, gp_filesystem_list_folders (
                           camera->fs, folder, list, context), context);

gp_filesystem_list_folders() calls fs->folder_list_func() here:

     CR (fs->folder_list_func (fs, folder, list,
                                           fs->list_data, context));

The folder_list_func() that is called is in camlibs/ptp2/library.c

Is camlibs/ptp2 not for generic PTP cameras? As mine is a known camera, 
should it not be calling folder_list_func() in camlibs/canon/library.c???

Anyway, the place where it dies in in the call to ptp_getstorageids() here:
                 PTPStorageIDs storageids;

        if (ptp_operation_issupported(params,PTP_OC_GetStorageIDs)) {
fprintf(stderr, ">> 2\n");
                         CPR (context, ptp_getstorageids(params,
                                 &storageids));
fprintf(stderr, ">> Returned from ptp_getstorageids()\n");
                         for (i=0; i<storageids.n; i++) {
                                 char fname[PTP_MAXSTRLEN];


The fprintf()'s are my debug and it never gets to the second one.

This is the output I see in the console:

CHECK_NULL (camera && folder && list)
CHECK_INIT (camera, context)
CR (camera, gp_list_reset (list), context)
CHECK_RESULT_OPEN_CLOSE (camera, gp_filesystem_list_folders (camera->fs, 
folder, list, context), context)
In gp_filesystem_list_folders
In gp_filesystem_list_folders - CHECK_NULL (fs && folder && list)
In gp_filesystem_list_folders - CC (context)
In gp_filesystem_list_folders - CA (folder, context)
In gp_filesystem_list_folders - gp_list_reset
In gp_filesystem_list_folders - CR (x = gp_filesystem_folder_number (fs, 
folder, context))
In gp_filesystem_list_folders - CR (fs->folder_list_func (fs, folder, 
list,fs->list_data, context)
In ptp2/library.c:folder_list_func()
 > 1
 >> 2
digikam: Failed to get folders list from camera!
digikam: Libgphoto2 error: Unspecified error (-1)

If it should be calling the folder_list_func() in canon/library.c 
instead of ptp2/library.c does this mean that digikam is passing 
incorrect argumants to gphoto?

Regards,

Mark



More information about the Digikam-users mailing list