Hello,
I’m currently coding a custom EditorWindow, and there is a strange bug which occurs occasionally : Two text fields in different windows show the same string, the text in the first text field is displayed in the second one as well, even during editing of said text. In the following screenshot, the text field in the second window displays the text “TestVisitRivals” from the first one, although it should contain a wholly different text :

The windows are created with GUI.Window inside the EditorWindow’s OnGUI function. Note that this is not a problem of two windows sharing the same ID (the window headers on the screenshot indicate their IDs 1006 and 1007). Also, I’m sure the two text fields do not share the same string variable.
Note that the lower TextField contains visually the text of the first one but apparently not logically : When I select a third text field it snaps back to it’s correct value. (Furthermore, if there were really “TestVisitRivals” in this field, the text would turn red, as text fields with the little top hat turn red iff they don’t contain the name of an existing GameObject.)
A detail which might be important: When I select the first or the second window, the corresponding text field is in edit mode (with grey rectangle and cursor). However, when I select a third window, it’s text field is not in edit mode (looks like a label). It’s as if the two text fields were in a certain manner simultanously in edit mode (but only the one in the selected window is grey with cursor).
Unfortunately, this error only happens occasionally, and I’ve not yet found a way of reproducing it.
Any idea where this bug comes from, and how to fix it?