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: | IllegalStateException: Can't dispose InputContext while it's active | ||
---|---|---|---|
Product: | cnd | Reporter: | Vladimir Kvashin <vkvashin> |
Component: | Debugger | Assignee: | Maria Tishkova <mromashova> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | issues |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 227143 |
Attachments: |
stacktrace
The code of InputContext.java that throws the exception |
Description
Vladimir Kvashin
2016-11-09 09:13:46 UTC
Created attachment 162841 [details]
stacktrace
This is 100% reproducible. In CND or full IDE, try attaching with gdb. Modify "Filter" field. Close the attach window. Exception occurs. Created attachment 162843 [details]
The code of InputContext.java that throws the exception
The code that throws exception is public synchronized void dispose() { if (currentClientComponent != null) { throw new IllegalStateException("Can't dispose InputContext while it's active"); } Debugger shows that currentClientComponent is a text field. Its toString is javax.swing.JTextField[,56,16,326x18,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@11d51e65,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=0,columnWidth=0,command=,horizontalAlignment=LEADING] I can 100% reproduce it on NB built from cnd-main with tip ecae8cddd8bb It seems it does reproduce in release 8.2. To reproduce, its enough just to change focus to "Filter" field. Then exception occurs. If you don't focus to the field, exception doesn't appear. If you change focus to the field, but then go to "Debugger" combo and reselect Gdb, exception does not happen (unless you focus the field after that) I can not reproduce this, but if I set a breakpoint in RemoteDirectory.java:1161
i.e. here
private boolean isPendingDelivery(DirEntry entry) {
String name = entry.getName();
if (name.startsWith("#") && name.endsWith("#")) { // NOI18N
>>> name = name.substring(1, name.length() - 1);
and when it hits, I remove remote cache for this directory,
I see that the same stack fragment is entered again and so on.
See http://bugs.java.com/view_bug.do?bug_id=4289940 "I ... recommend all users who face this exception to check their code for removeNotify() implementations." This fixes the issue: diff -r 264b33490767 cnd.debugger.common2/src/org/netbeans/modules/cnd/debugger/common2/ui/processlist/AttachToProcessTopComponent.java --- a/cnd.debugger.common2/src/org/netbeans/modules/cnd/debugger/common2/ui/processlist/AttachToProcessTopComponent.java Wed Nov 09 18:13:56 2016 +0000 +++ b/cnd.debugger.common2/src/org/netbeans/modules/cnd/debugger/common2/ui/processlist/AttachToProcessTopComponent.java Thu Nov 10 14:32:51 2016 +0100 @@ -363,6 +363,7 @@ @Override public void removeNotify() { updateContent(null); + super.removeNotify(); } thanks to Martin. fixed in enum release82 branch (will be transplanted to the trunk this week later) changeset: 313318:e97e8a86c8af branch: release82 user: Maria Dalmatova <mromashova@netbeans.org> date: Tue Nov 15 15:56:36 2016 +0300 summary: fixed bz#268905 - IllegalStateException: Can't dispose InputContext while it's active Integrated into 'main-silver', will be available in build *201611230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8e0bb9868d78 User: Maria Dalmatova <mromashova@netbeans.org> Log: fixed bz#268905 - IllegalStateException: Can't dispose InputContext while it's active (transplanted from e97e8a86c8afa2ba49e08278e6a395765fbb9e10) Verified in NetBeans IDE 8.2 (Build 201612122312) |