darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.79k stars 1.14k forks source link

crash in latest v3.5 when moving images to another folder #9360

Closed phil20099 closed 3 years ago

phil20099 commented 3 years ago

Describe the bug/issue I'm trying to move 40 images from one folder to another via the lighttable and darktable crashes.

  1. select all the images then press move
  2. select the destination folder
  3. press "select as destination"
  4. a dialogue appears "move images ?" and on pressing yes darktable crashes.
  5. sometimes it crashes immediately, others there is a pause before a "force quit / pause" appears.

Running darktable with "-d all" gives the below as the last 2 lines : _14.343108 [sql] /usr/src/packages/BUILD/src/common/collection.c:172, function dt_collection_memory_update(): prepare "INSERT INTO memory.collected_images (imgid) SELECT DISTINCT mi.id FROM (SELECT id, group_id, film_id, filename, datetime_taken, flags, version, position, aspect_ratio, maker, model, lens, aperture, exposure, focal_length, iso, import_timestamp, change_timestamp, export_timestamp, print_timestamp FROM main.images AS mi ) AS mi WHERE (flags & 256) != 256 AND (flags & 7) >= 0 AND NOT ((flags & 8) == 8) AND (1=1 AND (film_id IN (SELECT id FROM main.filmrolls WHERE folder LIKE '/home/phil/photos-editing-NOBACKUP/20210626-Mums-cemetery'))) ORDER BY filename, filename , version LIMIT ?1, ?2" malloc(): smallbin double linked list corrupted Aborted (core dumped)

On trying to move just the first image in the collection it gives : _8.892501 [sql] /usr/src/packages/BUILD/src/common/film.c:220, function dt_film_new(): prepare "SELECT id FROM main.film_rolls WHERE folder=?1" 8.892710 [sql] /usr/src/packages/BUILD/src/common/image.c:320, function dt_image_full_path(): prepare "SELECT folder || '/' || filename FROM main.images i, main.film_rolls f WHERE i.film_id = f.id and i.id = ?1" corrupted size vs. prevsize in fastbins Aborted (core dumped)

On trying to copy a single image darktable hangs then a "force quit" message appears.

I've tried moving all images on another collection and get the same issue but with a slightly different message : _16.615227 [runjob-] 03 334350144.949548 16.615247 move images | queue: 0 | priority: 416.615256 corrupted double-linked list Aborted (core dumped)

This was definitely working earlier this week, I upgraded to the latest version this morning and have been experiencing the issues since then.

johnny-bit commented 3 years ago

dou you have grouped images or multiple version of images in your collection?

This seems like something is freed incorrectly. I think some free fixes landed recently in master. @ralfbrown - what's your opinion here?

phil20099 commented 3 years ago

do you have grouped images or multiple version of images in your collection? No and no.

I've created a new collection of just a single image and I tried to move this image and it crashes : malloc(): unsorted double linked list corrupted Aborted (core dumped)

If I can do anything else just let me know.

s7habo commented 3 years ago

I can confirm that.

darktable 3.5.0~git2657.813b0c6355-1 on Kubuntu 20.04

Terminal output:

Failed to copy image /media/s7habo/Datenplatte/Bilder/2021_06_05_BUGA_Petesberg/DSC_8548.NEF: Error opening file “/home/s7habo/�k�OV/DSC_8548.NEF”: No such file or directory malloc(): memory corruption (fast) Abgebrochen (Speicherabzug geschrieben)

johnny-bit commented 3 years ago

Fix is in pending PR #9361 :) once it's merged the problem's gone.