darktable icon indicating copy to clipboard operation
darktable copied to clipboard

[Windows] Systematically crashes or hangs on first launch

Open Voltra opened this issue 4 months ago • 27 comments

Is there an existing issue for this?

  • [x] I checked and did not find my issue in the already reported ones

Describe the bug

It always crashes or hangs on the very first launch of each boot cycle

Steps to reproduce

  1. Install a version prior to 5.2.0
  2. Let it update to 5.2.0
  3. Turn off the computer
  4. Turn on the computer
  5. Open darktable (from a file, or just the program itself)
  6. Watch it hang or crash
  7. Force close it
  8. Open it again the exact same way
  9. It opens fine

Expected behavior

darktable should

Logfile | Screenshot | Screencast

========================================
version: darktable 5.2.0
start: 2025-08-07 09:35:21

     0.0125 [dt starting]
 D:\prgm\darktable\bin\darktable.exe D:\[redacted]\Camera\_MG_3671.CR2

(darktable.exe:9820): Gdk-CRITICAL **: 17:20:04.231: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable.exe:9820): Gdk-CRITICAL **: 17:20:36.498: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable.exe:9820): Gdk-CRITICAL **: 17:23:14.927: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable.exe:9820): Gdk-CRITICAL **: 17:25:00.865: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable.exe:9820): Gdk-CRITICAL **: 17:25:24.016: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable.exe:9820): Gdk-CRITICAL **: 17:25:36.239: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable.exe:10496): Gdk-CRITICAL **: 19:03:55.484: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed
========================================
version: darktable 5.2.0
start: 2025-08-14 16:09:53

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.2.0

What OS are you using?

Linux

What is the version of your OS?

Windows 11 Family

Describe your system

  • 8GB RAM
  • Linked Lua: API version 9.5.0
  • Linked LibRaw: Version 0.22.0-Devel202502

Are you using OpenCL GPU in darktable?

I dont know

If yes, what is the GPU card and driver?

GeForce GTX 1050 ; Driver: 577.00 Game Ready

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

No response

Voltra avatar Aug 14 '25 14:08 Voltra

Thanks for the issue report. Can you attach a txt file with the log using -d common from command line? Also can you attach a txt file with the output from darktable-cltest?

gi-man avatar Aug 14 '25 14:08 gi-man

Thanks for the issue report. Can you attach a txt file with the log using -d common from command line? Also can you attach a txt file with the output from darktable-cltest?

My apologies for not replying sooner, I hadn't received a notification for your reply.

Since then I accidentally uninstalled Darktable, and when I installed it back (in the same directory as before) it seemed to work just fine for now.

Will do if the issue comes up again

Voltra avatar Sep 03 '25 16:09 Voltra

Results of darktable-cltest

Results of darktable -d common after crash and as first successful launch of the boot cycle

Voltra avatar Sep 25 '25 19:09 Voltra

I've had the same issue. Upon first launch the load process is noticeably longer in duration, the DT window will open to a white screen and hang indefinitely. If I close and then relaunch then in opens faster and properly. I'm on the 5.3 development build, but I saw it on 5.2 as well.

I'll be glad to provide more details, but I might need some instruction on how to proceed as my software skills are nearly nonexistent.

Dave22152 avatar Sep 26 '25 13:09 Dave22152

Same problem here. When I startup my computer and directly open up darktable once Windows 11 is ready, I get a white darktable window and thats it. Shutting down the process and restarting it, "fixes" the problem and darktable starts. Could this have to do with multi monitor setup? In my case, I have a dual monitor setup. Normally I only use the primary monitor with the secondary screen is turned off (power off). If I start darktable with both monitors on, darktable is, for whatever reason, starting on the secondary monitor!

darktable 5.2.1 downloaded from darktable.org

Systeminformations: Windows 11 Version 24H2 (Build 26.100.6584) intel Core Ultra 7 265K 64GB RAM nvidia RTX 4070 TI SUPER

armin-rc avatar Oct 01 '25 15:10 armin-rc

My setup doesn't have any external monitor, so I doubt that would be the only factor

Voltra avatar Oct 01 '25 20:10 Voltra

With the issue coming back, here are the files from a failed launch:

Result of first launch via darktable -d common which resulted in darktable hanging

Result of first launch via darktable-cltest right after the first launch

Nothing was added to the log file

Voltra avatar Oct 02 '25 14:10 Voltra

@Voltra can you share a log using -d all (when the issue happens)? the -d common is not enough.

gi-man avatar Oct 02 '25 14:10 gi-man

Will do ASAP

Voltra avatar Oct 02 '25 14:10 Voltra

Same problem (kinda) here with 5.2 and higher on Windows 10.

I've tried a few things and somehow it started once. But can't get it to start anymore. Going back to 5.1 again (this works 100%, as I went from 5.1 to 5.2 back to 5.1 and hoped 5.3 would work).

Difference is mine won't start at all but it hangs at a white screen.

mvrvelous avatar Oct 02 '25 17:10 mvrvelous

Just tried to "produce" the log file. Started darktable with "darktable.exe -d all" but I do not see a log file. Where is it stored? I am on Windows 11. Thanks!

armin-rc avatar Oct 02 '25 18:10 armin-rc

I do not see a log file. Where is it stored?

In Darktable subfolder of your Documents folder.

victoryforce avatar Oct 02 '25 18:10 victoryforce

In Darktable subfolder of your Documents folder.

Oh man, thanks a lot!

Now the funny thing is, I just wanted to create those log files and something "strange" happened.

In order to create the log files I shut down my computer, let it stay there for a few seconds and fired it up again. Then, after Windows loaded I started darktable from the command line (in my case Windows Powershell). So I navigate to the binaries folder (C:\Program Files\darktable\bin) and execute the following:

PS C:\Program Files\darktable\bin> "./darktable.exe -d all"

And: everything works just fine! darktable started up successfully and was ready to rock'n'roll.

Then, I closed darktable and without a restart of the PC, I tried to start it again via the desktop shortcut. And: it crashed!

Here is a screenshot from the settings dialog of the desktop settings I use (its in German): Image

I try to create a log file when it crashes but it seems to me, that the behaviour is different if some command line parameters are present vs no command line parameters ...

armin-rc avatar Oct 02 '25 19:10 armin-rc

Ok, now I have them. Two log files. Both created with the "-d all" - Option. Hope they are of some help to you!

startup_ok.log startup_fail.log

armin-rc avatar Oct 02 '25 19:10 armin-rc

I can corroborate with @mvrvelous that running darktable -d all &> dump.txt seems to affect the memory layout greatly and that lets the program work fine when it wouldn't otherwise. (When this happens to me, it's usually something to do with <stdio.h> and printf)

So I tried a tricky one with darktable -d all 2>&1 | tee dump.txt instead, and that did trigger the hanging issue.

darktable--d-all.KO.2025-10-02.txt

Voltra avatar Oct 02 '25 19:10 Voltra

I'm trying to produce these log files to help the cause, and I can run the -d common and cltest commands, but running darktable -d all 2>&1 | tee dump.txt fails. Can someone provide the syntax that I should run to obtain the needed log files?

Dave22152 avatar Oct 02 '25 20:10 Dave22152

I'm using Git For Windows, that's why.

In Powershell the equivalent should be:

darktable -d all | powershell -Command "Tee-Object -FilePath dump.txt"

Voltra avatar Oct 02 '25 20:10 Voltra

@Voltra I'm clueless with this issue. Your system has a total of 8Gb of physical ram, correct? In your last log, the amount of memory reported right before the last log entry is large. I don't remember what windows calls swap memory (maybe virtual), do you know how much you have?

gi-man avatar Oct 03 '25 05:10 gi-man

@gi-man May I ask you, where in the log of @Voltra you see this large memory reported? Thanks!

armin-rc avatar Oct 03 '25 06:10 armin-rc

@gi-man May I ask you, where in the log of @Voltra you see this large memory reported? Thanks!

in the last 4-5 rows

gi-man avatar Oct 03 '25 07:10 gi-man

@gi-man May I ask you, where in the log of @Voltra you see this large memory reported? Thanks!

in the last 4-5 rows

If I am not mistaken the max address space (vmpeak) is about 1.4GB and max used memory (vmhwm) is about 260MB. Is that really a problem with 8GB of RAM in the system?

1.464.600 kB => 1.46GB

In my fail-log the last 4 lines are this:

9,3604 [memory] after successful startup
    max address space (vmpeak):      3187080 kB
    cur address space (vmsize):      3186684 kB
    max used memory   (vmhwm ):       275656 kB
    cur used memory   (vmrss ):       275260 Kb

In the case that dt did start up just fine, the corresponding lines look so:

9,3626 [memory] after successful startup
    max address space (vmpeak):      3187120 kB
    cur address space (vmsize):      3186724 kB
    max used memory   (vmhwm ):       277232 kB
    cur used memory   (vmrss ):       276836 Kb

So, almost identical.

There are 64GB of RAM in the system, so I would guess this is not a problem.

armin-rc avatar Oct 03 '25 07:10 armin-rc

@Voltra I'm clueless with this issue. Your system has a total of 8Gb of physical ram, correct? In your last log, the amount of memory reported right before the last log entry is large. I don't remember what windows calls swap memory (maybe virtual), do you know how much you have?

I have 8GB on my system, and it indicates 15.7GB of virtual/swap memory

Voltra avatar Oct 03 '25 17:10 Voltra

I was able to run -d all and caught a failed start. I've also attached a proper start for reference.

darktable-fail log.txt

darktable-successful-log.txt

System is Window 11 on Ryzen 5 5600X 6-core processor, 16GB RAM and NVIDIA GeForce 3060X

Dave22152 avatar Oct 03 '25 23:10 Dave22152

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Dec 03 '25 00:12 github-actions[bot]

I still have no real clues on what causes this, but I created my own build and copied my library, database and other files into Appdata and the problem hasn't happened since. I'll update this issue if something changes.

Dave22152 avatar Dec 09 '25 23:12 Dave22152

My best guess is a data model change that didn't come with a migration for existing instances (or wasn't properly applied?)

Voltra avatar Dec 10 '25 01:12 Voltra

I’m sorry, I’m not sure I understand what you mean.

Dave22152 avatar Dec 10 '25 02:12 Dave22152