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.

Bug 159006 - AssertionError: Debugger lock taken in AWT Event Queue!
Summary: AssertionError: Debugger lock taken in AWT Event Queue!
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-23 18:16 UTC by Jindrich Sedek
Modified: 2009-04-21 08:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 146642


Attachments
stacktrace (3.41 KB, text/plain)
2009-02-23 18:16 UTC, Jindrich Sedek
Details
stacktrace (3.41 KB, text/plain)
2009-04-06 11:32 UTC, Petr Blaha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2009-02-23 18:16:19 UTC
Build: NetBeans IDE Dev (Build 200902201419)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: SunOS, 5.11, x86

User Comments:
jsedek: Create new Web Application
in index.jsp type simple scriptlet:
-------------------
<%= "hallo" %>
-------------------
set breakpoint on the line with scriptlet and invoke debug on project
choose server side debugger
debugger is started, inde.jsp is demanded by browser, breakpoint is reached
open Local Variables window
try to expand Context Attributes -> AE is thrown and its thrown again and again



Stacktrace: 
java.lang.AssertionError: Debugger lock taken in AWT Event Queue!
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl$DebuggerReentrantReadWriteLock$DebuggerReadLock.lock(JPDADebuggerImpl.java:2122)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl$ThreadReentrantReadWriteLock$ThreadWriteLock.lock(JPDAThreadImpl.java:1598)
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:1078)
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:1039)
        at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:381)
        at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:342)
Comment 1 Jindrich Sedek 2009-02-23 18:16:35 UTC
Created attachment 77258 [details]
stacktrace
Comment 2 Martin Entlicher 2009-02-26 15:00:55 UTC
JSPVariablesNodeModelFilter is forcing us to invoke a method in AWT. This is dangerous, since method invocation can take
a long time and thus freeze the UI.

I'll try to fix it in the similar way how tooltips are implemented in JPDA debugger...
Comment 3 Martin Entlicher 2009-02-26 17:03:57 UTC
Well, I guess I need to introduce some API to be able to say that tree view model methods should be called
asynchronously. That way we would not have to deal with that in every implementation.
Comment 4 Petr Blaha 2009-04-06 11:31:53 UTC
Build: NetBeans IDE Dev (Build 090406)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-11-generic, amd64

User Comments: 
1) create web project with GF v2u2 as target server
2) put breakpoint in index.jsp
3) debug project
4) expand Request Attriubutes in Variables window

Stacktrace: 
java.lang.AssertionError: Debugger lock taken in AWT Event Queue!
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl$DebuggerReentrantReadWriteLock$DebuggerReadLock.lock(JPDADebuggerImpl.java:2127)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl$ThreadReentrantReadWriteLock$ThreadWriteLock.lock(JPDAThreadImpl.java:1591)
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:1083)
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:1044)
        at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:381)
        at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:342)
Comment 5 Petr Blaha 2009-04-06 11:32:03 UTC
Created attachment 79518 [details]
stacktrace
Comment 6 Petr Jiricka 2009-04-08 13:10:06 UTC
Jindro or Martine, do you know if this is a regression and if this worked in NB 6.5?
Comment 7 Jindrich Sedek 2009-04-08 15:41:58 UTC
in 6.5.1 it's not possible to expand context attributes at all -> the node has no children, only implicit objects node
can be expanded and it works well
Comment 8 Martin Entlicher 2009-04-08 15:50:55 UTC
This is a regression, but the assertion error prevents from possible deadlocks when JDI methods are called in AWT thread
and JDI does not respond. Therefore I've added assertions to prevent from calls to JDI in AWT thread.

Production release with assertions turned off will not be affected, but we should fix this to prevent from possible
deadlocks.

Starting to work on this...
Comment 9 Martin Entlicher 2009-04-08 18:14:47 UTC
Fixed in changeset:   125718:d0a274bdc388
http://hg.netbeans.org/main/rev/d0a274bdc388
Comment 10 Quality Engineering 2009-04-09 19:22:20 UTC
Integrated into 'main-golden', will be available in build *200904091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d0a274bdc388
User: mentlicher@netbeans.org
Log: #159006 - Evaluate tooltip in an RP thread so that we do not call JDI in AWT.
Comment 11 Jindrich Sedek 2009-04-17 15:10:39 UTC
verified.
 NetBeans IDE Dev (Build 090417)
Comment 12 Petr Hejl 2009-04-20 22:44:27 UTC
Issue still exists on trunk.

1) debug jsp, stop on breakpoint
2) watches view
3) add watch ${1+1}
4) assertion
Comment 13 Martin Entlicher 2009-04-21 08:53:07 UTC
This issue was fixed.

You have submitted issue #163163, so it makes no sense to reopen this one.
Comment 14 Martin Entlicher 2009-04-21 08:53:29 UTC
Was verified.