Trying to call a function of a class in an array [C#]

With C#:
I create an array of classes.
I then try to call a function of one of those classes in the array, which causes the editor to freeze.
Is this possible or am I doing something wrong?

The Unity editor window is freezing when calling this code:

classPopWin[] popArray = new classPopWin[5];

...

popArray[0].showObjects();

While this works perfectly:

classPopWin cPop = new classPopWin();	

...

cPop.showObjects();

Here is the showObjects() function:

	public void showObjects () {

		fold = EditorGUILayout.Foldout (fold, "foldout");

		if(fold) {

			ptext = EditorGUILayout.TextArea(ptext);

		}
	}

You created the array object but you didn“t create the objects to fill the array. Try this:

classPopWin[] popArray = new classPopWin[5];

for (int i = 0; i < popArray.Length; i++)
   popArray[i] = new classPopWin();

...

popArray[0].showObjects();