Before commenting read Forum rules
Don't comment the topic if you have a new question.
You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.
Before commenting read Forum rules
Don't comment the topic if you have a new question.
You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.
Hi,
For the last year or so, using DLMSDirector viewing devices in AMI causes an 'System Null Reference Exception' when trying to view a clock object, profile generic etc.
In the SelectItem method (line 453 MainForm.cs) it calls the GetDevice method (line 693 MainForm.cs) which returns a null device.
Inside the GetDevice(GXDLMSObject item) method (line 116 MainForm.cs) it gets the GXDLMSDevice from the GXDLMSObject.Parent.Tag. Casting this to a GXDLMSDevice returns null.
I don't know if there could be some property we're using which has been populated by un unexpected data type or why it doesn't work. Attached is a sample device.
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Gurux.DLMS.UI.GXDLMSClockView.OnAccessRightsChange(GXDLMSViewArguments arg) in C:\vsts-agent\_work\5\s\development\GXDLMSClockView.cs:line 118
at Gurux.DLMS.UI.GXDlmsUi.UpdateAccessRights(IGXDLMSView view, GXDLMSClient client, GXDLMSObject target, Boolean connected) in C:\vsts-agent\_work\5\s\development\GXDlmsUi.cs:line 521
at Gurux.DLMS.UI.GXDlmsUi.ObjectChanged(IGXDLMSView view, GXDLMSClient client, GXDLMSObject target, Boolean connected) in C:\vsts-agent\_work\5\s\development\GXDlmsUi.cs:line 538
at GXDLMSDirector.MainForm.SelectItem(Object obj) in C:\Users\mihi\Desktop\Github\GXDLMSDirector\Development\MainForm.cs:line 725
Device JSON: (sensitive information has been replaced with "x").
{
"id": 5,
"dc": 0,
"templateId": 4,
"type": null,
"clientSystemTitle": "",
"deviceSystemTitle": "",
"blockCipherKey": "",
"authenticationKey": "",
"generation": "0001-01-01T00:00:00",
"updated": "2022-10-13T10:44:43+02:00",
"detected": "0001-01-01T00:00:00",
"removed": "0001-01-01T00:00:00",
"objects": null,
"dynamic": false,
"extraInfo": 0,
"traceLevel": 0,
"waitTime": 5,
"resendCount": 3,
"maximumBaudRate": 0,
"authentication": 1,
"authenticationName": null,
"standard": 0,
"password": "x",
"hexPassword": null,
"security": 0,
"securitySuite": 0,
"keyAgreementScheme": 0,
"systemTitle": "",
"serverSystemTitle": "",
"dedicatedKey": "",
"preEstablished": false,
"invocationCounter": 0,
"frameCounter": null,
"challenge": "",
"clientSigningKey": null,
"clientAgreementKey": null,
"serverSigningKey": null,
"serverAgreementKey": null,
"physicalAddress": 59047450,
"logicalAddress": 1,
"utcTimeZone": false,
"dateTimeSkips": 0,
"clientAddress": 32,
"startProtocol": 1,
"useRemoteSerial": false,
"interfaceType": 0,
"useFrameSize": false,
"maxInfoTX": 128,
"maxInfoRX": 128,
"windowSizeTX": 1,
"windowSizeRX": 1,
"macSourceAddress": 3072,
"macDestinationAddress": 0,
"pduSize": 65535,
"userId": -1,
"networkId": 0,
"physicalDeviceAddress": null,
"inactivityTimeout": 110,
"serviceClass": 1,
"priority": 1,
"serverAddressSize": 0,
"name": "59047450",
"verbose": true,
"conformance": 311352,
"manufacturer": "59047450",
"hdlcAddressing": 1,
"useProtectedRelease": false,
"mediaType": "Gurux.Net.GXNet",
"mediaSettings": "<IP>x.x.x.x</IP>\r\n<Port>4059</Port>\r\n",
"useLogicalNameReferencing": false
}