v4.1.10609 bug report

Discussions, Bug Reports and Issues related to Beta versions of SharpCap
Post Reply
celkins
Posts: 130
Joined: Fri Apr 20, 2018 10:58 pm

v4.1.10609 bug report

#1

Post by celkins »

Robin,
somewhat strange, but now happened a few times: after running a live-stack for several minutes, I paused it, then closed the pane: I then get the fatal error report popping up, but when I hit <send & quit> everything appears to carry on normally...

This appears to be the relevant bit of log:

Code: Select all

Debug   23:32:16.635509 #35 Starting ZWO Exposure of 60000ms                                                                                        in bool SharpCap.Cameras.ASI.ASICameraProxy.StartExposure()
Info    23:32:56.619836 #1  Live stacking paused :                                                                                                  in void SharpCap.FrameTransforms.LiveStacking.StackingParameters.Pause(PauseType type, string reason)
Info    23:33:11.259822 #1  Selecting transform None                                                                                                in void SharpCap.Models.Transforms.set_SelectedTransform(ITransform value)
Info    23:33:11.264985 #1  Initializing FitsFileWriter at 5496x3672x3x0bits, RGB, 4 bytes per PEL for ZWO ASI183MC Pro                             in void SharpCap.Base.FileWriters.FileWriterBase.Initialize(IFileNameProvider fnp, ColourSpaceId colourSpaceId, int width, int height, int bytesPerPixelElement, int significantBitDepth, int colourPlanes, string DeviceName)
Debug   23:33:11.330702 #1  Creating directory D:\carl\SkyShots\NGC6047\ZWO ASI183MC Pro_Light\processed\AutoSave for capture files                 in string SharpCap.Base.FileWriters.TemplatedFilenameProvider.GenerateFilenameAndDirectory(FrameInfo frameInfo, bool createDir)
Warning 23:33:11.467895 #1  Writing 32 bit frame, calculated bit depth of 22, but data indicates only 18                                            in object SharpCap.Base.FileWriters.FitsFileWriter.ReshapeArray(IReadOnlyList<int> rawData)
Debug   23:33:13.365613 #1  Notification (Status=OK): Stack autosaved to D:\carl\SkyShots\NGC6047\ZWO ASI183MC Pro_Light\processed\AutoSave\NGC6047_LPS-D2_2023-05-21T21_55_53ZStack_32bits_36frames_G0_2160s.fits                  in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Info    23:33:13.367746 #1  Initializing FitsFileWriter at 5496x3672x3x0bits, RGB, 2 bytes per PEL for ZWO ASI183MC Pro                             in void SharpCap.Base.FileWriters.FileWriterBase.Initialize(IFileNameProvider fnp, ColourSpaceId colourSpaceId, int width, int height, int bytesPerPixelElement, int significantBitDepth, int colourPlanes, string DeviceName)
Debug   23:33:14.090534 #1  Notification (Status=OK): Stack autosaved to D:\carl\SkyShots\NGC6047\ZWO ASI183MC Pro_Light\processed\AutoSave\NGC6047_LPS-D2_2023-05-21T21_55_53ZStack_16bits_36frames_G0_2160s.fits                  in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Info    23:33:14.514084 #1  Live stacking closed.                                                                                                   in void SharpCap.FrameTransforms.LiveStacking.LiveStackTransform.SetActive(bool isActive)
Info    23:33:14.515033 #1  Guiding Connection state changed to False                                                                               in void SharpCap.Base.Guiding.GuidingBase.set_IsConnected(bool value)
Info    23:33:14.515959 #1  Disconnected from PHD2                                                                                                  in bool SharpCap.Base.Guiding.Phd2Api.DisconnectImpl()
Info    23:33:14.516183 #1  Guiding SettleState changed to Unknown                                                                                  in void SharpCap.Base.Guiding.GuidingBase.set_SettleState(SettleState value)
Info    23:33:14.516444 #1  Guiding GuideState changed to Stopped                                                                                   in void SharpCap.Base.Guiding.GuidingBase.set_State(GuideState value)
Info    23:33:15.517096 #1  Guiding GuideState changed to Unknown                                                                                   in void SharpCap.Base.Guiding.GuidingBase.set_State(GuideState value)
Warning 23:33:16.935011 #2  TaskScheduler Unobserved Task exception event recevied for System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The I/O operation has been aborted because of either a thread exit or an application request.)
 ---> System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
   --- End of inner exception stack trace ---, Observed=False           in void SharpCap.BugReporting.TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
Warning 23:33:16.943693 #33 Exception Preprocessing on System.AggregateException 'A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The I/O operation has been aborted because of either a thread exit or an application request.)' : Exception of type 'AggregateException' : A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The I/O operation has been aborted because of either a thread exit or an application request.) 
Stack Trace:                  in Exception SharpCap.BugReporting.PreprocessException(Exception arg)
Warning 23:33:16.943942 #33 Inner Exception : System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
   at void System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at static System.Threading.Tasks.ValueTask<TResult>+ValueTaskSourceAsTask()+(object state) => { }              in Exception SharpCap.BugReporting.PreprocessException(Exception arg)
Info    23:33:16.947996 #33 Missing stack trace on exception of type System.AggregateException A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The I/O operation has been aborted because of either a thread exit or an application request.)               in void SharpCap.BugReporting.FixTargetSite(Exception arg)
Warning 23:33:16.956664 #33 Creating bug report due to exception :  : Exception of type 'AggregateException' : A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The I/O operation has been aborted because of either a thread exit or an application request.) ()                in void SharpCap.BugReporting.SettingsOnProcessingException(Exception arg1, Report report)
Warning 23:33:16.956731 #33 Inner Exception : System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
   at void System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at static System.Threading.Tasks.ValueTask<TResult>+ValueTaskSourceAsTask()+(object state) => { }              in void SharpCap.BugReporting.SettingsOnProcessingException(Exception arg1, Report report)
Warning 23:33:17.053471 #33 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]
Debug   23:33:17.300433 #35 Finished ZWO Exposure of 60000ms, gotFrame = True                                                                       in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
Debug   23:33:17.301279 #35 Starting ZWO Exposure of 60000ms                                                                                        in bool SharpCap.Cameras.ASI.ASICameraProxy.StartExposure()
Debug   23:33:21.281425 #1  Started void SharpCap.ViewModels.CaptureProfileControlViewModel.Load(string selectedProfile)                            in void SharpCap.ViewModels.CaptureProfileControlViewModel.Load(string selectedProfile)
Info    23:33:21.301116 #1  Loading capture profile Default (ZWO ASI183MC Pro)                                                                      in List<string> SharpCap.Models.Camera.LoadCaptureProfileWithErrorInfo(string profileName)
Debug   23:33:21.348357 #1  Ended void SharpCap.ViewModels.CaptureProfileControlViewModel.Load(string selectedProfile)                              in void SharpCap.ViewModels.CaptureProfileControlViewModel.Load(string selectedProfile)
Debug   23:33:21.850795 #35 Finished ZWO Exposure of 60000ms, gotFrame = True                                                                       in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
Debug   23:33:21.851624 #35 Starting ZWO Exposure of 4000ms                                                                                         in bool SharpCap.Cameras.ASI.ASICameraProxy.StartExposure()
Debug   23:33:26.526840 #35 Finished ZWO Exposure of 4000ms, gotFrame = True                                                                        in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
It seems to be fairly repeatable, and happens with both instances that I have running.
Doesn't stop me imaging, but it is somewhat disconcerting

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

Re: v4.1.10609 bug report

#2

Post by admin »

Hi Carl,

that's useful info. I discovered yesterday that there was an issue with the bug reporting in the last couple of versions (including 10609) that could well be responsible for it not closing. The issue was certainly stopping the reports from being sent :(

I have seen a couple of reports similar to this one before, but not yet managed to track down the cause (because the error that is created eventually happens somewhere else in the code to the problem that causes it). In fact the error comes from generic networking code.

The error *could* be coming from an ASCOM driver that is not handling errors in network communication properly - if you are using any ASCOM drivers that connect to the device over the network rather than USB or serial, then please let me know which ones and what versions.

It's also possible that it could come from the PHD2 code in SharpCap, although I've been through it 2 or 3 times now and can't work out how it could go wrong in the way shown in the log.

If you are finding it is relatively repeatable then I would be grateful if you could experiment with not connecting to any networked hardware or not connecting to PHD2 to see if either change makes the problem go away.

thanks,

Robin
celkins
Posts: 130
Joined: Fri Apr 20, 2018 10:58 pm

Re: v4.1.10609 bug report

#3

Post by celkins »

I do usually use PHD (latest beta/dev release), and the ASCOM remote server (Version 6.6.8048.20286) to allow SkySafari Pro 7.1.9 (1088) to connect for planetarium use. The mount is driven by the ASCOM Celestron Mount Server (Chris xxx @ 7.1.7350)

No PHD, no ASCOM remote...
Not the best of nights for testing, due to cloud rolling in as the sky darkened after 10pm, so only got one run on M101 before being clouded out, but following my normal procedure there was no error generated, so your hunch looks good so far...

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

Re: v4.1.10609 bug report

#4

Post by admin »

Hi Carl,

I think I will focus on checking out the Celestron Mount Server software as I think that is the most likely candidate.

Do you have a download link or web page for it, since I struggled. I did find something that *might* be it, but with version 6.1.7350 (link on this page : https://www.cloudynights.com/topic/8140 ... for-ascom/)

cheers,

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: v4.1.10609 bug report

#5

Post by admin »

Hi,

further update - I looked at the Celestron driver and at ASCOM Remote and there was nothing there that looked likely to cause the issue.

That made me go back and look at the PHD2 code again, and I found an issue if PHD2 closes while SharpCap is connected to it that may be the problem you are seeing. If that is the right issue then I think I have a fix.

If you can make the problem happen by closing PHD2 when SharpCap has connected to it then we are on the right track.

cheers,

Robin
celkins
Posts: 130
Joined: Fri Apr 20, 2018 10:58 pm

Re: v4.1.10609 bug report

#6

Post by celkins »

Robin,
when you say PHD closes, are you meaning closes as in the App quits? If so, that's not part of my workflow.
In most cases, I either leave PHD guiding, if I'm pausing to re-focus, or I go back to looping in PHD, when moving to a new target.

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

Re: v4.1.10609 bug report

#7

Post by admin »

Hi Carl,

well I managed to break things by closing PHD, but if there is some other thing that causes the communication with PHD to drop from the PHD end then that would probably also have the same effect. Closing PHD certainly produced an error that was related to the network socked being accessed after it had failed, so that may be the same as the one you were seeing.

cheers,

Robin
MarMax
Posts: 105
Joined: Sun Sep 19, 2021 11:43 pm

Re: v4.1.10609 bug report

#8

Post by MarMax »

I also had a strange thing happen with v4.1.10609.0 on 5/18/2023. The log is attached but I'm not sure if the crash was logged. I was live stacking with PHD2 guiding and all of a sudden SharpCap just disappeared. No crash window or reporting window appeared. The log is attached.

It's been really crappy conditions in Southern California with a marine layer / low clouds all the time. I was attempting to get some stacking done in between the worst of the clouds so PHD2 was losing and recovering its guide lock. I don't know if this had anything to do with the crash.

EDITED to add that PHD2 worked fine the whole time, even after SharpCap stopped it was still working.
Attachments
Log_2023-05-18T20_53_23-2424.log
(494.46 KiB) Downloaded 29 times
User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: v4.1.10609 bug report

#9

Post by admin »

Hi,

yes, I think that last log is definitely the bug I was seeing - the last lines in the log are

Code: Select all

Warning	22:09:31.969386	#8 	Connection to PHD2 lost					
Info   	22:09:31.969516	#8 	Guiding SettleState changed to Unknown	
Info   	22:09:31.969660	#8 	Guiding Connection state changed to False
It was the lost connection to PHD that wasn't being handled correctly. I think in the previous version (4.0) I got away with the failure to cleanup properly on lost connection, but with some of the updates done in 4.1 it becomes a fatal error.

This particular issue is now fixed for the next update. I hope that the original issue at the top of the thread is also resolved, but cannot be sure yet.

cheers,

Robin
Post Reply