Project

General

Profile

Bug #8444

import from mass storage crashes

Added by sk1p - over 8 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
Category:
Tethering
Target version:
Start date:
Due date:
% Done:

100%

Affected Version:
System:
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Hi,
using darktable 608c446bd3d6ee02ca0cc09baafd5234ed4fc3c9,
darktable fails to import from card reader via gphotos mass storage import function. clicking the import button, selecting all images and confirming the dialog the first time just
displays "starting to import images from camera",
doing the procedure two or three times more crashes darktable quite reliable.

i get the following error:

*** glibc detected *** /usr/local/bin/darktable: double free or corruption (fasttop): 0x0000000012185f40 ***

h7. Backtrace:

/lib/libc.so.6[0x3e79271ad6]
/lib/libc.so.6[0x3e79277413]
/lib/libc.so.6(realloc+0xf0)[0x3e79277a00]
/lib/libglib-2.0.so.0(g_realloc+0x2f)[0x3e7ae4736f]
/usr/lib/libgdk-x11-2.0.so.0[0x38faa33cc6]
/usr/lib/libgdk-x11-2.0.so.0[0x38faa33074]
/usr/lib/libgdk-x11-2.0.so.0(gdk_region_union+0x97)[0x38faa346c7]
/usr/lib/libgdk-x11-2.0.so.0[0x38faa42411]
/usr/lib/libgdk-x11-2.0.so.0[0x38faa42ab3]
/usr/lib/libgtk-x11-2.0.so.0(gtk_widget_queue_draw_area+0x19e)[0x38fa05df4e]
/usr/lib/libgtk-x11-2.0.so.0(gtk_widget_queue_draw+0x7b)[0x38fa05e0ab]
/usr/lib/libgtk-x11-2.0.so.0(gtk_widget_set_sensitive+0x128)[0x38fa05e1e8]
/usr/local/bin/../lib/darktable/libdarktable.so(+0xa5e7a)[0x7ffff7adce7a]
/usr/local/bin/../lib/darktable/libdarktable.so(_dispatch_control_status+0x34)[0x7ffff7ad7784]
/usr/local/bin/../lib/darktable/libdarktable.so(dt_camctl_get_previews+0x1b)[0x7ffff7ad8abb]
/usr/local/bin/../lib/darktable/libdarktable.so(dt_camera_get_previews_job_run+0x3f)[0x7ffff7ada2bf]
/usr/local/bin/../lib/darktable/libdarktable.so(dt_control_run_job+0x191)[0x7ffff7aaa401]
/usr/local/bin/../lib/darktable/libdarktable.so(dt_control_work+0x2b)[0x7ffff7aaa4fb]
/lib/libpthread.so.0[0x3e79e068ba]
/lib/libc.so.6(clone+0x6d)[0x3e792cf02d]

h7. Memory map:

[...]
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff4088700 (LWP 20622)]
0x0000003e79232165 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x0000003e79232165 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8271  0x0000003e79234f70 in abort () at abort.c:92
#8272  0x0000003e7926827b in +libc_message (do_abort=<value optimized out>, fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#8273  0x0000003e79271ad6 in malloc_printerr (action=3, str=0x3e79328a60 "double free or corruption (fasttop)", ptr=<value optimized out>) at malloc.c:6267
#8274  0x0000003e79277413 in _int_realloc (av=0x3e7955ce40, oldp=0x12185ea0, oldsize=208, nb=144) at malloc.c:5353
#8275  0x0000003e79277a00 in +libc_realloc (oldmem=0x12185eb0, bytes=128) at malloc.c:3822
#8276  0x0000003e7ae4736f in IA+g_realloc (mem=0x5089, n_bytes=128) at /scratch/build-area/glib2.0-2.24.2/glib/gmem.c:171
#8277  0x00000038faa33cc6 in miUnionNonO (pReg=0x1217f6d0, r=0x121dec80, rEnd=0x121dec90, y1=158, y2=171) at /scratch/build-area/gtk+2.0-2.20.1/gdk/gdkregion-generic.c:1113
#8278  0x00000038faa33074 in miRegionOp (newReg=<value optimized out>, reg1=<value optimized out>, reg2=<value optimized out>, overlapFn=<value optimized out>, nonOverlap1Fn=<value optimized out>, nonOverlap2Fn=<value optimized out>)
    at /scratch/build-area/gtk+2.0-2.20.1/gdk/gdkregion-generic.c:940
#8279  0x00000038faa346c7 in IA+gdk_region_union (source1=0x1217f6d0, source2=0x12195b00) at /scratch/build-area/gtk+2.0-2.20.1/gdk/gdkregion-generic.c:1264
#8280 0x00000038faa42411 in gdk_window_invalidate_maybe_recurse_full (window=0xf7e0bf0, region=0x121af690, clear_bg=<value optimized out>, child_func=0x38faa3b670 <true_predicate>, user_data=0x0) at /scratch/build-area/gtk+2.0-2.20.1/gdk/gdkwindow.c:5732
#8281 0x00000038faa42ab3 in gdk_window_invalidate_rect_full (window=0xf7e0bf0, rect=<value optimized out>, invalidate_children=1, clear_bg=CLEAR_BG_NONE) at /scratch/build-area/gtk+2.0-2.20.1/gdk/gdkwindow.c:5569
#8282 0x00000038fa05df4e in IA+gtk_widget_queue_draw_area (widget=0x40bfa60, x=5, y=187, width=280, height=20) at /scratch/build-area/gtk+2.0-2.20.1/gtk/gtkwidget.c:3652
#8283 0x00000038fa05e0ab in IA+gtk_widget_queue_draw (widget=0x40bfa60) at /scratch/build-area/gtk+2.0-2.20.1/gtk/gtkwidget.c:3722
#8284 0x00000038fa05e1e8 in IA+gtk_widget_set_sensitive (widget=0x40bfa60, sensitive=0) at /scratch/build-area/gtk+2.0-2.20.1/gtk/gtkwidget.c:6246
#8285 0x00007ffff7adce7a in _camctl_camera_control_status_callback (status=<value optimized out>, data=<value optimized out>) at /home/alex/source/git/darktable/src/gui/devices.c:59
#8286 0x00007ffff7ad7784 in _dispatch_control_status (c=<value optimized out>, status=CAMERA_CONTROL_BUSY) at /home/alex/source/git/darktable/src/common/camera_control.c:1145
#8287 0x00007ffff7ad8abb in dt_camctl_get_previews (c=0x5089, flags=CAMCTL_IMAGE_PREVIEW_DATA, cam=0x6) at /home/alex/source/git/darktable/src/common/camera_control.c:628
#8288 0x00007ffff7ada2bf in dt_camera_get_previews_job_run (job=0x888e78) at /home/alex/source/git/darktable/src/control/jobs/camera_jobs.c:183
#8289 0x00007ffff7aaa401 in dt_control_run_job (s=0x8847b0) at /home/alex/source/git/darktable/src/control/control.c:626
#8290 0x00007ffff7aaa4fb in dt_control_work (ptr=<value optimized out>) at /home/alex/source/git/darktable/src/control/control.c:773
#8291 0x0000003e79e068ba in start_thread (arg=<value optimized out>) at pthread_create.c:300
#8292 0x0000003e792cf02d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8293 0x0000000000000000 in ?? ()
(gdb)

it seems like _camctl_camera_control_status_callback is missing a pair of gdk_threads_enter/gdk_threads_leave, as gtk_widget_set_sensitive calls gdk stuff under the hood.

History

#1 Updated by sk1p - over 8 years ago

to clarify: adding gdk_threads_enter/gdk_threads_leave seems to fix the crash, but the import still does not proceed.

#2 Updated by sk1p - over 8 years ago

  • Status changed from New to Fixed

Also available in: Atom PDF