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.
Summary: | Netbeans crashes when editing properties | ||
---|---|---|---|
Product: | utilities | Reporter: | dana_k <dana_k> |
Component: | Properties | Assignee: | Marian Petras <mpetras> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | Keywords: | RANDOM, THREAD |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Thread dump issue 141014 |
Description
dana_k
2008-07-21 15:48:49 UTC
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" |