darktable-org / darktable-org/darktable

Crash: Quick tagging after modifiying description meta data

Open
#20,919 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Is there an existing issue for this?
  • I checked and did not find my issue in the already reported ones
Describe the bug

DT crashes when tagging after a description modification

Steps to reproduce
  • modify a group of photos (jpg + raw) description,
  • hit enter to apply,
  • ctrl+t to bring quick tag,
  • put a tag
  • hit enter
Expected behavior

not crash

Logfile | Screenshot | Screencast
(darktable:110359): Gtk-CRITICAL **: 14:56:51.270: gtk_container_get_focus_child: assertion 'GTK_IS_CONTAINER (container)' failed
an error occurred while trying to execute gdb. please check if gdb is installed on your system.
Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...
   105.6779 [sql] /build/darktable-5.4.1/src/common/image.c:414, 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"
   105.6781 [sql] /build/darktable-5.4.1/src/common/image.c:559, function dt_image_path_append_version(): prepare "SELECT version FROM main.images WHERE id = ?1"
   105.6781 [sql] /build/darktable-5.4.1/src/common/image.c:414, 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"
   105.6781 [sql] /build/darktable-5.4.1/src/common/image.c:492, function _image_local_copy_full_path(): prepare "SELECT folder || '/' || filename FROM main.images i, main.film_rolls f WHERE i.film_id = f.id AND i.id = ?1"
   105.6788 [sql] /build/darktable-5.4.1/src/common/exif.cc:5075, function _exif_xmp_read_data(): prepare "SELECT filename, flags, raw_parameters,        longitude, latitude, altitude, history_end, datetime_taken FROM main.images WHERE id = ?1"
   105.6788 [sql] /build/darktable-5.4.1/src/common/iop_order.c:720, function _ioppr_get_default_iop_order_version(): prepare "SELECT flags FROM main.images WHERE id = ?1"
   105.6788 [sql] /build/darktable-5.4.1/src/common/iop_order.c:749, function dt_ioppr_get_iop_order_version(): prepare "SELECT version FROM main.module_order WHERE imgid = ?1"
   105.6788 [sql] /build/darktable-5.4.1/src/common/iop_order.c:1142, function dt_ioppr_get_iop_order_list(): prepare "SELECT version, iop_list FROM main.module_order WHERE imgid=?1"
   105.6789 [sql] /build/darktable-5.4.1/src/common/exif.cc:4816, function _set_xmp_timestamps(): prepare "SELECT import_timestamp, change_timestamp, export_timestamp, print_timestamp FROM main.images WHERE id = ?1"
   105.6789 [sql] /build/darktable-5.4.1/src/common/color_harmony.c:93, function dt_color_harmony_get(): prepare "SELECT type, rotation, width FROM main.harmony_guide WHERE main.harmony_guide.imgid = ?1"
   105.6789 [sql] /build/darktable-5.4.1/src/common/exif.cc:5002, function _set_xmp_dt_metadata(): prepare "SELECT key, value FROM main.meta_data WHERE id = ?1"
   105.6789 [sql] /build/darktable-5.4.1/src/common/exif.cc:5045, function _set_xmp_dt_metadata(): prepare "SELECT color FROM main.color_labels WHERE imgid=?1"
   105.6790 [sql] /build/darktable-5.4.1/src/common/tags.c:769, function dt_tag_get_attached(): prepare "SELECT DISTINCT I.tagid, T.name, T.flags, T.synonyms, COUNT(DISTINCT I.imgid) AS inb FROM main.tagged_images AS I JOIN data.tags AS T ON T.id = I.tagid WHERE I.imgid IN (8406) GROUP BY I.tagid  ORDER by T.name"
   105.6791 [sql] /build/darktable-5.4.1/src/common/tags.c:769, function dt_tag_get_attached(): prepare "SELECT DISTINCT I.tagid, T.name, T.flags, T.synonyms, COUNT(DISTINCT I.imgid) AS inb FROM main.tagged_images AS I JOIN data.tags AS T ON T.id = I.tagid WHERE I.imgid IN (8406) GROUP BY I.tagid  ORDER by T.name"
   105.6791 [sql] /build/darktable-5.4.1/src/common/exif.cc:4654, function _set_xmp_dt_history(): prepare "SELECT imgid, formid, form, name, version, points, points_count, source, num FROM main.masks_history WHERE imgid = ?1 ORDER BY num"
   105.6792 [sql] /build/darktable-5.4.1/src/common/exif.cc:4718, function _set_xmp_dt_history(): prepare "SELECT module, operation, op_params, enabled, blendop_params,        blendop_version, multi_priority, multi_name, num, multi_name_hand_edited FROM main.history WHERE imgid = ?1 ORDER BY num"
   105.6795 [sql] /build/darktable-5.4.1/src/common/history.c:1760, function dt_history_hash_read(): prepare "SELECT basic_hash, auto_hash, current_hash FROM main.history_hash WHERE imgid = ?1"
   105.6796 exif_xmp_read_data: dt_exif_xmp_write. imgid=8406, hist=5, took 0.001s
   105.6798 [sql] /build/darktable-5.4.1/src/common/image.c:3014, function dt_image_write_sidecar_file(): prepare "UPDATE main.images SET write_timestamp = STRFTIME('%s', 'now') WHERE id = ?1"
   105.6798 [sql] /build/darktable-5.4.1/src/common/image.c:414, 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"
   105.6798 [sql] /build/darktable-5.4.1/src/common/image.c:559, function dt_image_path_append_version(): prepare "SELECT version FROM main.images WHERE id = ?1"
   105.6798 [sql] /build/darktable-5.4.1/src/common/image.c:414, 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"
   105.6799 [sql] /build/darktable-5.4.1/src/common/image.c:492, function _image_local_copy_full_path(): prepare "SELECT folder || '/' || filename FROM main.images i, main.film_rolls f WHERE i.film_id = f.id AND i.id = ?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/exif.cc:5075, function _exif_xmp_read_data(): prepare "SELECT filename, flags, raw_parameters,        longitude, latitude, altitude, history_end, datetime_taken FROM main.images WHERE id = ?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/iop_order.c:720, function _ioppr_get_default_iop_order_version(): prepare "SELECT flags FROM main.images WHERE id = ?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/iop_order.c:749, function dt_ioppr_get_iop_order_version(): prepare "SELECT version FROM main.module_order WHERE imgid = ?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/iop_order.c:1142, function dt_ioppr_get_iop_order_list(): prepare "SELECT version, iop_list FROM main.module_order WHERE imgid=?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/exif.cc:4816, function _set_xmp_timestamps(): prepare "SELECT import_timestamp, change_timestamp, export_timestamp, print_timestamp FROM main.images WHERE id = ?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/color_harmony.c:93, function dt_color_harmony_get(): prepare "SELECT type, rotation, width FROM main.harmony_guide WHERE main.harmony_guide.imgid = ?1"
   105.6801 [sql] /build/darktable-5.4.1/src/common/exif.cc:5002, function _set_xmp_dt_metadata(): prepare "SELECT key, value FROM main.meta_data WHERE id = ?1"
   105.6802 [sql] /build/darktable-5.4.1/src/common/exif.cc:5045, function _set_xmp_dt_metadata(): prepare "SELECT color FROM main.color_labels WHERE imgid=?1"
   105.6802 [sql] /build/darktable-5.4.1/src/common/tags.c:769, function dt_tag_get_attached(): prepare "SELECT DISTINCT I.tagid, T.name, T.flags, T.synonyms, COUNT(DISTINCT I.imgid) AS inb FROM main.tagged_images AS I JOIN data.tags AS T ON T.id = I.tagid WHERE I.imgid IN (8407) GROUP BY I.tagid  ORDER by T.name"
   105.6802 [sql] /build/darktable-5.4.1/src/common/tags.c:769, function dt_tag_get_attached(): prepare "SELECT DISTINCT I.tagid, T.name, T.flags, T.synonyms, COUNT(DISTINCT I.imgid) AS inb FROM main.tagged_images AS I JOIN data.tags AS T ON T.id = I.tagid WHERE I.imgid IN (8407) GROUP BY I.tagid  ORDER by T.name"
   105.6803 [sql] /build/darktable-5.4.1/src/common/exif.cc:4654, function _set_xmp_dt_history(): prepare "SELECT imgid, formid, form, name, version, points, points_count, source, num FROM main.masks_history WHERE imgid = ?1 ORDER BY num"
   105.6803 [sql] /build/darktable-5.4.1/src/common/exif.cc:4718, function _set_xmp_dt_history(): prepare "SELECT module, operation, op_params, enabled, blendop_params,        blendop_version, multi_priority, multi_name, num, multi_name_hand_edited FROM main.history WHERE imgid = ?1 ORDER BY num"
   105.6803 [sql] /build/darktable-5.4.1/src/common/history.c:1760, function dt_history_hash_read(): prepare "SELECT basic_hash, auto_hash, current_hash FROM main.history_hash WHERE imgid = ?1"
   105.6803 exif_xmp_read_data: dt_exif_xmp_write. imgid=8407, hist=0, took 0.000s
   105.6804 [sql] /build/darktable-5.4.1/src/common/image.c:3014, function dt_image_write_sidecar_file(): prepare "UPDATE main.images SET write_timestamp = STRFTIME('%s', 'now') WHERE id = ?1"
backtrace written to /tmp/darktable_bt_S4GLO3.txt
Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...
fish: Job 1, 'darktable -d all --tmpdir ./tmp/' terminated by signal SIGABRT (Abort)
Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.4.1

What OS are you using?

Linux

What is the version of your OS?

NixOS

Describe your system

Wayland, Niri

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

NVidia

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

can’t get the backtrace file shown in the log, file simply does not exist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash by modifying descriptions for JPG and RAW photos, then using Quick Tag with Ctrl+T. Start by examining the logged paths in src/common/tags.c, src/common/exif.cc, and src/common/image.c; the unavailable backtrace may limit diagnosis. Done means the described tagging sequence completes without a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.