Bug #10803

Darktable segfault at start

Added by Jean-Luc Coulon over 3 years ago. Updated over 3 years ago.

Target version:
Start date:
Due date:
% Done:


Affected Version:
git development version
hardware architecture:



As reported on IRC, I experience a segfault at start.
It seems related to lensfun and a particular picture.

The version of lensfun is the latest git one.

Here are the latest commits from "git log":
commit c51837a7ed8733de0584275b7cd762de1d6d2395
Author: Torsten Bronger <>
Date: Sun Dec 20 12:44:35 2015 +0100

Improved source code layout.

commit 405fbda270a9c2d68e9a8d4428b9529031e42439
Author: Sebastian Kraft <>
Date: Sat Dec 19 20:08:24 2015 +0100

Only use proper C++ new and delete syntax for object creation in tests and lenstool

Please, find attached:
the backtrace
the .cr2 file
the .cr2.xmp file

Best regards


jlc_2559.cr2.xmp - .xmp file (3.23 KB) Jean-Luc Coulon, 12/22/2015 01:52 PM

jlc_2559.cr2 - .cr2 file (22.1 MB) Jean-Luc Coulon, 12/22/2015 01:52 PM

darktable_bt_VJQ79X.txt Magnifier (42.8 KB) Jean-Luc Coulon, 12/22/2015 07:19 PM


#1 Updated by Roman Lebedev over 3 years ago

  • Category changed from General to Masks
  • Subject changed from Darktable segfault at start - lensfun related to Darktable segfault at start
  • Assignee set to Aldric Renaudin

Looks like mask issue (did not check if it is reproducible).

#2 Updated by Ulrich Pegelow over 3 years ago

@Jean-Luc: according to the backtrace the crash has been triggered by input file jlc_2566.cr2. Please attach that one. The other input file given earlier does not involve any mask operation nor any lens correction (I agree with Roman that the issue seems to be masks related).

#3 Updated by Jean-Luc Coulon over 3 years ago

Hi Ulrich,

I've made a lots of tests.
I've removed .config/darktable, .cache/darktable, all the .xmp files in the working directory
It was crashing on the first picture if I was opening a signle image or just after populating the thumbnails on the lighttable in the cas I was importing a directory.

After many crashed, the bt are a bit different (it is possible also I made some mistakes: e.g, I've had some file left in /usr/local).

BUT, as lensfun was always in the BT I've. I've got an old package I have on a backup. And thince then I have no problem anymore.

So, I've done a bisect on lensfun (I really need a better computer).

Here is the result:

jean-luc@tangerine] % git bisect bad
9444375fdb5436dd9a4381b92805fd71f69f54fb is the first bad commit
commit 9444375fdb5436dd9a4381b92805fd71f69f54fb
Author: Sebastian Kraft <>
Date: Sat Dec 19 19:58:43 2015 +0100

Mark static lfXX::Create() and lfXX:Destroy() functions as deprecated and update documentation accordingly

:040000 040000 586df86f5ec0427dbd5b04c9a692c87448de397c e968acb186d535cf591be956b2bb5b5eef14dced M include
:040000 040000 83fff5921edce0047445254f75e808dcefb4b830 62f10cf9183e4858b9bb723aad5117b16e04b6d0 M libs

I suppose this can help


#4 Updated by Torsten Bronger over 3 years ago

A "return" seems to be missing in Lensfun.

#5 Updated by Torsten Bronger over 3 years ago

It is now fixed in Lensfun's git version. Thank you for tracking this down!

#6 Updated by Jean-Luc Coulon over 3 years ago

There is a bit of magic in git-bisect.
BUT I need a better computer because it is a slow repetitive process :)

#7 Updated by Jean-Luc Coulon over 3 years ago

Correct bt attached

#8 Updated by Roman Lebedev over 3 years ago

  • File deleted (darktable_bt_SS319X.txt)

#9 Updated by Roman Lebedev over 3 years ago

  • % Done changed from 0 to 100
  • Assignee deleted (Aldric Renaudin)
  • Status changed from New to Fixed
  • Category deleted (Masks)
  • System changed from Debian to all

Also available in: Atom PDF