Failed to save image to disk!

Hey,

Just purchased SGP, and im having issues capturing images!

I have an Altair 183c Pro TEC, using the latest ASCOM drivers.

From the logs i see the following. i have attached the full log for reference!

[09/20/19 21:28:32.267][DEBUG] [Sequence Thread] Auto guider has settled…
[09/20/19 21:28:32.270][DEBUG] [Sequence Thread] EventMarker 8 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:32.270][DEBUG] [Sequence Thread] EventMarker 9 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:32.270][DEBUG] [Sequence Thread] EventMarker 10 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:32.271][DEBUG] [Sequence Thread] Finished sending frame capture. Entering wait mode…
[09/20/19 21:28:32.271][DEBUG] [Sequence Thread] EventMarker 11 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:32.271][DEBUG] [Sequence Thread] EventMarker 12 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:32.277][DEBUG] [Camera Thread] SGM_CAMERA_CAPTURE message received…
[09/20/19 21:28:32.293][DEBUG] [Sequence Thread] EventMarker 13 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:32.301][DEBUG] [Camera Thread] SetAscomNormalSpeed…
[09/20/19 21:28:32.302][DEBUG] [Camera Thread] Cannot set readout speed, not supported by camera…
[09/20/19 21:28:32.465][DEBUG] [Main Thread] PopulateDataModel: Transferring view to the data model…
[09/20/19 21:28:32.486][DEBUG] [MF Update Thread] Performing serialize…
[09/20/19 21:28:42.542][DEBUG] [Sequence Thread] EventMarker 15 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:42.542][DEBUG] [Sequence Thread] Waking from exposure time sleep period…
[09/20/19 21:28:42.543][DEBUG] [Sequence Thread] Checking to see if the CCD has a temp…
[09/20/19 21:28:42.543][DEBUG] [Sequence Thread] Saving the CCD temp…
[09/20/19 21:28:42.561][DEBUG] [Sequence Thread] Entering super dangerous loop to await image completion…
[09/20/19 21:28:42.564][DEBUG] [Sequence Thread] EventMarker 16 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:44.870][DEBUG] [Camera Thread] ASCOM Camera Error : Unable to cast object of type ‘System.Int32[,]’ to type ‘System.UInt32[,]’.
at q9.ie(pk A_0, rj& A_1)
[09/20/19 21:28:44.871][DEBUG] [Camera Thread] Error while attempting to capture frame…
[09/20/19 21:28:44.889][DEBUG] [Camera Thread] Adding sequence level notification: Error attempting to capture image (see logs for more information).
[09/20/19 21:28:44.893][DEBUG] [Camera Thread] Sending Notification: Warning - Error attempting to capture image (see logs for more information).
[09/20/19 21:28:45.076][DEBUG] [Sequence Thread] EventMarker 17 - t:Target 2 (1); e:0; f:0; o:
[09/20/19 21:28:45.076][DEBUG] [Sequence Thread] Image reported as complete. Continuing…
[09/20/19 21:28:45.174][DEBUG] [Sequence Thread] Collecting FITs headers…
[09/20/19 21:28:45.226][DEBUG] [Sequence Thread] ASCOM Camera - Camera reports last image start time as: 2019-09-20T21:28:32 UTC
[09/20/19 21:28:45.226][DEBUG] [Sequence Thread] DATE-LOC time provided by camera…
[09/20/19 21:28:45.267][DEBUG] [Sequence Thread] GatherFitsHeaders: Writing header info from UI…
[09/20/19 21:28:45.272][DEBUG] [Sequence Thread] Clearing timed monitoring events…
[09/20/19 21:28:45.275][DEBUG] [Sequence Thread] Error saving ASCOM image. : Object reference not set to an instance of an object.
at q9.gs(pr A_0, List`1 A_1)
[09/20/19 21:28:45.275][DEBUG] [Sequence Thread] Failed to save image to disk!

Many thanks,
Will

sg_logfile_20190920212701.txt (156.2 KB)

@Will_Moverley

Have you made sure your camera drivers are the most recent version? There were some issues like this with earlier versions of the Altair ASCOM driver.

Hey @Ken thanks for the reply!

I’m using what i believe to be the latest yeh, (available on the Altair website), these are v1.4.118.0.

I have attached another log, i tried again just to capture a couple of 10s exposures… Camera works fine otherwise in other tools using native drivers!.

Cheers
Will

sg_logfile_20190924154314.txt (126.5 KB)

@Will_Moverley

So… in all the years SGPro has worked with ASCOM cameras, we have never had a camera return data to us like the Altair is doing now. The ASCOM docs don’t really specify what image data should look like. Because of this we have added code to convert this type of data into the expected type of data. This will take a little bit of extra time during the download process… not too much I suspect. Will be out in the next beta.

Fantastic @Ken, will look out for the next Beta release!

Cheers
Will

Hey @Ken

I have been chatting with Nick at Altair, and he has given me some info which may help you guys out. I think they are also keen to work direct with you, in order to get native support for the Altair cameras!

SGP is trying to treat the image as an array of unsigned integers whereas the Ascom standard requires it to be an array of signed integers (inasmuch as the ASCOM standard defines anything properly (!) ).

Here is the log line that identifies the problem

[09/20/19 21:28:44.870][DEBUG] [Camera Thread] ASCOM Camera Error : Unable to cast object of type �System.Int32[,]� to type �System.UInt32[,]�.
at q9.ie(pk A_0, rj& A_1)

The gobbledygook at the end indicates that the problem is occurring in SGP rather than in the ASCOM driver code. Also the fact that it’s got this far indicates that the images were captured successfully in the ASCOM driver. So it’s just a matter of interpretation of ASCOM according to their shifting standards. We encourage software vendors to use the Altair SDK preferably and would be happy to provide it. (Altair Astro)

Right, this is essentially what I meant in the post above… Altair may be right, but literally EVERY ASCOM driver in existence returns the image as an array of unsigned integers. This is not of much concern now… SGPro will officially support both.