darktable-org / darktable-org/darktable

Crash with certain characters in directory names on FreeBSD

Open
#19,546 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-issue-activity
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

A FreeBSD user reported a reproducible crash via IRC.

<ene> I have longstanding problem, currently with darktable 5.2.1 on freebsd 13.5 (amd64). With locale > echo $LC_CTYPE / $LANG / $G_FILENAME_ENCODING

<ene> nb_NO.ISO8859-1 / nb_NO.ISO8859-1 / ISO-8859-1

<ene> darktable segfaults when selecting add to library and the requester goes into a directory containing ø or æ. Curiously å doesn't segfault. I've been working around this for some years by executing "darktable ." in the directory in question, but is there some other solution?

Steps to reproduce
elg!ene[~]> mkdir dtlang
elg!ene[~]> cd dtlang
elg!ene[~/dtlang]> mkdir en to tre fire
elg!ene[~/dtlang]> darktable

** I can select add to library and go to "dtlang" in the file requester fine.

elg!ene[~/dtlang]> mkdir ål
elg!ene[~/dtlang]> darktable

(darktable:30173): GLib-CRITICAL **: 14:36:47.008: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.009: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.017: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.017: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.025: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.025: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.033: g_convert: assertion 'str != NULL' failed

(darktable:30173): GLib-CRITICAL **: 14:36:47.033: g_convert: assertion 'str != NULL' failed

** I can still go to the directory in the file requester

elg!ene[~/dtlang]> mkdir øl
elg!ene[~/dtlang]> darktable

** navigating to dtlang now results in this

(darktable:30177): GLib-CRITICAL **: 14:37:08.273: g_convert: assertion 'str != NULL' failed

(darktable:30177): GLib-CRITICAL **: 14:37:08.273: g_convert: assertion 'str != NULL' failed

…

Segmentation fault (core dumped)
elg!ene[~/dtlang]> 
Expected behavior

darktable should not crash

Logfile | Screenshot | Screencast

https://www.stigaas.no/dt/dtdebug.txt

Commit

No response

Where did you obtain darktable from?

distro packaging

darktable version

5.2.1

What OS are you using?

Linux

What is the version of your OS?

FreeBSD 13.5a

Describe your system

No response

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

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

https://www.stigaas.no/dt/dtdebug.txt

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 on FreeBSD 13.5 with the reported nb_NO.ISO8859-1 locale and directory names containing ø or æ, then inspect the linked dtdebug.txt logfile. Trace the file-requester path involved in navigating to the affected directory. Done means selecting Add to Library and opening such directories no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.