Hi Freddie and William,
I just ran “dumpbin /imports” on ARC_Instrument_x64.dll on our system. I have appended the output. It uses the following DLLs:
KERNEL32.dll
USER32.dll
ADVAPI32.dll
SETUPAPI.dll
FTD2XX.dll
MSVCR100.dll
MSVCP100.dll
I think all of these are standard Windows DLLs except FTD2XX.dll. That comes with LightField, but it probably also comes with other packages, since it is a third party FTDI library. I suspect the problem is that it
is finding an incompatible version of that library.
Mark
W:\Program Files\Princeton Instruments\LightField>dumpbin /imports ARC_Instrument_x64.dll
Microsoft (R) COFF/PE Dumper Version 14.00.24215.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file ARC_Instrument_x64.dll
File Type: DLL
Section contains the following imports:
KERNEL32.dll
18009F060 Import Address Table
1800C0FC0 Import Name Table
0 time date stamp
0 Index of first forwarder reference
433 SetCommState
18B GetCommTimeouts
434 SetCommTimeouts
4C0 Sleep
534 WriteFile
42 CancelIo
29A GetTickCount
F2 EnterCriticalSection
33B LeaveCriticalSection
2EA InitializeCriticalSection
9E CreateMutexW
3FD ReleaseMutex
27E GetSystemTime
346 LocalAlloc
34A LocalFree
D2 DeleteCriticalSection
B4 CreateThread
412 ResetEvent
168 FreeLibrary
18A GetCommState
24C GetProcAddress
CB DecodePointer
4CE TerminateProcess
EE EncodePointer
4BC SetupComm
85 CreateEventW
3C3 ReadFile
251 GetProcessHeap
2DC HeapSize
508 WaitForSingleObject
8F CreateFileW
52 CloseHandle
2DA HeapReAlloc
2D7 HeapFree
2D3 HeapAlloc
2D6 HeapDestroy
2EB InitializeCriticalSectionAndSpinCount
3B4 RaiseException
280 GetSystemTimeAsFileTime
1C7 GetCurrentProcessId
1CB GetCurrentThreadId
3A9 QueryPerformanceCounter
418 RtlCaptureContext
41F RtlLookupFunctionEntry
426 RtlVirtualUnwind
302 IsDebuggerPresent
4B3 SetUnhandledExceptionFilter
4E2 UnhandledExceptionFilter
1C6 GetCurrentProcess
208 GetLastError
153 FindResourceExW
154 FindResourceW
4BF SizeofResource
356 LockResource
343 LoadResource
33E LoadLibraryA
369 MultiByteToWideChar
USER32.dll
18009F4D8 Import Address Table
1800C1438 Import Name Table
0 time date stamp
0 Index of first forwarder reference
AF DispatchMessageW
220 MsgWaitForMultipleObjects
2E7 ShowWindow
6E CreateWindowExW
251 RegisterClassExW
9C DefWindowProcW
256 RegisterDeviceNotificationW
304 TranslateMessage
237 PeekMessageW
ADVAPI32.dll
18009F000 Import Address Table
1800C0F60 Import Name Table
0 time date stamp
0 Index of first forwarder reference
230 RegCloseKey
26E RegQueryValueExW
SETUPAPI.dll
18009F480 Import Address Table
1800C13E0 Import Name Table
0 time date stamp
0 Index of first forwarder reference
143 SetupDiEnumDeviceInterfaces
16B SetupDiGetDeviceInstanceIdW
142 SetupDiEnumDeviceInfo
193 SetupDiOpenDevRegKey
13F SetupDiDestroyDeviceInfoList
57 CM_Get_Device_IDW
62 CM_Get_Device_ID_Size
82 CM_Get_Parent
16E SetupDiGetDeviceInterfaceDetailW
156 SetupDiGetClassDevsW
FTD2XX.dll
18009F018 Import Address Table
1800C0F78 Import Name Table
0 time date stamp
0 Index of first forwarder reference
Ordinal 2
Ordinal 4
Ordinal 31
Ordinal 27
Ordinal 28
Ordinal 40
Ordinal 39
Ordinal 32
MSVCR100.dll
18009F2B0 Import Address Table
1800C1210 Import Name Table
0 time date stamp
0 Index of first forwarder reference
EE ?_type_info_dtor_internal_method@type_info@@QEAAXXZ
146 __crt_debugger_hook
5A8 memcmp
10E _CxxThrowException
11F __CppXcptFilter
19E _amsg_exit
1F2 _encoded_null
287 _initterm_e
286 _initterm
307 _malloc_crt
39D _onexit
2F6 _lock
148 __dllonexit
45B _unlock
11E __C_specific_handler
100 ?terminate@@YAXXZ
5B3 printf
548 exit
600 towupper
621 wcsrchr
5A9 memcpy
62C wcstoul
539 atol
302 _ltoa_s
59E malloc
563 free
57D isdigit
5EB strtod
612 wcschr
10A ?what@exception@std@@UEBAPEBDXZ
538 atoi
5EA strstr
5DB strcpy_s
78 ??_U@YAPEAX_K@Z
63 ??2@YAPEAX_K@Z
24 ??0exception@std@@QEAA@AEBV01@@Z
5AB memmove
5D ??1exception@std@@UEAA@XZ
22 ??0exception@std@@QEAA@AEBQEBD@Z
60B vswprintf_s
47B _vscwprintf
58F iswspace
625 wcsstr
61F wcsnlen
4AC _wcslwr_s
5AC memmove_s
631 wmemcpy_s
5AA memcpy_s
65 ??3@YAXPEAX@Z
128 __CxxFrameHandler3
140 __clean_type_info_names_internal
5AD memset
530 asin
5CA sin
543 cos
4A6 _wcsicmp
53E ceil
MSVCP100.dll
18009F230 Import Address Table
1800C1190 Import Name Table
0 time date stamp
0 Index of first forwarder reference
19E ?_Decref@facet@locale@std@@QEAAPEAV123@XZ
9E ??1_Lockit@std@@QEAA@XZ
60 ??0_Lockit@std@@QEAA@H@Z
251 ?_Orphan_all@_Container_base0@std@@QEAAXXZ
36B ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z
59C ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z
10F ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z
391 ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ
5C5 ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z
253 ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ
5C8 ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z
28C ?_Xlength_error@std@@YAXPEBD@Z
60D ?uncaught_exception@std@@YA_NXZ
2A7 ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A
28E ?_Xout_of_range@std@@YAXPEBD@Z
Summary
24000 .data
3000 .pdata
27000 .rdata
1000 .reloc
1000 .rsrc
9E000 .text
From: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Sent: Wednesday, April 12, 2023 5:12 PM
To: William Kirstaedter <kirstaedter at fhi-berlin.mpg.de>; Mark Rivers <rivers at cars.uchicago.edu>; tech-talk at aps.anl.gov
Subject: RE: areadetector on windows, xml2 done, now Lightfield
Hi William,
lightfield may load it dynamically at runtime then (like areadetector) and so it will not show up in dependencywalker. Loading ARC_Instrument_x64.dll itself into dependencywalker may be most useful then, one possible
cause of the problem you are seeing is that ARC_Instrument_x64.dll is loading an incompatible dependent library when activated by EPICS and dependencywalker will show the dependent libraries it uses and may give some clues to this.
One difference between running LightfieldApp.exe directly and loading the library via areadetector is that the directory containing the LightfieldApp.exe program will automatically get added as the first place to look
for any DLL dependencies of ARC_Instrument_x64.dll. Is the lightfield directory already in PATH? If not, one thing to try first is to edit your start_epics.bat so after running dllPath.bat it then does
set “PATH=%LIGHTFIELD_ROOT%;%PATH%”
so the directory that contains lightfield.exe is searched first for any DLL dependencies
Regards,
Freddie
Hey Freddie, I think I might need some guidance on this.
I loaded my IOCs LightfieldApp.exe and also the Princeton.Lightfield.exe (this does not load anything ?!) in dependencywalker, but none of them seems to load the ARC_...dll.
is there a better way than loading and scrolling through the list to search for my ARC.dll?
it wasnt obvious :(
thanks,
Am 28.03.2023 um 01:02 schrieb Freddie Akeroyd - STFC UKRI:
Hi,
In other situations I have seen DLL load errors caused by a dependency of the DLL in question not being found i.e. ARC_Instrument_x64.dll may be present in the right place but one of the DLLs it
depends on (and is located via the PATH environment variable) might be either not found or an old/incorrect version of this required file was installed by another program which happens to be earlier in PATH and so is picked up instead. Programs like dependency
walker https://www.dependencywalker.com/ can help locate such clashes if that is the problem
Regards,
Freddie
Hi William,
I am trying to understand why you get that missing DLL error.
Can run the camera OK using LightField as a stand-alone application without EPICS?
Do you have more than one version of LightField installed?
ADLightField does not call that DLL explicitly, it just starts LightField in this line:
https://github.com/areaDetector/ADLightField/blob/3383118260b82d95255f303d673e04d4de0123c9/lightFieldApp/src/LightField.cpp#L410
The missing DLL is ARC_Instrument_x64.dll. I have attached a screen shot showing the size and location of that file on my system. What do you see on your system?
Mark