Compiler Error

  
Dear Community,


I created a module from an existing one. Afterwards, I implemented some DB changes and altered its structure to reflect these changes.

In the end, I cannot compile the module (while in the original one it publishes perfectly fine). I get this message:

- Internal Error
 
Invalid compiler output.
Unable to cast object of type 'UnknownRecord' to type 'OutSystems.HubEdition.Compiler.AbstractRecord'.
 
Exception Details:
[1] Internal Error: Invalid compiler output.
Unable to cast object of type 'UnknownRecord' to type 'OutSystems.HubEdition.Compiler.AbstractRecord'.
at OutSystems.HubEdition.Compiler.Compiler.<>c__DisplayClass2.<Compile>b__1()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
[2] System.InvalidCastException: Unable to cast object of type 'UnknownRecord' to type 'OutSystems.HubEdition.Compiler.AbstractRecord'.
   at OutSystems.HubEdition.Compiler.AbstractRecord.DumpOptimizedAttributesProperty(TextWriter writer)
   at OutSystems.HubEdition.Compiler.AbstractRecord.DumpCSharp(TextWriter writer)
   at OutSystems.HubEdition.Compiler.AbstractRecord.Dump(TextWriter writer)
   at OutSystems.HubEdition.Compiler.ESpace.<DumpRecordJoins>b__58(TextWriter writer)
   at OutSystems.HubEdition.Compiler.ESpace.DumpRecordJoins()
   at OutSystems.HubEdition.Compiler.ESpace.Dump()
   at OutSystems.HubEdition.Compiler.Compiler.InnerCompile(CompilationContext context)
   at OutSystems.HubEdition.Compiler.Compiler.Compile(CompilationContext context)

Any suggestions?
Hi Francis,

Can you click on the "Submit Feedback" button after getting that publication error and submit it to OutSystems with the "Attach OML file" option?
Just do a reply here after you done that and I'll check what is wrong and get back to you.


Regards,
João Rosado
Hello,

Feedback submitted.
Solution
Hi Francis,

Thank you for reporting this issue.
With your help we have have been able to identify the problem and will include a fix in a future revision of the product.

The problem is related to a combo box with the incorrect type internally.
To fix it in your module:
  • go to the ClienteDetail screen
  • select the Client_OperacoesId combo box
  • change the source entity to (None)
  • change the source entity back to Operacoes


Regards,
João Rosado
Solution
Thank you João!
João,


Continuing my work on the same module i stumbled upon yet another compiler error. 

I'll send the feedback right now.

----------------------------------------------------------------------------------------------------------

Internal Error
 
Compilation Error.
DadosMestre.aspx.cs(136,24): error CS0315: The type 'int' cannot be used as type parameter 'T' in the generic type or method 'OutSystems.HubEdition.RuntimePlatform.Db.GenericRecordList<T>'. There is no boxing conversion from 'int' to 'OutSystems.HubEdition.RuntimePlatform.Db.ITypedRecord<int>'.
bin\OutSystems.HubEdition.RuntimePlatform.dll: (Location of symbol related to previous error)
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll: (Location of symbol related to previous error)
 
 
State: Second stage compilation