Error at startup - Boolean Init


 Product(s):Promis.e, Bentley Substation
 Version(s):08.11.11.18 - 08.11.13.140
 Environment:N/A
 Area:Installation_Configuration
 Subarea:N/A

Error or Warning Message

At startup, the following error message is displayed:

Internal Error
Error Message: Object reference not set to an instance of an object
TargetSite: Boolean Init()
DeclaringType: ECT.ECAD.API.UserSettings
Attributes: public
MemberType: Method

or

Internal Error
UI Error Message: Object reference not set to an instance of an object
TargetSite: Boolean Init()
DeclaringType: ECT.ECAD.API.UserSettings
Attributes: public
MemberType: Method
StackTrace: C:\ProgramData\Bentley\Promise V8i\Config\LastError.txt...

LastError.txt contains:

Boolean Init(): Object reference not set to an instance of an object.
0: at ECT.ECAD.API.UserSettings.Init()
1: at ECT.ECAD.API.UserSettings.Create()
2: at ECT.ECAD.API.Application..ctor(Boolean bNeedDrawingTool, Boolean bNeedDB)
3: at ECT.ECAD.API.Application..ctor(Boolean bNeedDrawingTool)
4: at ECT.ECAD.API.Root.CreateApplication(Boolean bNeedDrawingTool)
5: at Bentley.Electrical.UI.Command.CommandEntryServiceBase.Init(Int32 hwndMode, Int32 hwndLayer)

Explanation

The "UserSettings" part of the error message indicates a setting is missing from the user options setings.

How to Avoid

Option 1

Delete or rename the UserOptions.xml file found in the following folder.
[[Application Data (per-user configuration) - Promis.e]] or
[[Application Data (per-user configuration) - Substation]] as the case may be.

This will cause a new UserOptions.xml file to be created from the template user options file when the software is next started. If this does not help, the problem may be in the template user options file, see Option 2.

Option 2

Use Notepad or other text editor to open the UserOptions.xml file found in one of the following folders.

[[Application Data (per-user configuration) - Promis.e]]
[[Application Data (per-user configuration) - Substation]]

If one of the first few lines (typically the second line) does not include "<UserOptions", or the contents of the file look significantly different than the default.UserOptions.xml file in the [[Default Data folder contents|PromiseDataArchive.zip file]], then the file is either corrupt or was overwritten by an inappropriate file. Replace the file with the default.UserOptions.xml file from PromiseDataArchive.zip, renaming the file to UserOptions.xml.

If Option 1 was already tried, then the file specified in the "User option profile" field on [[Setup]] > System Paths is also suspect. Replace that file with the default.UserOptions.xml file from PromiseDataArchive.zip, renaming the file accordingly.

 Original Author:Matt_P

Keywords: user settings