Hi @KarhuKoti-5578 ,
I’ve collected some information that can help provide more detail on this and give some insight on ways to troubleshoot errors like these.
As you’ve already mentioned, the “moapplication_hang_cffffff”, “hang_activation” or “hang_quiesce” errors are indeed too low-level to extract meaningful information out of. These particular errors could be occurring due to a wide variety of issues, and unexpected behaviors in managed code could propagate and only manifest themselves as these errors we are seeing being logged in the dashboard. It can be difficult to say exactly why these errors are being thrown using only the stacktrace and errors logged.
Sometimes when the stack trace includes ‘NtWaitForMultipleObjects’ or ‘MTAThreadWaitForCall’ from Combase, it can be due to issues occurring with long running tasks, async/threading issues or issues with invoking calls on the main UI thread. A potential example would be if a long running task has started and is expected to run in the background, however if it crashes, the detailed error might not be sent back to the main calling thread as the long running task either lost the context of the calling thread or fatally crashes before it was able to propagate the error back to the managed code. The methods seen in the stacktrace (such as NtWaitForMultipleObjects) don’t need to specifically be called from managed code but the lower level code can be indirectly invoked by any number of UWP API’s, frameworks, third-party packages or even general use of async tasks or long running threads. (among other potential unforeseen causes)
These errors could also potentially be caused by a potential bug within the UWP framework. If certain UWP API calls were being made in a way that was unsupported or caused them to crash, it could indicate that this is the unexpected behavior and we would create a bug report to address the issue. However as mentioned earlier, since these errors and stacktrace are too low level, it does not provide enough information to determine where the problem arises from. This may be why there isn’t too much specific documentation on these error messages because the solution to one error will likely not apply to other applications exhibiting the same errors.
Although there can be a few potential areas of investigation that can be taken to troubleshoot this issue. Since the stacktrace mentions ‘NTWaitForMultipleObjects’, it may help to investigate any parts of the managed code that are making any async calls, long running background tasks or calls that are being made directly on the UI thread. (Could be certain background services or specific calls made on UI thread to update the interface with changes or animations.) We have documentation on best practices for managing threading in an application in addition to using the Thread window in Visual Studio to troubleshoot issues. Additionally, the Performance profiler in Visual Studio could provide some information on CPU usage which could indicate areas where the usage is too high or if there is a potential memory issue occurring over a long period of time. (As I understand that this issue can happen after a day or so of running). These are just a few potential areas that can be investigated to see if they are causing the issue. Minimizing the application while still replicating the error can also help in narrowing down areas of interest.
I understand that you mentioned that AppCenter might not be able to capture low level errors. Although indeed there can be instances where the error is originating from the kernel and can be difficult for AppCenter to capture, it could still provide additional information related to the crash should it have initially be caused by something in managed code (that propagated and was thrown as a low-level kernel error). Adding AppCenter logging will allow it to implement global exception handling which can potentially catch the error earlier and returning a detailed stacktrace with more meaningful information to troubleshoot the issue. Additionally, if there are specific areas that you suspect might be contributing to this error, you can create custom logs to be sent to AppCenter in the event of a crash which can allow you to track more precisely where the issue could be occurring in addition to adding general logging throughout the app that can help further.
I do apologize for the inconvenience. As we’ve mentioned before, these error alone do not provide enough information to determine the cause of the problem and resolving issue like these may require additional investigation and logging to gather more details that can help as it can be caused by a wide verity of issues either from managed code or from the UWP framework.
Please let me know if the above information helps in troubleshooting this issue.