Newbie dartable problem/issue

I use RT. I’ve poked at DT a few times but I didn’t want a built in DAM. So I was interested in a recent thread that pointed out that one could dispense with the database by using the --library :memory: option.

So I installed DT 4.2.1 on my Windows 10 system.

If I click on the desktop shortcut created on installation, DT starts without issue. However if I try to start DT from the command line (or in a batch file) using something like “darktable filename”, DT doesn’t start. It will only start if I set “run as administrator” on the dartable exe file. But then I get a Windows popup asking “Do you want to allow this app from an unknown publisher to make changes to your device?” For various reasons this is not, in general, satisfactory. How can I avoid this issue?

I’m probably doing something stupid but it’s not obvious to me what it could be.

You need to use the full path to the darktable.exe file, probably something like C:\Program Files\darktable\bin\darktable.exe

Actually, I am. I was just trying to describe things as simply as possible.

I am calling DT from PhotoMechanic via a simple batch file that consists of a single line:

“C:\Program Files\darktable\bin\darktable.exe” %1 --library :memory:

This works if I set DT to run as administrator but not otherwise.

For comparison, here is the batch file I use for RT:

“C:\Program Files\RawTherapee\5.9\rawtherapee.exe” -R %1

This works without settibg RT to run as administrator.

I need to use batch files as it is the only way to set --library :memory: or -R.

Maybe set things to – configdir “path” to a separate config folder …two options DO this just to check if the creation of a temp database in memory with the memory option truly needs admin. If running it this way works without triggering admin it must be that the nature of the virtual temp database created by the memory option needs admin access…

Then you could proceed this way and just delete the folder whenever you don’t need it or empty the contents from time to time as needed… Note the dam in darktable is a relatively small database that only keeps the setting of the edits which are mirrored in the xmp files… its not going to really be a big issue to have it…

I altered the properties of the shortcut created by the darktable install, because lazy me likes to click an icon.

On the Shortcut tab, I changed the Target: field to
"C:\Program Files\darktable\bin\darktable.exe" --configdir "D:\someguy\Pictures\darktable\config" --library :memory:
(other than it’s not “someguy”)

I do not have to run it as administrator.

Maybe getting the config files outside the Appdata folder is the key to avoiding the scrutiny…

Well, I’m not making much progress.

If I navigate to the folder C:\Program Files\Camera Bits\Photo Mechanic Plus and run the command

 `C:\Program Files\Camera Bits\Photo Mechanic Plus>"C:\Program Files\darktable\bin\darktable.exe" "C:\Users\inbox\photos\tmp20230211\20230211-0086.orf" --library :memory:` 

it works as expected when darktable is not running as administrator.

I modified my batch file to:
echo %1 "C:\Program Files\darktable\bin\darktable.exe" %1 --library :memory: pause
so that I could see what’s going on.

When this batch file is fired by Photo Mechanic, I see the following in the cmd window:


C:\Program Files\Camera Bits\Photo Mechanic Plus>echo "C:\Users\inbox\photos\tmp20230211\20230211-0086.orf"
"C:\Users\inbox\photos\tmp20230211\20230211-0086.orf"

C:\Program Files\Camera Bits\Photo Mechanic Plus>"C:\Program Files\darktable\bin\darktable.exe" "C:\Users\inbox\photos\tmp20230211\20230211-0086.orf" --library :memory:

C:\Program Files\Camera Bits\Photo Mechanic Plus>pause
Press any key to continue . . .

But darktable doesn’t start. If I run as administrator, it does.

When I modify my batch file to

echo %1
"C:\Program Files\darktable\bin\darktable.exe" %1 --configdir "C:\photos\darktable\config" --library :memory:--library :memory: 
pause

then darktable crashes whether I run as administrator or not. (But I just defined that location. I did not move any configuration file there because I couldn’t find one.)

Here is the crash report:

this is darktable 4.2.1 reporting an exception:

-------------------

Error occurred on Saturday, March 11, 2023 at 16:00:02.

darktable.exe caused an Access Violation at location 00007FFE3E07F53E in module libdarktable.dll Writing to location 0000000000000000.

AddrPC           Params
00007FFE3E07F53E 00000227A40FA000 0000022700000000 0000000000000001  libdarktable.dll!dt_database_show_error+0x8e  [C:/msys64/home/bill/src/darktable-4.2.1/src/common/database.c @ 2724]
00007FFE3E0762AF 00007FFE00000003 00000227A40D33D0 0000000000000001  libdarktable.dll!dt_init+0x184f  [C:/msys64/home/bill/src/darktable-4.2.1/src/common/darktable.c @ 1060]
00007FF690EF2DC4 00007FFEAAF31270 00007FF690EF1660 0000000000000002  darktable.exe!main+0x294  [C:/msys64/home/bill/src/darktable-4.2.1/src/main.c @ 93]
00007FF690EF15B4 0000000000000012 00007FF690EF7090 00007FF690EF7058  darktable.exe!wmain+0x64  [C:/msys64/home/bill/src/darktable-4.2.1/src/win/main_wrapper.h @ 15]
00007FF690EF13DA 0000000000000000 0000000000000000 0000000000000000  darktable.exe!__tmainCRTStartup+0x25a  [C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c @ 326]
00007FF690EF1506 0000000000000000 0000000000000000 0000000000000000  darktable.exe!mainCRTStartup+0x16  [C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c @ 206]
00007FFEACC37614 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x14
00007FFEAD4C26A1 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x21

00007FF690EF0000-00007FF690F0F000 darktable.exe	4.2.1.0
00007FFEAD470000-00007FFEAD668000 ntdll.dll   	10.0.19041.2130
00007FFEACC20000-00007FFEACCDF000 KERNEL32.DLL	10.0.19041.2546
00007FFEAAB60000-00007FFEAAE32000 KERNELBASE.dll	10.0.19041.2546
00007FFEA80F0000-00007FFEA8180000 apphelp.dll 	10.0.19041.2546
00007FFE3F580000-00007FFE3FA14000 AcLayers.DLL	10.0.19041.1266
00007FFEABDD0000-00007FFEABE6E000 msvcrt.dll  	7.0.19041.546
00007FFEAB7E0000-00007FFEAB981000 USER32.dll  	10.0.19041.2486
00007FFEAB480000-00007FFEAB4A2000 win32u.dll  	10.0.19041.2604
00007FFEAB720000-00007FFEAB74B000 GDI32.dll   	10.0.19041.2130
00007FFEAB210000-00007FFEAB31F000 gdi32full.dll	10.0.19041.2604
00007FFEAB320000-00007FFEAB3BD000 msvcp_win.dll	10.0.19041.789
00007FFEAAE40000-00007FFEAAF40000 ucrtbase.dll	10.0.19041.789
00007FFEABB70000-00007FFEABBC5000 SHLWAPI.dll 	10.0.19041.2075
00007FFEABAC0000-00007FFEABB6E000 ADVAPI32.dll	10.0.19041.2130
00007FFEAB550000-00007FFEAB5EC000 sechost.dll 	10.0.19041.1865
00007FFEAC3F0000-00007FFEAC515000 RPCRT4.dll  	10.0.19041.2486
00000227A4090000-00000227A4093000 sfc.dll     	10.0.19041.2075
00007FFE9CEE0000-00007FFE9CF78000 WINSPOOL.DRV	10.0.19041.2311
00007FFE87D00000-00007FFE87D12000 sfc_os.DLL  	10.0.19041.2311
00007FFE9CAD0000-00007FFE9CAE1000 SortWindows61.dll	10.0.19041.1
00007FFEAB510000-00007FFEAB542000 IMM32.DLL   	10.0.19041.2193
00007FFE9CAA0000-00007FFE9CAC5000 libintl-8.dll	0.21.0.0
00007FFE3F430000-00007FFE3F580000 libglib-2.0-0.dll	2.74.0.0
00007FFEAB5F0000-00007FFEAB71A000 ole32.dll   	10.0.19041.1202
00007FFEAC780000-00007FFEACAD5000 combase.dll 	10.0.19041.2311
00007FFE3F310000-00007FFE3F428000 libiconv-2.dll	1.17.0.0
00007FFEACCE0000-00007FFEAD425000 SHELL32.dll 	10.0.19041.2546
00007FFEABA40000-00007FFEABAAB000 WS2_32.dll  	10.0.19041.546
00007FFE3E030000-00007FFE3E674000 libdarktable.dll
00007FFE85D50000-00007FFE85DB7000 libpcre2-8-0.dll
00007FFE9C300000-00007FFE9C32F000 libavif.dll
00007FFE3DE50000-00007FFE3DF06000 libcurl-4.dll	7.86.0.0
00007FFE3DF10000-00007FFE3E02C000 libcairo-2.dll
00007FFEAB1E0000-00007FFEAB207000 bcrypt.dll  	10.0.19041.2486
00007FFE8C460000-00007FFE8C4AA000 exchndl.dll 	0.9.8.0
00007FFEAAFD0000-00007FFEAB126000 CRYPT32.dll 	10.0.19041.2486
00007FFEAB4B0000-00007FFEAB506000 WLDAP32.dll 	10.0.19041.2006
00007FFE8BD80000-00007FFE8BDA2000 libgcc_s_seh-1.dll
00007FFE8BD50000-00007FFE8BD80000 libgdk_pixbuf-2.0-0.dll	2.42.10.0
00007FFE3DB30000-00007FFE3DE43000 libexiv2.dll
00007FFEABAB0000-00007FFEABAB8000 PSAPI.DLL   	10.0.19041.546
00007FFE3D9F0000-00007FFE3DB2E000 libgdk-3-0.dll	3.24.34.0
00007FFEABEE0000-00007FFEAC348000 SETUPAPI.dll	10.0.19041.2193
00007FFEA60B0000-00007FFEA60BF000 libgmodule-2.0-0.dll	2.74.0.0
00007FFEAB3C0000-00007FFEAB40E000 cfgmgr32.dll	10.0.19041.1620
00007FFE3D840000-00007FFE3D9E9000 libgio-2.0-0.dll	2.74.0.0
00007FFE7B860000-00007FFE7B8B8000 libgobject-2.0-0.dll	2.74.0.0
00007FFE85F70000-00007FFE85FB8000 libgomp-1.dll
00007FFE43DB0000-00007FFE43E3F000 libgphoto2-6.dll
00007FFE9C2E0000-00007FFE9C2F8000 libgphoto2_port-12.dll
00007FFE3D700000-00007FFE3D839000 libGraphicsMagick-3.dll
00007FFE3CF30000-00007FFE3CFD2000 libheif.dll
00007FFE3CC60000-00007FFE3CF27000 libicuin72.dll
00007FFE3CAA0000-00007FFE3CC60000 libicuuc72.dll
00007FFE79E10000-00007FFE79E6A000 libImath-3_1.dll
00007FFE3C9E0000-00007FFE3CA91000 libjpeg-8.dll
00007FFE87CB0000-00007FFE87CDC000 libjson-glib-1.0-0.dll
00007FFE3CFE0000-00007FFE3D6FA000 libgtk-3-0.dll	3.24.34.0
00007FFE3C6A0000-00007FFE3C9D2000 libjxl.dll
00007FFEA2A50000-00007FFEA2A5E000 libjxl_threads.dll
00007FFE77D00000-00007FFE77D4B000 lua54.dll
00007FFE79B50000-00007FFE79BBC000 liblcms2-2.dll
00007FFEACB40000-00007FFEACC1A000 comdlg32.dll	10.0.19041.1806
00007FFEAC6D0000-00007FFEAC77D000 shcore.dll  	10.0.19041.1865
00007FFE3C3A0000-00007FFE3C692000 libOpenEXR-3_1.dll
00007FFE77550000-00007FFE775C6000 libopenjp2-7.dll
00007FFE76200000-00007FFE76262000 libpango-1.0-0.dll	1.50.11.0
00007FFE9BCD0000-00007FFE9BCE8000 libpangocairo-1.0-0.dll	1.50.11.0
00007FFE77A20000-00007FFE77A61000 libpng16-16.dll
00007FFE93020000-00007FFE93037000 libwinpthread-1.dll	1.0.0.0
00007FFE75DC0000-00007FFE75E03000 libpugixml.dll	1.12.0.0
00007FFE730E0000-00007FFE73139000 libsecret-1-0.dll
00007FFE3BA00000-00007FFE3BA95000 libsoup-2.4-1.dll
00007FFE3B880000-00007FFE3B9F1000 libsqlite3-0.dll
00007FFE3B680000-00007FFE3B873000 libstdc++-6.dll
00007FFE3BAA0000-00007FFE3C394000 librsvg-2-2.dll
00007FFE3B5F0000-00007FFE3B67A000 libtiff-5.dll
00007FFE3B520000-00007FFE3B5EC000 libwebp-7.dll
00007FFE90060000-00007FFE90074000 libwebpmux-3.dll
00007FFE8C300000-00007FFE8C31F000 zlib1.dll
00007FFE3B3D0000-00007FFE3B511000 libxml2-2.dll
00007FFE3AAD0000-00007FFE3B3C9000 libaom.dll
00007FFE3A8E0000-00007FFE3AACA000 libdav1d.dll	6.6.0.0
00007FFE3A540000-00007FFE3A8DE000 rav1e.dll
00007FFE39A60000-00007FFE39B59000 libyuv.dll
00007FFE39B60000-00007FFE3A53D000 libSvtAv1Enc.dll
00007FFE9D380000-00007FFE9D387000 MSIMG32.dll 	10.0.19041.1466
00007FFE4FA30000-00007FFE4FA83000 libfontconfig-1.dll
00007FFE399A0000-00007FFE39A5E000 libfreetype-6.dll	2.12.1.0
00007FFE398F0000-00007FFE3999D000 libpixman-1-0.dll
00007FFE8C160000-00007FFE8C176000 libbrotlidec.dll
00007FFEA92D0000-00007FFEA92DA000 VERSION.dll 	10.0.19041.546
00007FFE39830000-00007FFE398EA000 mgwhelp.dll 	0.9.8.0
00007FFE4BE60000-00007FFE4BEA1000 libidn2-0.dll
00007FFE39580000-00007FFE39827000 libcrypto-1_1-x64.dll	1.1.1.17
00007FFE7F200000-00007FFE7F236000 libnghttp2.dll	1.50.0.0
00007FFE8C0D0000-00007FFE8C0EF000 libpsl-5.dll
00007FFE43A70000-00007FFE43AB8000 libssh2-1.dll
00007FFE394F0000-00007FFE3957A000 libssl-1_1-x64.dll	1.1.1.17
00007FFE39420000-00007FFE394EC000 libzstd.dll
00007FFEA5150000-00007FFEA52F5000 gdiplus.dll 	10.0.19041.2251
00007FFE79790000-00007FFE797C4000 libexpat-1.dll
00007FFEA85E0000-00007FFEA860F000 dwmapi.dll  	10.0.19041.746
00007FFEA92C0000-00007FFEA92CD000 HID.DLL     	10.0.19041.546
00007FFE8B830000-00007FFE8B841000 libcairo-gobject-2.dll
00007FFE9CF80000-00007FFE9CFA7000 WINMM.dll   	10.0.19041.546
00007FFE39270000-00007FFE3941F000 libepoxy-0.dll
00007FFE7A400000-00007FFE7A42C000 libfribidi-0.dll
00007FFE88180000-00007FFE8819D000 libpangowin32-1.0-0.dll	1.50.11.0
00007FFEA9F70000-00007FFEAA03B000 DNSAPI.dll  	10.0.19041.2546
00007FFEA9F30000-00007FFEA9F6B000 IPHLPAPI.DLL	10.0.19041.1865
00007FFE84D80000-00007FFE84D91000 libffi-8.dll
00007FFE3F2C0000-00007FFE3F30A000 libexif-12.dll
00007FFE7B840000-00007FFE7B858000 libltdl-7.dll
00007FFEA2050000-00007FFEA205D000 libsystre-0.dll
00007FFE79190000-00007FFE791AA000 libbz2-1.dll
00007FFE391B0000-00007FFE3926C000 libde265-0.dll
00007FFE37E50000-00007FFE391A2000 libx265.dll 	3.4.0.31
00007FFE37DA0000-00007FFE37E46000 libbrotlienc.dll
00007FFE78DF0000-00007FFE78E08000 libhwy.dll
00007FFE8CF00000-00007FFE8D19A000 COMCTL32.dll	6.10.19041.1110
00007FFE78D80000-00007FFE78DAD000 libatk-1.0-0.dll	2.38.0.0
00007FFE37C80000-00007FFE37D95000 libharfbuzz-0.dll
00007FFE928E0000-00007FFE928EE000 libIlmThread-3_1.dll
00007FFE37C10000-00007FFE37C71000 libIex-3_1.dll
00007FFE78C50000-00007FFE78C67000 libthai-0.dll
00007FFE78C30000-00007FFE78C4C000 libpangoft2-1.0-0.dll	1.50.11.0
00007FFE37AC0000-00007FFE37C03000 libgcrypt-20.dll	1.10.1.0
00007FFE78BD0000-00007FFE78BEB000 libdeflate.dll
00007FFE78B50000-00007FFE78B67000 libjbig-0.dll
00007FFEAAA20000-00007FFEAAA4E000 USERENV.dll 	10.0.19041.572
00007FFE379F0000-00007FFE37AB1000 libLerc.dll
00007FFE77CD0000-00007FFE77CFD000 liblzma-5.dll	5.2.7.0
00007FFE75D90000-00007FFE75DBD000 libbrotlicommon.dll
00007FFE349B0000-00007FFE3678B000 libicudt72.dll
00007FFE9D390000-00007FFE9D574000 dbghelp.dll 	10.0.19041.867
00007FFE37810000-00007FFE379EF000 libunistring-2.dll	1.0.0.0
00007FFE730C0000-00007FFE730DE000 libtre-5.dll
00007FFE68F20000-00007FFE68F39000 USP10.dll   	10.0.19041.546
00007FFE52C90000-00007FFE52CBD000 libgraphite2.dll
00007FFE92860000-00007FFE92870000 libdatrie-1.dll
00007FFE377D0000-00007FFE3780A000 libgpg-error-0.dll	1.46.0.0
00007FFEAA450000-00007FFEAA45C000 CRYPTBASE.DLL	10.0.19041.546
00007FFE9BA80000-00007FFE9BAB5000 dbgcore.DLL 	10.0.19041.2311
00007FFEAAF40000-00007FFEAAFC2000 bcryptPrimitives.dll	10.0.19041.2486
00007FFEABED0000-00007FFEABED8000 NSI.dll     	10.0.19041.610
00007FFEA9400000-00007FFEA9412000 kernel.appcore.dll	10.0.19041.546
00007FFEA8B20000-00007FFEA92B2000 windows.storage.dll	10.0.19041.2311
00007FFEAA4E0000-00007FFEAA510000 Wldp.dll    	10.0.19041.2546
00007FFEAA240000-00007FFEAA2AA000 mswsock.dll 	10.0.19041.546
00007FFEA2FE0000-00007FFEA30EC000 winhttp.dll 	10.0.19041.2193
00007FFE92FB0000-00007FFE92FB9000 KBDUS.DLL   	10.0.19041.546
00007FFEA81E0000-00007FFEA827E000 uxtheme.dll 	10.0.19041.2193
00007FFEABCB0000-00007FFEABDC5000 MSCTF.dll   	10.0.19041.2546
00007FFEABBE0000-00007FFEABCAD000 OLEAUT32.dll	10.0.19041.985
00007FFEAA830000-00007FFEAA85C000 DEVOBJ.dll  	10.0.19041.1620
00007FFEAB410000-00007FFEAB479000 WINTRUST.dll	10.0.19041.2546
00007FFEAA670000-00007FFEAA682000 MSASN1.dll  	10.0.19041.2251
00007FFEAB990000-00007FFEABA39000 clbcatq.dll 	2001.12.10941.16384
00007FFE8FF80000-00007FFE9002C000 TextShaping.dll
00007FFE946A0000-00007FFE94799000 textinputframework.dll	10.0.19041.2546
00007FFEA7E90000-00007FFEA7F82000 CoreMessaging.dll	10.0.19041.2193
00007FFEA7AE0000-00007FFEA7E3E000 CoreUIComponents.dll	10.0.19041.546
00007FFEA9C80000-00007FFEA9CB3000 ntmarta.dll 	10.0.19041.546
00007FFEA73C0000-00007FFEA7514000 wintypes.dll	10.0.19041.2311
00007FFEA48B0000-00007FFEA49A7000 AppXDeploymentClient.dll	10.0.19041.2546
00007FFEA2E80000-00007FFEA2F66000 Windows.ApplicationModel.dll	10.0.19041.1806
00007FFEA2C10000-00007FFEA2E10000 twinapi.appcore.dll	10.0.19041.1865
00007FFEA87C0000-00007FFEA88B6000 propsys.dll 	7.0.19041.1741
00007FFEAAAA0000-00007FFEAAABF000 profapi.dll 	10.0.19041.844
00007FFE9A610000-00007FFE9A638000 mssprxy.dll 	7.0.19041.2546
00007FFE9B980000-00007FFE9BA74000 mrmcorer.dll	10.0.19041.1566
00007FFE9E6B0000-00007FFE9E961000 iertutil.dll	11.0.19041.2130
00007FFE9BFC0000-00007FFE9BFD1000 windows.staterepositorycore.dll	10.0.19041.2193
00007FFE8B3B0000-00007FFE8B3DD000 bcp47mrm.dll	10.0.19041.1503
00007FFE8B6E0000-00007FFE8B821000 Windows.UI.dll	10.0.19041.746
00007FFE99C30000-00007FFE99CD1000 WindowManagementAPI.dll
00007FFE92E00000-00007FFE92F52000 InputHost.dll	10.0.19041.1741

Windows 10.0.19041.2546
DrMingw 0.9.8


Thanks for any insights

I see for some reason you are using the library memory switch 2x?? I am not sure what the interaction is… I would just run it with a configdir and empty that folder at the end or your session or occasionally… give up on the memory for now… clearly there is some interaction in that mode both with your permissions and the PM software…

We probably need to take a break from this for the time being. Where I’m currently at is that even if I reduce my batch file to the single line
"C:\Program Files\darktable\bin\darktable.exe",
that will only work if darktable is running as administrator when the batch file is launched by PhotoMechanic. If I just double click on the batch file, it works.

Therefore it looks as though there is something about how PhotoMechanic launches the batch file which gives rise to the problem. However, there is no problem with PhotoMechanic launching a batch file to run RawTherapee, an entirely parallel situation.

I will make some inquiries of PhotoMechanic and see if they have any comment.