Just quickly (you've probably worked this out) but moving the call to updateImage() from the constructor to a method named public void addedToWorld(World w) should fix the problem.
import greenfoot.*;
import java.awt.Color;
public class GameOver extends Actor
{
String msgTxt = "GAME OVER";
public GameOver()
{
}
public GameOver(String txt)
{
msgTxt = txt;
}
public void addedToWorld(World world)
{
GreenfootImage image = new GreenfootImage(world.getWidth(), world.getHeight());
image.setColor(Color.cyan);
image.fill();
GreenfootImage txtImg = new GreenfootImage(msgTxt, 36, Color.black, new Color(0, 0, 0, 0));
image.drawImage(txtImg, (image.getWidth() - txtImg.getWidth()) / 2, (image.getHeight() - txtImg.getHeight() / 2));
setImage(image);
}
}