On Thu, 14 Feb 2013 12:22:22 johannes hanika opined:
> well, the final crash is happening in our code handling some gphoto
> stuff, so i guess it might be a valid darktable bug (but i know
> nothing about that part of the code).

I've had a look at this - the hang occurs in gp_camera_get_config called from 
camera_control.c:717. Whilst the return value from that function is ignored, 
it actually is GP_OK. Grrrr.

The output variable cam->configuration also appears to be OK - I can see no 
value that would mark the window as being invalid, but I'm no expert in 
GPhoto2.

Obviously the best thing would be for gp_camera_get_config to return a failed 
status if the underlying library functions detect that the camera has been 
disconnected.

FWIW, the following is a backtrace generated by Ctrl-Z in gdb at time of hang.

^Z
Program received signal SIGTSTP, Stopped (user).
0x00000031b76e9970 in __poll_nocancel () from /lib64/libc.so.6
(gdb) bt
#0  0x00000031b76e9970 in __poll_nocancel () from /lib64/libc.so.6
#1  0x00007ffff73155cb in handle_events () from /lib64/libusb-1.0.so.0
#2  0x00007ffff7316227 in libusb_handle_events_timeout_completed () from 
/lib64/libusb-1.0.so.0
#3  0x00007ffff73162f0 in libusb_handle_events_completed () from 
/lib64/libusb-1.0.so.0
#4  0x00007ffff7316a79 in do_sync_bulk_transfer () from /lib64/libusb-1.0.so.0
#5  0x00007ffff7316e44 in libusb_bulk_transfer () from /lib64/libusb-1.0.so.0
#6  0x0000003f48401a48 in usb_bulk_io.isra.1 () from /lib64/libusb-0.1.so.4
#7  0x00007ffff7546a72 in gp_port_usb_read () from 
/usr/lib64/libgphoto2_port/0.10.0/usb.so
#8  0x0000003f3f2056f3 in gp_port_read () from /lib64/libgphoto2_port.so.10
#9  0x00007ffff6b00001 in ptp_usb_getpacket () from 
/usr/lib64/libgphoto2/2.5.0/ptp2.so
#10 0x00007ffff6b0070d in ptp_usb_getdata () from 
/usr/lib64/libgphoto2/2.5.0/ptp2.so
#11 0x00007ffff6ae6af2 in ptp_transaction_new () from 
/usr/lib64/libgphoto2/2.5.0/ptp2.so
#12 0x00007ffff6ae6d3a in ptp_transaction () from 
/usr/lib64/libgphoto2/2.5.0/ptp2.so
#13 0x00007ffff6af1d06 in ptp_getdevicepropdesc () from 
/usr/lib64/libgphoto2/2.5.0/ptp2.so
#14 0x00007ffff6b0ee22 in camera_get_config () from 
/usr/lib64/libgphoto2/2.5.0/ptp2.so
#15 0x0000003f4040f1f8 in gp_camera_get_config () from /lib64/libgphoto2.so.6
#16 0x00007ffff7cd73ff in _camera_initialize (c=c@entry=0x64d010, 
cam=cam@entry=0x6a32e0)
    at $HOME/darktable/src/common/camera_control.c:717
#17 0x00007ffff7cd7c3b in dt_camctl_detect_cameras (c=c@entry=0x64d010)
    at $HOME/darktable/src/common/camera_control.c:600
#18 0x00007ffff7cd7dfc in dt_camctl_new () at 
$HOME/darktable/src/common/camera_control.c:487
#19 0x00007ffff7c23576 in dt_init (argc=3, argv=0x7fffffffdfd8, 
init_gui=init_gui@entry=1)
    at $HOME/darktable/src/common/darktable.c:648
#20 0x0000000000400a4e in main (argc=<optimized out>, argv=<optimized out>) at 
$HOME/darktable/src/main.c:24

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
darktable-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to