[Tip] Troubleshooting runtime errors or mis-behaviors in OutSystems Applications

[Tip] Troubleshooting runtime errors or mis-behaviors in OutSystems Applications



In many occasions, application runtime errors or mis-behaviors are difficult to identify from the generated error messages or error stacks. As an example, check the following error stack, which is quite common among runtime errors:

Message :[1] Object reference not set to an instance of an object.
Stack: at ssEspaceName.Flows.FlowWebFlow.ScrnScreenName.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

This error stack is somewhat quite blunt, and doesn't really identifies the cause of the problem, which makes the troubleshooting difficult to execute. The only valuable information is the screen identification, which is usually already known.


In this example, the cause for the error was a semantic error in an extension action code, called from inside a preparation action of a referenced webblock, in a consumer eSpace web screen. I know, it looks complex and hard to identify!


The first step in solving this type of problem is to identify the object/action responsible for the exception. In this scenario, the best way to troubleshoot it, is to use the Service Studio debugger in the erroneous flow. In the very least, identify which action or object is generating this exception. This can provide very useful information when reporting the error or mis-behavior to OutSystems Technical Support, because in the most scenarios, due to external integrations, references or bootstrap data, the error or mis-behavior is never replicated outside the original environment.

Best Regards

Miguel Simões João