This project breaks LLBLGen Pro 5.9.2

Posts   
 
    
dodyg
User
Posts: 42
Joined: 04-Dec-2014
# Posted on: 29-Aug-2022 14:47:44   
  • Open the project
  • Generate the code and the designer will throw this exception.
  • This works in LLBLGen Pro 5.5.
Exception information.
=============================================================
LLBLGen Pro version: v5.9. Build: 5.9.2

Exception details:
=====================
Message: Object reference not set to an instance of an object.
Source: LptTAfe7d87601ac54d5aac75c7c0e3d7a9be
Stack trace: 
   at SD_DTO_RootDerivedElementReadOnlyPersistence.ConstructCorrelationPredicate(Pair`2 correlationRelationship, String outerQueryAlias)
   at SD_DTO_RootDerivedElementReadOnlyPersistence.ProduceDocumentProjectorQs(String baseQueryName, String documentNameForOutput, DocumentDefinitionBase document, IGenerator executingGenerator, SourceNavigatorPath lambdaScopePath, String typesNamespace, Int32 numberOfRootTabs, Boolean inlineValueTypeFields, String classNameSuffix, String outerQueryAlias, DocumentProjectionData projectionData, Int32 nestingLevel)
   at SD_DTO_RootDerivedElementReadOnlyPersistence.ProduceDocumentProjectorQs(String baseQueryName, String documentNameForOutput, DocumentDefinitionBase document, IGenerator executingGenerator, SourceNavigatorPath lambdaScopePath, String typesNamespace, Int32 numberOfRootTabs, Boolean inlineValueTypeFields, String classNameSuffix, String outerQueryAlias, DocumentProjectionData projectionData, Int32 nestingLevel)
   at SD_DTO_RootDerivedElementReadOnlyPersistence.__ScriptCode()
   at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutputToFile[TElement](TElement currentElement, String destinationFilename, Boolean failWhenExistent, Assembly compiledTemplatesAssembly, String templateID, Dictionary`2 parameters, Boolean isPartOfSet, String outputDescription, String dependentUponFilename)
   at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutputForElements[TElement](String destinationFolderFormat, String filenameFormat, Boolean failWhenExistent, String templateID, Assembly compiledTemplatesAssembly, Dictionary`2 parameters, ICollection`1 elementsToTraverse, EmitType emitTypeUsed, Func`2 nameProducerFunc, Func`2 fullNameProducerFunc, Func`2 elementTypeNameProducerFunc, Func`2 groupNameProducerFunc, String dependentUponFilenameFormat, Func`3 preFormatFunc)
   at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutput(Dictionary`2 parameters, String destinationFolderFormat, String templateID, Assembly compiledTemplatesAssembly, EmitType emitTypeToPerform, String filenameFormat, Boolean failWhenExistent, String dependentUponFilenameFormat, String emptyGroupReplacementString)
   at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.Perform(IGenerator executingGenerator, ITask taskDefinition, Dictionary`2 parameters)
   at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.Task.PerformElement(IGenerator executingGenerator, LogNode parentNode)
   at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode)
   at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode)
   at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode)
   at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode)
   at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode)
   at SD.LLBLGen.Pro.GeneratorCore.Generator.RunTasks(String rootNameSpaceToUse, String destinationRootFolder, String groupName)
   at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(CodeGenerationTaskBase codeGenTask, ApplicationConfiguration configurationSettings, Boolean performObsoleteFileCleanup)
   at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRunCodeGenerationCycleAction(List`1 codeGenTasks, List`1 vsNetProjectsCreated, List`1 sqlFilesGenerated, Boolean debugBuild, LogNode& tasksResultLog)

Inner exception: <null>

Attachments
Filename File size Added on Approval
Test.llblgenproj 18,303 29-Aug-2022 14:48.04 Approved
Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 29-Aug-2022 22:19:30   

Re-produced. Obviously, something related to the Derived Model.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 30-Aug-2022 09:41:42   

We'll look into it!

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 30-Aug-2022 10:55:09   

Hmm, that's strange, in the debug build it loads fine. Will try a release build. Oh when generating code! Missed that.

The crash occurs in the QuerySpec query generation, so it fails in all versions which have that so also 5.8.x. 5.5 works because it doesn't have QS queries for derived elements.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 30-Aug-2022 12:36:49   

Fixed in hotfix builds 5.8.7 and 5.9.3 simple_smile

To work around the bug, add at least 1 field to a derived element nested in another document.

Frans Bouma | Lead developer LLBLGen Pro
dodyg
User
Posts: 42
Joined: 04-Dec-2014
# Posted on: 15-Sep-2022 12:07:32   

Thanks. 5.9.3 fixed it.