KB‎ > ‎

Error 'Object reference not set to an instance of an object' when opening map in Visio

Ref: 201011231014 
Last Edited: August 18th, 2011
Development Ref: 80
Fixed in PN 11.1
 
 
Symptoms:
When a map is opened in Visio, the following error is reported:
23/11/2010 10:08:21
Object reference not set to an instance of an object.
An error occurred in the VisEventProc event
=== Begin For Triaster Support ===
The following content may be useful to the Triaster support team.
Please copy and paste it into an e-mail to
support@triaster.co.uk
and attach any referenced files if you would like help understanding
how to avoid this issue reoccurring.
Object reference not set to an instance of an object.
An error occurred in the VisEventProc event
System.NullReferenceException: Object reference not set to an instance of an object.
   at Triaster.ProcessNavigator.Common.ProcessObjects.Relationship.InitSecondaryProperties()
   at Triaster.ProcessNavigator.Common.ProcessObjects.Map.AddMapPage(Page pagObj, Boolean blnEnableUpgrade)
   at Triaster.ProcessNavigator.Common.ProcessObjects.Map..ctor(Document& docObj, Boolean blnEnableUpgrade)
   at Triaster.ProcessNavigator.Common.ProcessObjects.Maps.Add(Document docArg, Boolean blnEnableUpgrades, String strFullPathAndFileName)
   at Triaster.ProcessNavigator.Common.ProcessObjects.Maps.Add(Document docArg, Boolean blnEnableUpgrades)
   at Triaster.ProcessNavigator.Common.ProcessObjects.DocumentsBase.Add(Document docArg)
   at Triaster.ProcessNavigator.MappingEdition.Wrapper.clsAppEventSink.HookDocument(Document docObj)
   at Triaster.ProcessNavigator.MappingEdition.Wrapper.clsAppEventSink.VisEventProc(Int32& eventCode, Object& sourceObj, Int32& eventID, Int32& seqNum, Object& subjectObj, Object& moreInfo)
=== Finish For Triaster Support ===
 
An error dialog may also be displayed.
 
Cause:
One or more shapes have connection points (small blue crosses) in positions not expected by Process Navigator.
Extra connection points can be added to Activities and Deliverables through their Properties dialogs. Through this mechanism, connection points are distributed evenly along the sides. However, connection points can also be added through Visio's own connection point tool, and in positions that Process Navigator doesn't handle properly, which can result in this error.
 
Solution:
Connection points in such positions need to be removed, and perhaps replaced with others through Process Navigator shapes' Properties dialogs.
The whole shape could be deleted and replaced, but consider attributes such as drill-down behaviour and properties that would need to be reset.
 
Managing connection points through the ShapeSheet, as described here, can be difficult, depending on the complexity of the formulae used. The following example is a relatively simple one, but if yours is more complex, or if you are not confident about this procedure, contact support@triaster.co.uk for help.
  1. Select a shape with multiple connection points on one or more of its sides.
     
  2. From Visio's menu, Window > Show ShapeSheet.
     
  3. In the ShapeSheet window, find the 'Connection Points' section.

     
     
  4. If there are rows in addition to the first four that don't correspond to expected positions, then delete the whole row by right-clicking the row > Delete Row.

    Such rows are likely to be the last ones in the list. The first four should be those that are on the shape by default, and shouldn't be deleted.
     
  5. If there are X or Y positions in the first four rows that don't correspond to expected positions, then it would suggest that a default connection point has been deleted or moved. Their X and Y positions should be restored to their expected values.

    NOTE:
    Connection points are expected to be distributed evenly along a side. Using the above example, the first four rows suggest that there should be one connection point at the centre of each side. That suggests that the additional rows correspond to extra connection points added in a manner other than through a Process Navigator shape's Properties dialog, and that it's these connection points that need to be removed. It's also evident from their X and/or Y positions that they are not where they should be.
     
  6. Close the ShapeSheet window, maximise the drawing window (if required), and save the file.
     
  7. Re-open the map.
     
  8. If there's another error, check other shapes for spurious connection points. There may well be multiple shapes that are causing this error.
     
  9. When the map can be opened without error, restore the extra connection points through a Process Navigator shape's Properties dialog, if required. Connectors will need to be reconnected too.
     
Tips for identifying a problem shape
 
If may not be obvious which shape causes the error, particularly if the map contains multiple pages and/or many shapes.
  • The Progress window and the error dialog (if visible) should indicate which page was being loaded when the error occurred.
     
  • If a problem page has been identified, select all of its shapes (Edit > Select All), copy them (Edit > Copy), and paste them (Edit > Paste) on to an empty page of a new map. When the problem shape is added, the error will be triggered, and its name should be apparent from the new shape dialog displayed. Check that shape, and any other shapes that are connected to it.
 
Applies to:
  • Process Navigator 10.1 and earlier.
     
Related articles:

 

Comments