Just a heads up really. I have an example that may have ruined mine.
There 152 of these "trenches" stacked into that little pile. I delete them, and they reappear when I save/reload. I only placed three when I did this, but over time they seem to have grown.. exponentially. It's rather ridiculous that an actually virus is spreading in my map.
If you know how to get rid of them permanently, I'm all ears.
Start by making a new folder on your desktop.
Make a new map. Open your original buggy map in an MPQ editor that supports Starcraft's files. Extract everything in your buggy map to the folder you made. Open your new map in the MPQ editor. Delete everything in there except the internal files (it will tell you when you are trying to delete those). Drag and drop all the files in your new folder into the MPQ. Load the new map..
Buggy trenches gone.
I have not tested this fully, but it appears to work. Your working terrain objects (no trenches!), data, triggers, etc, are all copied.
I also had a problem with terrain objects and the above ways didn't work.
I placed 2 trenches in my map (in earlier stages to try it) and didn't remove them immediately. Later when trying to delete them I realized that the editor and game gets VERY laagy when the camera gets close to the position where I placed those 2 trenches... this got so worse I couldn't even open the terrain module anymore.
Then I looked in the xml terrain file and saw that my two trenches actually became 2508 trenches!!!! That was the explanation why it got so buggy, but I don't know how they made themselves become more (was it a daddy and a mommy trench?)
Anyways: I couldn't delete them in the xml file since the editor always told me the map file is corrupted.
Then I played around in the Data Module in the field TerrainObject and deleted the model and set the radius from 0 to 1. Suddenly I could open the terrain editor and these stupid objects seem to be gone. There was only one left which I could delete without any problems.
I had over 2000 of the following lines:
<cliffDoodad name="TerrainObjectTrenchDiagonal1" pos="51.000000 153.000000 0.000000 " rot="0"/>
all at the same position.... man, I can only repeat the first two words:
STAY AWAY FROM TERRAINOBJECTS AND DON'T USE THEM!