ghilios / joko.nina.plugins

NINA Plugins
Mozilla Public License 2.0
10 stars 2 forks source link

Crash at the end of autofocus #3

Open cedric-r opened 2 years ago

cedric-r commented 2 years ago

Hello,

I tried running the aberration inspector. If I click on "run auto focus", it always crashes at the end of the autofocus:

2022-05-06T01:53:22.7594|INFO|PHD2Guider.cs|StopGuiding|666|Phd2 - Stop Guiding skipped, as the app is already in state Stopped 2022-05-06T01:53:22.7904|INFO|FilterWheelVM.cs|ChangeFilter|102|Moving to Filter Luminance at Position 0 2022-05-06T01:53:36.2187|INFO|AutoFocusEngine.cs|StartBlindFocusPoints|683|Waiting on initial HFR analysis 2022-05-06T01:53:36.2197|INFO|FocuserVM.cs|MoveFocuserInternal|201|Moving Focuser to position 122226 2022-05-06T01:53:46.8534|INFO|CameraVM.cs|Capture|729|Starting Exposure - Exposure Time: 15s; Filter: Luminance; Gain: -1; Offset -1; Binning: 1x1; 2022-05-06T01:54:05.6680|INFO|FocuserVM.cs|MoveFocuserInternal|201|Moving Focuser to position 114226 2022-05-06T01:54:07.7957|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 5.77830389721131, HFR σ: 0.450225443693986, Detected Stars 9 2022-05-06T01:54:08.0685|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 8.16417252123266, HFR σ: 3.9100207863965, Detected Stars 2 2022-05-06T01:54:08.3234|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 5.64334747672186, HFR σ: 0.470133475420263, Detected Stars 3 2022-05-06T01:54:09.0329|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 3.92798012115621, HFR σ: 2.77696031230066, Detected Stars 2 2022-05-06T01:54:09.2168|INFO|CameraVM.cs|Capture|729|Starting Exposure - Exposure Time: 15s; Filter: Luminance; Gain: -1; Offset -1; Binning: 1x1; 2022-05-06T01:54:28.1146|INFO|AutoFocusEngine.cs|StartBlindFocusPoints|711|Waiting on initial focuser move analyses 2022-05-06T01:54:30.2313|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.76415717787691, HFR σ: 0.352820456477046, Detected Stars 11 2022-05-06T01:54:30.5501|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 5.48872462856787, HFR σ: 4.20571809359434, Detected Stars 3 2022-05-06T01:54:30.7829|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.82794490414819, HFR σ: 0.358652604278293, Detected Stars 3 2022-05-06T01:54:31.5384|INFO|FocuserVM.cs|MoveFocuserInternal|201|Moving Focuser to position 106226 2022-05-06T01:54:35.4368|INFO|CameraVM.cs|Capture|729|Starting Exposure - Exposure Time: 15s; Filter: Luminance; Gain: -1; Offset -1; Binning: 1x1; 2022-05-06T01:54:54.4906|INFO|AutoFocusEngine.cs|StartBlindFocusPoints|784|Waiting on next left movement analysis 2022-05-06T01:54:56.5983|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 3.99702382477853, HFR σ: 0.398464229170592, Detected Stars 16 2022-05-06T01:54:56.8661|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 3.70817006485174, HFR σ: 0.309402422591303, Detected Stars 4 2022-05-06T01:54:57.0979|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.24959720821008, HFR σ: 0.177240043183867, Detected Stars 3 2022-05-06T01:54:57.5547|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 3.14009243227271, HFR σ: 1.83569448150034, Detected Stars 2 2022-05-06T01:54:57.8375|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 3.92261251396711, HFR σ: 0.498282075827654, Detected Stars 2 2022-05-06T01:54:57.8405|INFO|FocuserVM.cs|MoveFocuserInternal|201|Moving Focuser to position 98226 2022-05-06T01:55:01.1952|INFO|CameraVM.cs|Capture|729|Starting Exposure - Exposure Time: 15s; Filter: Luminance; Gain: -1; Offset -1; Binning: 1x1; 2022-05-06T01:55:20.1952|INFO|AutoFocusEngine.cs|StartBlindFocusPoints|784|Waiting on next left movement analysis 2022-05-06T01:55:21.0757|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.10263812480147, HFR σ: 0.504352056052347, Detected Stars 2 2022-05-06T01:55:21.8732|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.59074138257157, HFR σ: 0.0395192935608273, Detected Stars 2 2022-05-06T01:55:22.0960|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 3.9384147935103, HFR σ: 0.386892859978175, Detected Stars 3 2022-05-06T01:55:23.5761|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.50447680798946, HFR σ: 0.219593739321286, Detected Stars 11 2022-05-06T01:55:23.5781|INFO|AutoFocusEngine.cs|StartBlindFocusPoints|755|Enough right trend points (2) with an established minimum (106226) to queue remaining left focus points down to 90226 2022-05-06T01:55:23.5801|INFO|FocuserVM.cs|MoveFocuserInternal|201|Moving Focuser to position 90226 2022-05-06T01:55:27.6463|INFO|CameraVM.cs|Capture|729|Starting Exposure - Exposure Time: 15s; Filter: Luminance; Gain: -1; Offset -1; Binning: 1x1; 2022-05-06T01:55:46.7169|INFO|AutoFocusEngine.cs|StartBlindFocusPoints|810|Waiting on remaining AutoFocus analysis tasks 2022-05-06T01:55:48.3409|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 5.11403944841268, HFR σ: 0.241423102735832, Detected Stars 3 2022-05-06T01:55:48.5927|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.25379186667942, HFR σ: 0.402435412556402, Detected Stars 3 2022-05-06T01:55:50.0538|INFO|HocusFocusStarDetection.cs|Detect|363|Average HFR: 4.91327716048346, HFR σ: 0.303946446526769, Detected Stars 11 2022-05-06T01:55:50.0578|ERROR|AutoFocusEngine.cs|RunImpl|1163|Failure during AutoFocus System.NullReferenceException: Object reference not set to an instance of an object. at NINA.Joko.Plugins.HocusFocus.AutoFocus.AutoFocusEngine.d31.MoveNext() in C:\Users\ghili\src\nina.plugins\Joko.NINA.Plugins\Joko.NINA.Plugins.HocusFocus\AutoFocus\AutoFocusEngine.cs:line 1002 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at NINA.Joko.Plugins.HocusFocus.AutoFocus.AutoFocusEngine.d27.MoveNext() in C:\Users\ghili\src\nina.plugins\Joko.NINA.Plugins\Joko.NINA.Plugins.HocusFocus\AutoFocus\AutoFocusEngine.cs:line 871 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at NINA.Joko.Plugins.HocusFocus.AutoFocus.AutoFocusEngine.d__37.MoveNext() in C:\Users\ghili\src\nina.plugins\Joko.NINA.Plugins\Joko.NINA.Plugins.HocusFocus\AutoFocus\AutoFocusEngine.cs:line 1153 2022-05-06T01:55:50.0758|WARNING|AutoFocusEngine.cs|PerformPostAutoFocusActions|927|AutoFocus did not complete successfully, so restoring the focuser position to 106226 2022-05-06T01:55:50.0778|INFO|FocuserVM.cs|MoveFocuserInternal|201|Moving Focuser to position 106226 2022-05-06T01:55:58.1668|INFO|FilterWheelVM.cs|ChangeFilter|102|Moving to Filter Red at Position 2 2022-05-06T01:56:03.3388|ERROR|InspectorVM.cs|AnalyzeAutoFocusResult|274|Inspection analysis failed, due to failed AutoFocus

ghilios commented 2 years ago

Cedric, this is a weird one. Can you share a screenshot of your autofocus settings in Options -> AutoFocus? (not the Hocus Focus options). I'm wondering if your AF fitting type includes trends

cedric-r commented 2 years ago

I'll send you a screenshot ASAP, but I definitively don't use trends.