Crash during 3PPA

Issue #1253 closed
krz created an issue

I’m constantly getting crashes when doing 3PPA with NINA 2.3 (starting for R005 to release version. Previously I was on R002 and never saw this issue).

Steps to Reproduce

  1. Start 3ppa
  2. Go through step 1 and 2
  3. On step three (3rd star) after taking exposure and beginning calculating of error, instead of usual freeze for 3-4 seconds, NINA just shows loading for 15-20 seconds and then a crash dialog box appear (don’t remember which, error happened, logs written)
  4. When I try to close crash dialog, a new one shows again

So you have to click 10-20 times when NINA closes itself or terminate via task manager

I tried to downgrade from 2.3 release to R005 (in the field that was not easy) but still had the same error. Unfortunate I don’t have distro of 2.2 to test

I did 3ppa 4-5 times and constantly got that error. After autofocus routine - error disappeared and I didn’t try 3ppa again.

023-09-21T21:37:39.4810|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form: 2023-09-21T21:37:38.8643|ERROR|App.xaml.cs|Current_DispatcherUnhandledException|212, skipping
2023-09-21T21:37:39.4810|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form: System.Runtime.InteropServices.COMException (0x88980406): UCEERR_RENDERTHREADFAILURE (Exception from HRESULT: 0x88980406), skipping
2023-09-21T21:37:39.4810|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Media.Composition.DUCE.Channel.SyncFlush(), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs), skipping
2023-09-21T21:37:39.4820|TRACE|NINALogMessageProcessor.cs|processLogMessages|42|log message is not regular form:    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), skipping

That kind of errors I can see in the logs

Expected behaviour

No crashes

Comments (23)

  1. Stefan B repo owner
    • changed status to open

    Hi - thanks for the report. This is most likely an issue with the graphics driver and the application being hardware accelerated. Please disable hardware acceleration in Options > General > Advanced, restart the application and see if the problem persists.

  2. krz reporter
    • changed status to open

    I got the same crash once again. Hardware acceleration was set to false. Initially I started 3PPA as usual, on the 3rd step app freezed a little bit, usually after a freeze I get a solution, but it didn't. Instead several crash dialogs appeared. After closing them NINA crashed.

  3. Stefan B repo owner

    Please make sure to update your drivers and system. Your windows Version 10.0.22000 is already end-of-life (if that is not an enterprise windows edition.) and leads me to believe that the system is not up-to-date driver wise in general.
    There are also lots of driver errors for your focuser too which might play a role.

  4. krz reporter

    I saw this also. However the issue happens only on the LAST step of 3ppa. I didn’t get any similar crashes during the night

  5. Stefan B repo owner

    The last step does some drawing on a canvas, which is using graphics. These most likely are reliant on graphics drivers. I have never encountered this issue on any of my machines.

  6. krz reporter

    Checked. Just curious why it is so random and why I didn’t observe it on 2.2 (never). I’ve updated windows and drivers and will check the issue on next clear skies, unfortunately that can happen in a few months.

  7. krz reporter

    @isbeorn I have an update as finally got clear skies.

    The exception I observe is

    2023-11-21T00:27:45.5280|ERROR|App.xaml.cs|Current_DispatcherUnhandledException|207|An unhandled exception has occurred of type System.Runtime.InteropServices.COMException
    2023-11-21T00:27:45.5280|ERROR|App.xaml.cs|Current_DispatcherUnhandledException|212
    System.Runtime.InteropServices.COMException (0x88980406): UCEERR_RENDERTHREADFAILURE (Exception from HRESULT: 0x88980406)
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
       at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    

    And that seems a WPF issue as you mentioned. However I got this only on 3rd stage of 3PPA. I observed that when this crash happens ASTAP continues endless loop of platesolving.

    Also worth mention that in the field I use a smartphone on portrait orientation with a remote desktop. Some googling said that that could be because of chaning resolutions, scales, etc and misusing of ui rendering/flushing.

    So, two new observations: this issue happens in the filed form a smartphone with RDP, astap never finishes. Hope this help

    PS. Previously I did some cargo-cult actions and error disappeared, but today it didn’t help. My assumption is that polar alignment error was too far away. Anyway I had to make a PHD pa routine

  8. Stefan B repo owner

    I’m using TPPA using remote desktop on my android all the time and it doesn’t have this problem either.

    There is really nothing I can do about, as this is a very generic error and can be caused by lots of things. So the new observation is identical to what we already know.

  9. Stefan B repo owner

    And it fails most likely only during the third step, as that is the step where the errors are visually drawn on the bitmap.

  10. krz reporter

    Stefan, when I’m using 3ppa from laptop I also don’t have any issues (for now). When using from smartphone - 50/50 I get it. Since remote desktop changes rendering resolution/aspect ratio, that could be the cause. Since resolution/aspect ratio is changed to match small smartphone screen, some drawings can be done outside of canvas/bitmap?

    Another point I’d like to pay attention to is that astap never finishes on 3rd step when error happens, I see that it periodically consumes 20% of CPU. What could be the cause of that?

  11. Stefan B repo owner

    Which remote client are you using on the smartphone and is it an android or an iphone? There were also some known problems with the iphone remote desktop client in the past. I’m switching between mutliple systems with the RDP client all the time and never encountered that problem. Drawing outside the boundaries of the image is also no issue at all for how the xaml is set up to do so.

  12. krz reporter

    3.0? No, it’s a bit complex to download builds in the field with 2g. But I’ll give it a try

  13. krz reporter

    Hey Stefan. After a long pause due to weather I got this issue again in the field. The same crash on the third step. I also tried platesolve3 without any luck. Latest NINA 3. Any hints? How can I simulate 3ppa at home to reproduce the issue?

  14. Log in to comment