TRex Error: "Attempted to read or write protected memory" / "Object reference not set to instance of an object"

Product(s): StormCAD, SewerCAD, SewerGEMS, CivilStorm, WaterGEMS, WaterCAD, Hammer
Version(s): Connect Edition, V8i
Area: Layout and Data Input

Problem

When selecting a LandXML or Shapefile to use with the TREX (Terrain Extractor) tool the following message appears.

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

OR 

TRex Wizard: "Object reference not set to an instance of an object."

A similar error has been known to occur when using ArcGIS DTM files in TRex when in the ArcGIS platform.

Solution

Solution 1:

  1. Import the LandXML file into a CAD application such as OpenRoads or Civil 3D.
  2. Then export to a new Land XML file.
  3. Use the new LandXML file in TREX.

Solution 2:

Update the OpenFlows product (reference # 541768 and Defect #: 813548]). If you are using version 08.11.05.XX, upgrade to the CONNECT Edition or latest version.

Solution 3:

It is also possible that the error is appearing because the data does not align with the model data. Attach the file as a background layer in the model. If you do not see the background layer behind your model elements then they most likely do not align. You can press zoom extents to verify this. This could be because the file being used in TRex has different units and/or coordinate systems.

See Also

Using Terrain Extractor (Trex)

Troubleshooting and Understanding TRex - Terrain Extractor tool

Recommended
Related