Editor window gone

I have a very weird problem (bug?) with my custom editor window and Unity 4.5.0f6 .
I have developed an editor window to create and modify histograms. This all worked fine until I recently created an exception (at reading the data file). Afterwards the window simply did not show up any more.
directly after the “incident” i recived the following exception:

Afterwards it does not show any error/exception just simply refused to display the window. Just once the following popped up:

So it appears that the window is not longer available but its still accessed by Unity.

My attempts:
I have removed (commented out) all potentially offending code. There is just the bare bone class with static Init-method (which executes) and an empty OnGUI (which does not) left.
Restarting Unity/Windows helps nothing.
Opening another project and reopen the problematic one does not help.
When I rename the class it works again (but this workaround is undesirable in the long term).

I think that something could be wrong with the Editor cache (if it exists) but I’m unsure on what I can safely delete in the project.

I hesitate to reinstall Unity yet since it appears to be project related. Slowly my available options and ideas vanish and I don’t know how to proceed. I have the feeling the problem lies deep into Unity and I have no idea how to solve it. Thus my question if anyone of you has encountered (and solved?) similar problems, if you have further ideas what I could try or advise on to clear the “cache” of the project. My google search only revealed how to clear the webplayer cache but I think the editor may also cache some project related stuff because the problem survives a reload.

I hesitate to file a bugreport because I don’t know how to reproduce the occurence of the problem, I don’t want to “waste” time to create a minimal working example (strip my project). And I see with pity how slow bugs are fixed (and good suggestions implemented). So if it is ever detected and fixed I am used to the workaround anyway.

Thanks for your time.

My Unity instance has crashed now when it was minimized (played a game). After restarting it complains that it could not load custom layout. I let it start with default layout and it spits out the following messages / errors:

Note: The window was not docked, it was maximized. And I didn’t use any special GUIStyles. But it contained a mixture of GUI and GUILayout.

If I rename the editor window class back to the name which previously did not work it still does not work. So this crash did not solve the problem. And I fear the problem remains and my Unity will crash again in future with these messages. So the damage seems to be done inherently in my project what is really bad news.

This is just for reference if someone finds this thread in google. But as there seems to be no interest i will not further bump this thread.

My advice would to simply copy the scripts/assets over to a new project and then see if it works. If it still doesn’t, reinstall unity. Then if it’s still not working, something’s wrong with your code.

It works in another project and it works in the original project when I renamed the class. Just with the original name it does not work and spits out the mentioned exceptions and errors. Thats why I believe something has been messed up with Unity’s internal data storage regarding the display and management of the editor windows. As if the exception caused by my code has done some permanent damage to the data of the project.
The workaround with renaming the class works currently for me but its better Unity fixes this ASAP so i will file a bug report and use this thread as problem description and see what comes out.

Not before 4.6 ;).

As I said my code works perfectly fine when the class name is changed but when I use the original name (under which an exception was created recently) it does not albeit the exception creating code has been fixed.

I had the same problem, try resetting the layout to factory settings. Then re-layout your workspace, see if that helps.

3 Likes

Which Unityversion do you use? According to UT this has been fixed.