[ASK] Invalid compiler output. Object Refrence not set to an instance of object

[ASK] Invalid compiler output. Object Refrence not set to an instance of object

  

Hello,

Whenever I published, an error always prevented me to do so. The error message is like this


Internal Error
Invalid compiler output.
Object reference not set to an instance of an object.
Exception Details:
[1] System.NullReferenceException: Object reference not set to an instance of an object.
   at OutSystems.HubEdition.Compiler.QueryInstance.GetIdentifierFromOutputVar(AbstractVariable var)
   at OutSystems.HubEdition.Compiler.Nodes.AbstractDataSet.OutSystems.HubEdition.Compiler.Interfaces.IQuery.get_OutputListIdentifier()
   at OutSystems.HubEdition.Compiler.Optimizer.OptimizerGraphs.OptimizerNodes.OptimizerQueryNode..ctor(IQuery node)
   at OutSystems.HubEdition.Compiler.Optimizer.OptimizerGraphs.ActionFlowGraph.CreateNode(AbstractNode actionNode)
   at OutSystems.HubEdition.Compiler.Optimizer.OptimizerGraphs.ActionFlowGraph..ctor(IActionFlow action, Boolean expandRefreshWidgets)
   at OutSystems.HubEdition.Compiler.Optimizer.OptimizerGraphs.ServerScreenFlowGraph..ctor(IServerScreenFlowNode screen)
   at OutSystems.HubEdition.Compiler.Optimizer.ViewState.NodeViewState..ctor(IServerScreenFlowNode screen)
   at OutSystems.HubEdition.Compiler.Interfaces.ServerScreenFlowNodeUtils.DefaultOptimize(IServerScreenFlowNode screenFlowNode, NodeViewState& viewState)
   at OutSystems.HubEdition.Compiler.Flows.WebFlow.Optimize()
   at OutSystems.HubEdition.Compiler.WebFlows.WebHandler.Dump(IEnumerable`1 webFlows)
   at OutSystems.HubEdition.Compiler.ESpace.Dump()
   at OutSystems.HubEdition.Compiler.Compiler.InnerCompileEspace(ESpace eSpace, CompilationContext context)
   at OutSystems.HubEdition.Compiler.Utils.CompilerUtils.TrapExceptionsInContext(Action action, CompilationContext context)


Before I got this error, what I did was copy and paste all of my screens, actions from my clone to my original project. And then I replaced all of clone's database core to my original's database core. After I fixed the errors, I tried to publish but this error always shown. I don't really understand what it said. Can someone help me in this matter? Thank you.

Solution

Hi Hentry,

Probably something went wrong with copying, and there's something in an unstable state. You could try to fix the eSpace by using the -recover option of Service Studio. To do so:

  1. Open a command window in Windows;
  2. Go to C:\Program Files\OutSystems\Development Environment 10.0\Service Studio (assuming that's where you installed it);
  3. Execute "servicestudio.exe -recover <espace name>", where <espace name> is the name of your eSpace (OML file);
  4. Open the recovered file and try again.

If that doesn't work you could contact OutSystems Support, but it'll probably take a while before they have figured it out and provided you with a solution. If that takes too long, try to redo what you did before, but in smaller steps (so copy and fix one Screen, then publish, etc.). Alternatively, instead of copying the Screens, merge them (i.e. merge the orginal with the clone, selecting the right Screens etc.). This sometimes produces better results than copying.

Solution

Hello Kilian,

What you suggest actually works! I tried to merge the original with the clone and published it. It showed no error at all. Thank you so much sir!

Hi Hentry,

Glad I could be of help. In general, merging seems to behave better than copy/pasting, even though copy/pasting should work, but sometimes it unfortunately doesn't.