ADV formats capture Error

A place to report problems and bugs in 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

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
Huoz
Posts: 6
Joined: Tue May 07, 2024 1:01 pm

ADV formats capture Error

#1

Post by Huoz »

I encountered an error while recording an ADV file using Sharpcap. After the Error, no ADV file has been found in file.
"SharpCap has encountered an error and is attempting to stop your capture before closing."

SharpCap version: 4.1.12151.0 (64-bit)
Camera: QHY5III568M
Operating system version: Windows10 22H2
SharpCap log:
SharpCap.ViewModels.Actions.StartCaptureAction.ShowCaptureLengthDialogAsync()
Info 21:00:00.542834 #1 About to run the capture : LimitType = Unlimited, LimitCount = 100, LimitTime = 00:01:00 SequenceCount = 1, SequenceInterval = 300 in async Task SharpCap.ViewModels.Actions.StartCaptureAction.ShowCaptureLengthDialogAsync()
Debug 21:00:00.569033 #1 Started async Task SharpCap.Models.Camera.RunCaptureAsync(CancellationToken cancellationToken) in async Task SharpCap.Models.Camera.RunCaptureAsync(CancellationToken cancellationToken)
Debug 21:00:00.569924 #1 Started void SharpCap.Models.Camera.RunCaptureImpl() in void SharpCap.Models.Camera.RunCaptureImpl()
Info 21:00:00.570293 #1 Run capture on MultiCaptureProvider in bool SharpCap.MultiCaptureProvider.RunCapture(int? frameCountLimit)
Info 21:00:00.570735 #1 Started bool SharpCap.Base.CaptureProviderBase<T>.RunCapture(int? frameCountLimit) in bool SharpCap.Base.CaptureProviderBase<T>.RunCapture(int? frameCountLimit)
Info 21:00:00.571885 #1 Initializing AdvFileWriter at 2472x2064x1x8bits, Mono, 1 bytes per PEL for QHY5III568M in void SharpCap.Base.FileWriters.FileWriterBase.Initialize(IFileNameProvider fnp, ColourSpaceId colourSpaceId, int width, int height, int bytesPerPixelElement, int significantBitDepth, int colourPlanes, string DeviceName)
Debug 21:00:00.572937 #1 Started void SharpCap.Base.BaseImageProvider.OnStartCapture(IColourSpace colourSpaceControl, Size sz, int? frameCountLimit) in void SharpCap.Base.BaseImageProvider.OnStartCapture(IColourSpace colourSpaceControl, Size sz, int? frameCountLimit)
Debug 21:00:00.575809 #1 Ended void SharpCap.Base.BaseImageProvider.OnStartCapture(IColourSpace colourSpaceControl, Size sz, int? frameCountLimit) in void SharpCap.Base.BaseImageProvider.OnStartCapture(IColourSpace colourSpaceControl, Size sz, int? frameCountLimit)
Info 21:00:00.575956 #1 Capture Event : StartCapture in void SharpCap.MultiCaptureProvider.SendCaptureEvent(object sender, CaptureEventArgs e)
Info 21:00:00.576255 #1 StartCapture event received in UI thread in async void SharpCap.ViewModels.SharpCapViewModel.appModel_OnCaptureEvent(object sender, CaptureEventArgs e)
Info 21:00:00.579395 #12 =='Capture Write Thread' (New Thread)
Debug 21:00:00.579406 #12 Started void SharpCap.Base.BaseImageProvider.RunWriteThread() in void SharpCap.Base.BaseImageProvider.RunWriteThread()
Info 21:00:00.579824 #1 Ended bool SharpCap.Base.CaptureProviderBase<T>.RunCapture(int? frameCountLimit) in bool SharpCap.Base.CaptureProviderBase<T>.RunCapture(int? frameCountLimit)
Info 21:00:00.591343 #1 Toolbar/Menu input : SharpCap.ViewModels.Actions.StartCaptureAction complete in async Task SharpCap.ViewModels.UIAction.ExecuteAsync()
Error 21:00:00.727788 #12 Writing frame : Exception of type 'ArgumentException' : This tag name as been already added.
Stack Trace: at int Adv.AdvRecorder+AdvStatusSectionConfig.AddDefineTag(string tagName, Adv2TagType tagType) in C:/Documents/Source Code/ADVLib/AdvRecorder_V2.cs:line 195
at void SharpCap.Base.FileWriters.AdvFileWriter.BeforeWriteFirstFrame(FrameInfo frameInfo) in C:/Documents/Source Code/SharpCap/src/SharpCap.Base/FileWriters/AdvFileWriter.cs:line 156
at void SharpCap.Base.FileWriters.FileWriterBase.WriteFrame(FrameReference frame) in C:/Documents/Source Code/SharpCap/src/SharpCap.Base/FileWriters/FileWriterBase.cs:line 172
at void SharpCap.Base.BaseImageProvider.RunWriteThread() in C:/Documents/Source Code/SharpCap/src/SharpCap.Base/BaseImageProvider.cs:line 310 in void SharpCap.Base.BaseImageProvider.RunWriteThread()
Warning 21:00:00.733932 #12 AppDomain Unhandled exception event recevied for System.ArgumentException: This tag name as been already added.
at Adv.AdvRecorder.AdvStatusSectionConfig.AddDefineTag(String tagName, Adv2TagType tagType) in C:\Documents\Source Code\ADVLib\AdvRecorder_V2.cs:line 195
at SharpCap.Base.FileWriters.AdvFileWriter.BeforeWriteFirstFrame(FrameInfo frameInfo) in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\FileWriters\AdvFileWriter.cs:line 156
at SharpCap.Base.FileWriters.FileWriterBase.WriteFrame(FrameReference frame) in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\FileWriters\FileWriterBase.cs:line 172
at SharpCap.Base.BaseImageProvider.RunWriteThread() in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\BaseImageProvider.cs:line 310
at SharpCap.Base.BaseImageProvider.CaptureWriteThreadProc() in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\BaseImageProvider.cs:line 242
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state), Terminating=True in void SharpCap.BugReporting.CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
Warning 21:00:00.738063 #12 Starting error processing on : Exception of type 'ArgumentException' : This tag name as been already added. () in bool SharpCap.BugReporting.ShouldReportException(Exception exception)
Info 21:00:00.739133 #12 Considering if the error needs to be reported : System.ArgumentException("This tag name as been already added.") in bool SharpCap.BugReporting.WorkOutIfWeShouldReport(Exception exception)
Info 21:00:00.750486 #12 Checking to see if error 'This tag name as been already added.' is caused by ASCOM drivers or other third party code. in bool SharpCap.NonReportableExceptions.HandleThirdPartyException(Exception e, IApplication app)
Info 21:00:00.755934 #12 Error needs to be reported : 'This tag name as been already added.' of type System.ArgumentException at at Adv.AdvRecorder.AdvStatusSectionConfig.AddDefineTag(String tagName, Adv2TagType tagType) in C:\Documents\Source Code\ADVLib\AdvRecorder_V2.cs:line 195 at SharpCap.Base.FileWriters.AdvFileWriter.BeforeWriteFirstFrame(FrameInfo frameInfo) in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\FileWriters\AdvFileWriter.cs:line 156 at SharpCap.Base.FileWriters.FileWriterBase.WriteFrame(FrameReference frame) in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\FileWriters\FileWriterBase.cs:line 172 at SharpCap.Base.BaseImageProvider.RunWriteThread() in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\BaseImageProvider.cs:line 310 at SharpCap.Base.BaseImageProvider.CaptureWriteThreadProc() in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\BaseImageProvider.cs:line 242 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in bool SharpCap.BugReporting.ShouldReportException(Exception exception)
Warning 21:00:00.756993 #12 Exception Preprocessing on System.ArgumentException 'This tag name as been already added.' : Exception of type 'ArgumentException' : This tag name as been already added. () in Exception SharpCap.BugReporting.PreprocessException(Exception arg)
Warning 21:00:00.761837 #12 Creating bug report due to exception : : Exception of type 'ArgumentException' : This tag name as been already added. () in void SharpCap.BugReporting.SettingsOnProcessingException(Exception arg1, Report report)
Warning 21:00:00.792468 #12 Assembly Microsoft.GeneratedCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null loaded more than once in void SharpCap.Program.CurrentDomainOnAssemblyLoad(object sender, AssemblyLoadEventArgs assemblyLoadEventArgs)+(string s, Assembly a) => { } [1]
Info 21:00:02.876809 #12 Trying to stop capture cleanly before shutting down in void SharpCap.Models.Application.BeforeErrorShutdown()
Debug 21:00:02.877987 #1 Notification (Status=Error): SharpCap has encountered an error and is attempting to stop your capture before closing. in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Info 21:00:02.883281 #12 Stopping capture on MultiCaptureProvider in bool
Huoz
Posts: 6
Joined: Tue May 07, 2024 1:01 pm

Re: ADV formats capture Error

#2

Post by Huoz »

Additionally, I was able to record ADV files before upgrading(4.1.11433), but the files did not include exposure time and gain information for each frame, so I decided to upgrade :?
User avatar
admin
Site Admin
Posts: 13563
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: ADV formats capture Error

#3

Post by admin »

Hi,

can you save a few frames to SER and send me the camera settings file that gets created please? Those settings should be the same as the ones that cause the crash in ADV. I have just tested with a QHY camera here and see no problems with creating an ADV file, so I think it will be something specific to the camera features available, the settings chosen or perhaps the other hardware connected. The error message seems to suggest that there is some duplicated metadata being added, but no indication of what metadata, so I need to find that out.

thanks,

Robin
Huoz
Posts: 6
Joined: Tue May 07, 2024 1:01 pm

Re: ADV formats capture Error

#4

Post by Huoz »

This is the camera settings file in SER format. After that, I kept the same settings for recording in ADV format, but the above error still persists.
Attachments
16_05_43.CameraSettings.txt
(1.84 KiB) Downloaded 16 times
Huoz
Posts: 6
Joined: Tue May 07, 2024 1:01 pm

Re: ADV formats capture Error

#5

Post by Huoz »

Another interesting question: I want to recognize QHY cameras as USB 2.0 in Sharpcap, but this requires some operation (USB 3.0 sometimes becomes USB 2.0 when inserted slowly). A few months ago (or possibly at the end of last year), I tried qhy678m and succeeded because I wanted it to be a guiding star camera and occupy as little CPU as possible. However, recently it has not been possible to plug and unplug it, while ZWO camera still can (asi290mm), perhaps fixed with a bug? I actually hope to keep the bugs identified as USB 2.0, after all, this way I don't have to look for non compliant cables to force their bandwidth to 2.0. :D
User avatar
admin
Site Admin
Posts: 13563
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: ADV formats capture Error

#6

Post by admin »

Hi,

thanks for the data - I think I have identified the ADV problem now due to a change I introduced in 4.1.12151 - I have a fix for the next update.

There's no way in software that I know of to force the camera to run in USB 2 mode - the easiest options are either to use a USB2 cable if the camera has the standard blue USB 3 socket. You can also connect a short USB2 extension cable in at the PC end or use a USB2 hub - any of these will limit the camera to USB2 operation.

cheers,

Robin
Huoz
Posts: 6
Joined: Tue May 07, 2024 1:01 pm

Re: ADV formats capture Error

#7

Post by Huoz »

Thank you, and looking forward to solving this problem. I found that reverting back to version 4.1.12128.0 can correctly record ADV files.
Post Reply