EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: RE: areadetector on windows, xml2 done, now Lightfield
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: William Kirstaedter <kirstaedter at fhi-berlin.mpg.de>, Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 13 Apr 2023 21:20:08 +0000

Hi William and Freddie,

 

I just looked at 2 of our ADLightField installations that are working fine.  One is using LightField 6.13.1 and the other is 6.15.1.  You are using 6.14.1, so it works for us with versions that are both older and newer than yours.  So I think my previous suggestion of replacing the 3 DLLs in ADLightField/lightFieldApp/src is incorrect.  We have the old 6.4.1 DLLs in that directory, but ADLightField works fine with recent versions of LightField.  We are not using a 2017 version of LightField as I previously said.

 

One of my colleagues thinks he remembers that when installing LightField there was an option to do a “complete” install, or something like that.  He recalls that if we did not do the complete install then LightField worked, but the Automation (e.g. ADLightField) did not.

 

LightField comes with Automation executable examples.  Do those work?

 

Mark

 

 

From: Mark Rivers
Sent: Thursday, April 13, 2023 7:07 AM
To: William Kirstaedter <kirstaedter at fhi-berlin.mpg.de>; Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>; tech-talk at aps.anl.gov
Subject: Re: areadetector on windows, xml2 done, now Lightfield

 

Hi William and Freddie,

 

I suspect the problem may be because of the 3 DLLs that are supplied with ADLightField in ADLightField/lightFieldApp/src.

 

We are currently running with LightField 6.4.1, we have not updated since 2017.  Those DLLs have this commit message:

 

corvette:ADLightField/lightFieldApp/src>git log *.dll

commit a73344c230df9478b9186c9f9b1e15354eed5e06

Author: Mark Rivers <rivers at cars.uchicago.edu>

Date:   Thu Nov 30 11:52:41 2017 -0600

 

    New versions of DLL from Lightfield 6.4.1

 

The reason those DLLs are provided with ADLightField is explained in ADLightField/iocs/lightFieldIOC/lightFieldApp/src/Makefile which contains this:

 

PROD_NAME = LightFieldApp

ifeq (windows-x64, $(findstring windows-x64, $(T_A)))

  ifeq ($(STATIC_BUILD), NO)

    PROD_IOC += $(PROD_NAME)

    # Note: Normally it is sufficient to have DLLs in the PATH environment.

    # However, LightField won't start unless the DLLs are in the same directory as this application

    # The DLLs need to be in the ADLightField/lightFieldApp/src directory or the library won't build

    # so we install them into the bin directory from there.

    BIN_INSTALLS += $(ADLIGHTFIELD)/lightFieldApp/src/PrincetonInstruments.LightField.AutomationV4.dll

    BIN_INSTALLS += $(ADLIGHTFIELD)/lightFieldApp/src/PrincetonInstruments.LightFieldAddInSupportServices.dll

    BIN_INSTALLS += $(ADLIGHTFIELD)/lightFieldApp/src/PrincetonInstruments.LightFieldViewV4.dll

  endif

endif

 

I suggest you make a fresh install of ADLightField and then replace those 3 DLLs with the versions from your much more recent LightField installation.

 

Mark

 

 


From: William Kirstaedter
Sent: Thursday, April 13, 2023 3:44 AM
To: Mark Rivers; Freddie Akeroyd - STFC UKRI; tech-talk at aps.anl.gov
Subject: Re: areadetector on windows, xml2 done, now Lightfield

 

Hey,

unfortunately still no progress :(

dependencywalker reports the same as your dumpbin command.

I set the LIGHTFIELD ROOT into PATH as Freddie suggested, but still no success.

I copied the ARC dll and the FTXX.dll into my IOCs bin folder next to the LightfieldApp.exe.

Still no success, error message still the same.

I also tried upgrading the Automation dll etc from V4 to V5 and rebuild the IOC - same Behaviour. :(

I have no idea what to try next, honestly.
I can try to ask Princeton but I dont expect much, tbh.
Also I could try with the newest version of Lightfield, 6.16 instead of my currently installed 6.14.

But thats it so far I think...

William Kirstaedter (PP&B)

Fritz-Haber-Institut der MPG

Faradayweg 4-6

14195 Berlin

Tel: 030 8413 5405

Mail: kirstaedter at fhi-berlin.mpg.de

Am 13.04.2023 um 00:29 schrieb Mark Rivers:

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

 

From: William Kirstaedter <kirstaedter at fhi-berlin.mpg.de>
Sent: 12 April 2023 16:23
To: Akeroyd, Freddie (STFC,RAL,ISIS) <freddie.akeroyd at stfc.ac.uk>; Mark Rivers <rivers at cars.uchicago.edu>; tech-talk at aps.anl.gov
Subject: Re: areadetector on windows, xml2 done, now Lightfield

 

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,

William Kirstaedter (PP&B)

Fritz-Haber-Institut der MPG

Faradayweg 4-6

14195 Berlin

Tel: 030 8413 5405

Mail: kirstaedter at fhi-berlin.mpg.de

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

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Mark Rivers via Tech-talk
Sent: 27 March 2023 23:21
To: William Kirstaedter <kirstaedter at fhi-berlin.mpg.de>; tech-talk <tech-talk at aps.anl.gov>
Subject: RE: areadetector on windows, xml2 done, now Lightfield

 

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

 


References:
Re: areadetector on windows, xml2 done, now Lightfield Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Is the Sequencer and SNL still widely used? Pete Jemian via Tech-talk
Next: RE: modbus ioc start Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: areadetector on windows, xml2 done, now Lightfield Mark Rivers via Tech-talk
Next: Request for support: Error reading data in Epics Controls while modifying project Grzegorz Lak via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 13 Apr 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·