SharpCap is slow to open.

Somewhere to ask questions about the best way to use SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
jamie
Posts: 10
Joined: Thu Aug 22, 2019 7:50 pm

SharpCap is slow to open.

#1

Post by jamie »

Hi,

I work in an optics lab where we use SharCap, but from behind a very tight firewall. When opening SharpCap it tries to reach out for a license update list. This results in us having to wait for it to timeout resulting in SharpCap taking too long to open.

Error: 14:38:34.7696726 Thread:#1 SharpCap.LicenseUpdateList.DownloadComplete(Object sender, DownloadStringCompletedEventArgs downloadStringCompletedEventArgs) :: Exception from Downloading license update list : Unable to connect to the remote server

Is there a workaround for this?

Cheers
User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: SharpCap is slow to open.

#2

Post by admin »

Hi,

That's odd – that particular web request is run asynchronously, so although it's initialised during the start-up it shouldn't slow things down if the Internet is not available or firewalled at that point (in theory). I suppose it might be that some part of the request happens before the code goes asynchronous – for instant looking up the IP address for the server name or opening the initial connection.

From your end you could try putting an entry in your hosts file to point downloads.sharpcap.co.uk to localhost (127.0.0.1), which should cause the request to fail rapidly on the assumption that you don't have a Web server running on your lab machine.

Could you please also post the full log just so I can get a better picture of what's going on. It might be that I may need to take more steps to make sure that this request really is asynchronous.

Cheers, Robin
jamie
Posts: 10
Joined: Thu Aug 22, 2019 7:50 pm

Re: SharpCap is slow to open.

#3

Post by jamie »

Hi,

Thanks for the quick response. Good idea about the hostfile, however, it didn't resolve the problem. The logs state that it now gets a 404 so it obviously plugged that hole indicating that perhaps something else is an issue. The timestamps in the log below suggest that nothing is slow as they run 10:12:22 - 10:12:24, however, I timed it (crudely) and it took ~84secs to start. I started it dead on 10:11:00 also, so either the log timestamps are fishy or the problem occurs before any logged event. For this reason, I tried the 64bit version, in case it was an OS issue, however, this too resolved nothing. Are you sure the 64b v3.2.6086.0 installer is actually 64b, as the installer ended up dumping it in "C:\Program Files (x86)\SharpCap 3.2 (64 bit)"?

Here's the log (32b version):
Info: 10:12:22.3828983 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: SharpCap Version 3.2.6086.0
Info: 10:12:22.3828983 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: GC Memory 118Mb
Info: 10:12:22.3828983 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: Process Memory 161Mb
Info: 10:12:22.3828983 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: Total Physical Memory 32712Mb
Info: 10:12:22.3828983 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: Available Physical Memory 26862Mb
Info: 10:12:22.3828983 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: Operating System : Microsoft Windows NT 6.1.7601 Service Pack 1
Debug: 10:12:22.4328983 Thread:#1 SharpCap.UI.SharpCapForm..ctor() :: Started
Info: 10:12:22.4728984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type BaslerDeviceEnumerator
Info: 10:12:22.4728984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type QHYDeviceEnumerator
Info: 10:12:22.4728984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type ASIDeviceEnumerator
Info: 10:12:22.4728984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type AltairDeviceEnumerator
Info: 10:12:22.4928984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type PointGreyDeviceEnumerator
Info: 10:12:22.4928984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type SxDeviceEnumerator
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.Altair.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.ASCOMCamera.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.ASI.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.Basler.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.Celestron.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.DS3.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.Fake.dll
Info: 10:12:22.5028984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.INova.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.Moravian.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.NewDirectShow.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.PointGrey.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.QHY.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.SVBony.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.Base.InterfaceFactory`2.ScanDll(String filename) :: Probing for camera providers : C:\Program Files (x86)\SharpCap 3.2\SharpCap.Cameras.SX.dll
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvidersByReflection(String[] providerNames) :: Added device enumerator of type CelestronDeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvidersByReflection(String[] providerNames) :: Added device enumerator of type iNovaDeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type MoravianDeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type SVBonyDeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type DS3DeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type AscomDeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type FolderMonitorDeviceEnumerator
Info: 10:12:22.5128984 Thread:#1 SharpCap.MultiCaptureProvider.AddProvider() :: Added device enumerator of type FakeDeviceEnumerator
Info: 10:12:22.5828985 Thread:#1 SharpCap.ProxyFinder`1.LoadProxiesForFactoryType(Type t) :: Loading Hardware Proxies from SharpCap.WheelProxy.ASCOM.WheelFactory
Error: 10:12:22.5928985 Thread:#1 SharpCap.ProxyFinder`1.AvailableDevices(IFactory`1 ff) :: Exception of type FileNotFoundException from Failed to Fetch available devices from proxy factory : Could not load file or assembly 'ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7' or one of its dependencies. The system cannot find the file specified.
Stack Trace: at SharpCap.WheelProxy.ASCOM.WheelFactory.GetAvailableDevices()
at SharpCap.ProxyFinder`1.AvailableDevices(IFactory`1 ff) in C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Utils\ProxyFinder.cs:line 83
Info: 10:12:22.6028986 Thread:#1 SharpCap.ProxyFinder`1.LoadProxiesForFactoryType(Type t) :: Loading Hardware Proxies from SharpCap.WheelProxy.ZWO.WheelFactory
Info: 10:12:22.6128986 Thread:#1 SharpCap.ProxyFinder`1.LoadProxiesForFactoryType(Type t) :: Loading Hardware Proxies from SharpCap.WheelProxy.ZWO.ManualWheelFactory
Info: 10:12:22.6128986 Thread:#1 SharpCap.ProxyFinder`1.LoadProxiesForFactoryType(Type t) :: Found device Manual Filter Wheel
Warning: 10:12:22.6228986 Thread:#1 SharpCap.FocuserFinder.TryLoadFocuserProxy(FileInfo fi) :: Exception of type TargetInvocationException from Failed to loaded FocuserProxy assembly Sharpcap.FocuserProxy.ASCOM.dll because : Exception has been thrown by the target of an invocation. : Exception has been thrown by the target of an invocation.
Stack Trace: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at SharpCap.FocuserFinder.LoadFocusers(Type t) in C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Utils\FocuserFinder.cs:line 116
at SharpCap.FocuserFinder.TryLoadFocuserProxy(FileInfo fi) in C:\Documents\Source Code\SharpCap3.2\src\SharpCap\Utils\FocuserFinder.cs:line 99
Warning: 10:12:22.6228986 Thread:#1 SharpCap.Base.Utilities.Logger.Warn(Exception e, String action, String additionalInfo, Boolean stackTrace) :: Inner Exception : System.IO.FileNotFoundException: Could not load file or assembly 'ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7' or one of its dependencies. The system cannot find the file specified.
File name: 'ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7'
at Sharpcap.FocuserProxy.ASCOM.Factory..ctor()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Warning: 10:12:22.6328986 Thread:#1 SharpCap.ProxyFinder`1.TryLoadProxy(FileInfo fi) :: Exception from Failed to loaded Hardware Proxy assembly SharpCap.MountProxy.ASCOM.dll because : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Info: 10:12:22.9528991 Thread:#1 SharpCap.Base.Utilities.Logger.LogStackTrace(LogLevel level, String msg) :: Parent being changed on PreviewPanel
at SharpCap.UI.ScrollZoomForm.OnParentChanged(Object sender, EventArgs eventArgs)

Debug: 10:12:23.2428995 Thread:#1 SharpCap.UI.SharpCapForm..ctor() :: Ended
Debug: 10:12:23.3228996 Thread:#1 SharpCap.UI.SharpCapForm.SharpCapForm_Load(Object sender, EventArgs e) :: Started
Info: 10:12:23.5659057 Thread:LogInfo Thread#7 SharpCap.LogSystemInfo.ThreadProc() :: CPU : Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz with 12 cores.
Debug: 10:12:23.6179086 Thread:#1 SharpCap.UI.SharpCapForm.SharpCapForm_Load(Object sender, EventArgs e) :: Ended
Debug: 10:12:23.6399099 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Started
Debug: 10:12:23.6679115 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Timebomb checked
Info: 10:12:23.6899128 Thread:#1 SharpCap.Models.Application.get_Cameras() :: Starting scan for cameras
Debug: 10:12:23.6929129 Thread:#1 SharpCap.Cameras.Basler.BaslerDeviceEnumerator.GetDevices() :: Started
Info: 10:12:23.6969132 Thread:#1 SharpCap.SharpCapApp.get_ForceSoftwareRendering() :: WPF Rendering tier is 0
Debug: 10:12:23.7109140 Thread:#1 SharpCap.Cameras.Basler.BaslerDeviceEnumerator.GetDevices() :: Ended
Info: 10:12:23.8819237 Thread:#1 SharpCap.Base.SimpleDeviceEnumerator.GetDevices(Func`1 deviceNameFinder, String infoText, Func`2 fullNameToDispayName, Func`3 tagCreatorFunc) :: QHYCameraFinder - found 0 cameras
Info: 10:12:24.0339324 Thread:#1 SharpCap.Base.SimpleDeviceEnumerator.GetDevices(Func`1 deviceNameFinder, String infoText, Func`2 fullNameToDispayName, Func`3 tagCreatorFunc) :: Found ZWO ASI178MM(1)
Info: 10:12:24.0339324 Thread:#1 SharpCap.Base.SimpleDeviceEnumerator.GetDevices(Func`1 deviceNameFinder, String infoText, Func`2 fullNameToDispayName, Func`3 tagCreatorFunc) :: Found ZWO ASI178MM(2)
Info: 10:12:24.0339324 Thread:#1 SharpCap.Base.SimpleDeviceEnumerator.GetDevices(Func`1 deviceNameFinder, String infoText, Func`2 fullNameToDispayName, Func`3 tagCreatorFunc) :: FindCameras - found 2 cameras
Info: 10:12:24.0349325 Thread:#1 SharpCap.MultiCaptureProvider+<GetDevicesFromEnumerator>d__20.MoveNext() :: Detected Camera: ZWO ASI178MM(1) (ZWO ASI Cameras)
Info: 10:12:24.0349325 Thread:#1 SharpCap.MultiCaptureProvider+<GetDevicesFromEnumerator>d__20.MoveNext() :: Detected Camera: ZWO ASI178MM(2) (ZWO ASI Cameras)
Warning: 10:12:24.5459617 Thread:#1 SharpCap.MultiCaptureProvider+<GetDevicesFromEnumerator>d__20.MoveNext() :: Exception from fetching menu items from provider : ASCOM Cameras : Could not load file or assembly 'ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7' or one of its dependencies. The system cannot find the file specified.
Info: 10:12:24.5459617 Thread:#1 SharpCap.MultiCaptureProvider+<GetDevicesFromEnumerator>d__20.MoveNext() :: Detected Camera: Folder Monitor Camera (Virtual Cameras)
Debug: 10:12:24.5469618 Thread:#1 SharpCap.Cameras.Fake.FakeDeviceEnumerator.GetDevices() :: Started
Debug: 10:12:24.5469618 Thread:#1 SharpCap.Cameras.Fake.FakeDeviceEnumerator.GetDevices() :: Ended
Info: 10:12:24.5469618 Thread:#1 SharpCap.MultiCaptureProvider+<GetDevicesFromEnumerator>d__20.MoveNext() :: Detected Camera: Test Camera 1 (Deep Sky) (Test Cameras)
Info: 10:12:24.5479618 Thread:#1 SharpCap.MultiCaptureProvider+<GetDevicesFromEnumerator>d__20.MoveNext() :: Detected Camera: Test Camera 2 (High Speed) (Test Cameras)
Info: 10:12:24.5739633 Thread:#1 SharpCap.ViewModels.SharpCapViewModel.appModel_OnCaptureEvent(Object sender, CaptureEventArgs e) :: CameraListUpdated event received in UI thread
Debug: 10:12:24.6379670 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Docking setup
Debug: 10:12:24.6389670 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Startup scripts (if any) run
Debug: 10:12:24.6399671 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Menu updated
Debug: 10:12:24.6919701 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Splash and tips done
Debug: 10:12:24.7549737 Thread:#1 SharpCap.UI.SharpCapForm.SharpCap_Shown(Object sender, EventArgs e) :: Ended
Error: 10:12:24.7569738 Thread:#1 SharpCap.LicenseUpdateList.DownloadComplete(Object sender, DownloadStringCompletedEventArgs downloadStringCompletedEventArgs) :: Exception from Downloading license update list : The remote server returned an error: (404) Not Found.
jamie
Posts: 10
Joined: Thu Aug 22, 2019 7:50 pm

Re: SharpCap is slow to open.

#4

Post by jamie »

I should add, it's also quite possible that the issue is with our system and not your software.
User avatar
turfpit
Posts: 1783
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: SharpCap is slow to open.

#5

Post by turfpit »

Jamie

Is your situation

1) SC slow to open when Windows has just been started.
or
2) SC slow to open when Windows has been started previously.

If I switch on my capture laptop (i3, 8Gb memory) and try to start Sharpcap as soon as possible, then I get a 'wait' message which does clear after a minute or so. I usually start the laptop and do some other setup task before attempting to start Sharpcap. My capture laptop has no internet connection when imaging.

Dave
jamie
Posts: 10
Joined: Thu Aug 22, 2019 7:50 pm

Re: SharpCap is slow to open.

#6

Post by jamie »

Hi Dave,

2) SC slow to open when Windows has been started previously.

Everything is slow when an OS first starts.

Cheers,
Jamie
jamie
Posts: 10
Joined: Thu Aug 22, 2019 7:50 pm

Re: SharpCap is slow to open.

#7

Post by jamie »

I installed both 32b & 64b versions of 3.2 on a windows 10 box. Both startup within a normal amount of time ~1-2s. The 64b version is still being installed into the 32b dir Program Files (x86) - perhaps a symptom of some other issue.

The firewalled box I was having an issue with is Windows 7.
User avatar
turfpit
Posts: 1783
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: SharpCap is slow to open.

#8

Post by turfpit »

Jamie

I have just installed SC 3.2.6086 64-bit on a Win 10 Pro box, it went in x86. There is nothing wrong with my machine and I spent 30 years supporting operating systems.

Robin: we may have a bug!

SC-64bit-install.JPG
SC-64bit-install.JPG (41.27 KiB) Viewed 2674 times
Out of interest, you could try installing AltairCapture and see where it lands. I have it installed and it is in the Program Files folder.
Download here http://cameras.altairastro.com/. Either way it will tell us something.

As for Windows 7, it goes end of life early 2020. Life gets harder after that.

Dave
User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: SharpCap is slow to open.

#9

Post by admin »

Hi,

Thanks for the log file – I've just got back from a break so have only just had a chance to look at it. The timestamps on the log file should be fine so it seems that about 82 seconds are elapsing between you double-clicking the application and the first log event.

This means that the delay seems to be happening during a very early part of the application start-up sequence. There are two things that I can suggest that might be worth trying – the first is to investigate any antivirus software that you are running as antivirus software is notorious for causing errors that seem like they should never occur to happen. In this case it may be performing a deep scan of some of the code that SharpCap is loading every time.

The other option is to hold down the control and shift keys while starting SharpCap – this enables debugging the early-stage loading of the application before the log is available by showing message boxes that you need to click okay on. If there is a long delay between two of the message boxes then let me know which two and I can investigate further as to what is happening in that part of the code.

Hope this helps, Robin
User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: SharpCap is slow to open.

#10

Post by admin »

Actually, it may be best to press control and shift keys immediately after double-click on the application. If that's hard to get working then you can also achieve the same effect by adding the/debuglaunch parameter when running SharpCap from the command line.

Cheers, Robin
Post Reply