Hi, I'm having trouble locating the cause of the issue of this NullReferenceException runtime error, as far as I can see all entities have their keys and time starts initialised in the built-in data file. What could be the causes of this? Details pasted, thanks:
Product: Ventity
Version: 1.0.0.0
Assembly Name Assembly Version
Accessibility 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
Anonymously Hosted DynamicMethods Assembly 0.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
Antlr4.Runtime 4.6.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
AssemblyLoader4x64 2.1.6.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.DLL
DevExpress.Charts.v19.1.Core 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.Data.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.Images.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.Printing.v19.1.Core 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.Spreadsheet.v19.1.Core 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.Utils.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraBars.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraCharts.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraCharts.v19.1.UI 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraEditors.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraGrid.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraLayout.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraTreeList.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
DevExpress.XtraVerticalGrid.v19.1 19.1.4.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
Infralution.Licensing.Forms 6.2.0.0 file:///C:/Program%20Files/Ventity/Infralution.Licensing.Forms.DLL
Microsoft.GeneratedCode 1.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Microsoft.GeneratedCode 1.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Microsoft.GeneratedCode 1.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
mscorlib 4.0.0.0 file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
Northwoods.Go 5.1.0.45 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
Northwoods.Go.Layout 5.1.0.45 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
PresentationCore 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
PresentationFramework 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
ScintillaNET 3.0.1.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
System 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.ComponentModel.DataAnnotations 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
System.Configuration 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Core 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Data 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
System.Data.DataSetExtensions 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
System.Data.HashFunction.Core 2.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
System.Data.HashFunction.CRC 2.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
System.Data.HashFunction.Interfaces 2.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
System.Data.HashFunction.xxHash 2.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
System.Data.Linq 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Data.Linq.dll
System.Drawing 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Numerics 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
System.ValueTuple 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ValueTuple/v4.0_4.0.0.0__cc7b13ffcd2ddd51/System.ValueTuple.dll
System.Windows.Forms 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Windows.Forms.DataVisualization 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
System.Xaml 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
System.Xml 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
System.Xml.Linq 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
UIAutomationClient 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationClient/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationClient.dll
VE_Primitives 1.0.0.0 file:///C:/Program%20Files/Ventity/VE_Primitives.DLL
VE_RuntimeManager 0.9.7219.33535 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
Ventity 1.0.7219.33554 file:///C:/Program%20Files/Ventity/Ventity.exe
Ventity 1.0.7219.33542 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
VentityGlobals 1.0.0.0 file:///C:/Program%20Files/Ventity/VentityGlobals.DLL
VentityImpl 1.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
VentityMainForm 1.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
VentityModel 1.0.0.0 file:///C:/Program%20Files/Ventity/AssemblyLoader4x64.dll
VentityRuntimeFunctions 1.0.0.0 file:///C:/Program%20Files/Ventity/VentityRuntimeFunctions.DLL
VenUtils 1.0.0.0 file:///C:/Program%20Files/Ventity/VenUtils.DLL
WindowsBase 4.0.0.0 file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
--------------------------------------------------------------------------------
Level 0 Exception
--------------------------------------------------------------------------------
TYPE : NullReferenceException
MESSAGE : Object reference not set to an instance of an object.
SOURCE : VE_RuntimeManager
METHOD : TransformText
STACK TRACE : at VE_RuntimeManager.VE_ModelBuilder.EntityGeneratorTemplate.TransformText()
at VE_RuntimeManager.VE_ModelBuilder.ModelAssembly..ctor(IRuntimeAdapter adapter, IModelSaveList saveList)
at VE_RuntimeManager.VE_ModelBuilder.ModelAssemblyManager.GetModelAssembly(IRuntimeAdapter adapter, IModelRunConfig modelRunConfig)
at VE_RuntimeManager.RuntimeTask.CreateRuntimeModel(RuntimeContext runtimeContext)
at VE_RuntimeManager.RuntimeTask.Run(RuntimeContext runtimeContext)
at VE_RuntimeManager.RuntimeManager.<Run>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at VE_RuntimeManager.RuntimeManager.<Run>d__10.MoveNext()
at VentityMainForm.AppMainForm.<>c__DisplayClass400_0.<RunModel_new>b__2()
*** this is probably indicative of the original error ***
Object reference not set to an instance of an object runtime error
-
- Junior Member
- Posts: 7
- Joined: Fri Aug 21, 2020 11:53 am
- Vensim version: Ventity
Re: Object reference not set to an instance of an object runtime error
Does this happen at runtime? Are you running the latest 4.0 beta, or v3?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Junior Member
- Posts: 7
- Joined: Fri Aug 21, 2020 11:53 am
- Vensim version: Ventity
Re: Object reference not set to an instance of an object runtime error
Yes, it happens when I try to run the model using version 3. Version 4 shuts Ventity down without displaying an error, so I've reverted to version 3.
Re: Object reference not set to an instance of an object runtime error
Can you share the model with us? (Email to info at ventity dot biz or post here, if possible.)
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Junior Member
- Posts: 7
- Joined: Fri Aug 21, 2020 11:53 am
- Vensim version: Ventity
Re: Object reference not set to an instance of an object runtime error
Sure, model attached, thanks.
- Attachments
-
- Core.zip
- (293.47 KiB) Downloaded 465 times
-
- Junior Member
- Posts: 5
- Joined: Fri Oct 14, 2016 12:43 am
- Vensim version: Ventity
Re: Object reference not set to an instance of an object runtime error
Thank you for sharing your model. The null reference and crash errors were data driven software errors, which I have fixed. We will supply you with a new release very soon. There are also some model definition and data issues that cause warnings. We will provide a list of necessary changes along with the new release.
-
- Junior Member
- Posts: 7
- Joined: Fri Aug 21, 2020 11:53 am
- Vensim version: Ventity
Re: Object reference not set to an instance of an object runtime error
Noted, thank you Larry