You have an endless recursion. Your “ShowWindow” method calls itself at the end which makes no sense and should actually lead to either a hang or a crash due to a stack overflow. Maybe some other error causes the recursion to error out. You should simply do:
[MenuItem("Window/Window")]
public static void ShowWindow()
{
GetWindow<DiscoveryWindow>("Saved files");
}
You also might want to load your texture inside OnEnable and not every time OnGUI is called. Also you should use a more descriptive menu item. “Window” is like calling your game “Game”. So there’s Minecraft, Team Fortress and Game.