This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hello, in my application I´m using properties files as an resource bundle (descriptions.properties, descriptions_de.properties and descriptions_en.properties). Almost every time when I edit the key contents in the multiple view (that means, I see 4 columns: key, default language, german, english), Netbeans freezes and I can exit it only by the task manager. It seems to me that it doesn`t make any difference if I edit the content in the text area ("value") or directly in the table cell. After restarting Netbeans the last changes are gone. best regards, dana_k
dana_k, I have never heard of such a freeze and I have no idea about what might cause it. It would help me a lot if you generated a thread dump once you experience the crash. Instructions on how to generate at thread dump are available here: http://wiki.netbeans.org/GenerateThreadDump
Created attachment 66893 [details] Thread dump issue 141014
please see attached thread dump!
Thanks! There is a threading bug, indeed.
The bug is in method PropertiesOpen.ModifiedListener.save(): public void save() throws ... { stopEditing(); // ... saveDocument(); } This method seems to be perfectly valid if executed from the AWT event-dispatching thread. But it may cause the reported deadlock if executed from any other thread. Because it really is executed from some other thread ("Module-Actions"), it actually causes the deadlock (randomly). How to fix it: The core problem is that method stopEditing() modifies the UI - and it does so from a event-dispatching thread (I will call it "AWT thread" in the text below for simplicity). But it also saves the value of the cell, that is currently being edited, to the data model and this save action should not be rescheduled to another thread. In summary, the saving must be done in the current thread (without any delay) but the UI manipulation should not. So I will extract the data-saving functionality to a separate method and then schedule the UI update actions so the AWT thread: public void save() throws ... { saveEditorValues(); // ... saveDocument(); // ... updateUI(); }
Fixed. Changeset Id: 8e2fce7e185d (http://hg.netbeans.org/main/rev/8e2fce7e185d)
Integrated into 'main-golden', will be available in build *200809040201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8e2fce7e185d User: Marian Petras <mpetras@netbeans.org> Log: fixed bug #141014 - "Netbeans crashes when editing properties"