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 117922 - Step over caused AssertionError
Summary: Step over caused AssertionError
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
Depends on: 117969
Blocks:
  Show dependency tree
 
Reported: 2007-10-05 14:56 UTC by Jiri Skrivanek
Modified: 2007-10-08 14:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump when test freezes. (28.51 KB, text/plain)
2007-10-05 14:57 UTC, Jiri Skrivanek
Details
Thread dump from manually reproduced freeze. (27.11 KB, text/plain)
2007-10-05 15:05 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2007-10-05 14:56:19 UTC
Step over in servlet causes AssertionError below. It is a regression because it worked in build 200710041200 and it
doesn't work in newer builds. Moreover it causes that IDE freezes while running automated test. Maybe this is not caused
by this Error but I will attach thread dump. To reproduce:

- add glassfish to IDE
- open nb_all/web/jspdebug/test/qa-functional/data/MainTestApplication and its sub projects
- open MainTestApplication|Source Packages|org.netbeans.test.servlets|DivideServlet.java
- toggle breakpoint at line 36
- call "Debug File" action on DivideServlet.java node
- wait until breakpoint is reached
- call "Run|Step Over" main menu action and the following error is thrown:

 Exception in thread "Debugger operator thread" java.lang.AssertionError
 at org.netbeans.modules.debugger.jpda.projects.AST2Bytecode.matchSourceTree2Bytecode(AST2Bytecode.java:165)
 at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl$10.run(EditorContextImpl.java:1142)
 at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl$10.run(EditorContextImpl.java:1103)
 at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:601)
 at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getOperations(EditorContextImpl.java:1100)
 at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:158)
 at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:87)
 at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.setLastOperation(StepActionProvider.java:349)
 at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.exec(StepActionProvider.java:264)
 at org.netbeans.modules.debugger.jpda.util.Operator$1.run(Operator.java:257)

Build 20071005040152, Java: 1.6.0_03-b02, Windows XP.
Comment 1 Jiri Skrivanek 2007-10-05 14:57:41 UTC
Created attachment 50268 [details]
Thread dump when test freezes.
Comment 2 Jiri Skrivanek 2007-10-05 15:04:52 UTC
Finally I am able to reproduce 'IDE freeze' manually. After you done all steps in original decription:

- call "Debug File" action on DivideServlet.java node and IDE freezes. Maybe not a deadlock but it is bad. See a new
thread dump.
Comment 3 Jiri Skrivanek 2007-10-05 15:05:48 UTC
Created attachment 50269 [details]
Thread dump from manually reproduced freeze.
Comment 4 Martin Entlicher 2007-10-05 15:12:37 UTC
The freeze is not caused by debugger. Someone is doing HTTP connection in AWT! That asks for problems....

Looking at the java.lang.AssertionError....
Comment 5 Martin Entlicher 2007-10-05 15:21:05 UTC
A hot-fix applied.
This only masks the problem as it was before. Proper fix needs longer analysis...

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v  <--
 StepActionProvider.java
new revision: 1.44; previous revision: 1.43
Comment 6 Martin Entlicher 2007-10-05 22:22:09 UTC
BTW: I can not reproduce this. It keeps writing this when I start debugger:
INFO [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: DebuggerInfo cannot be found for: GlassFish V2
and the debugging does never start. It needs to be killed via Build -> Stop Build/Run
What does it mean?
Comment 7 Martin Entlicher 2007-10-05 22:28:22 UTC
Never mind. Reproduced with Tomcat. Glassfish does not work.
Comment 8 Martin Entlicher 2007-10-05 22:43:31 UTC
Aha, I see. The TypeKind is TypeKind.ERROR
The IDE parser is not able to resolve the types.
It's strange that the Divider symbol on line 38 is underlined as unknown, but the sources do compile fine. You should
file a defect for Java module.

We need to count with errors in expression scanning in debugger. I'll file a bug for that.
Comment 9 Martin Entlicher 2007-10-05 22:50:01 UTC
FYI: I've created issue #117969.
I'll revert this "hot-fix" after issue #117969 is fixed.
Comment 10 Martin Entlicher 2007-10-05 22:51:16 UTC
Adding dependency on issue #117969 - that needs to be fixed for the correct resolution of this problem.
Comment 11 Martin Entlicher 2007-10-05 22:54:12 UTC
Also, I do not get a deadlock with Tomcat. The deadlock seems to be the result of a mulfunction of Glassfish.
Comment 12 Jiri Skrivanek 2007-10-08 13:42:52 UTC
Verified.
Comment 13 Martin Entlicher 2007-10-08 14:09:12 UTC
Issue #117969 is fixed, so I've reverted this hot-fix:

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v  <--
 StepActionProvider.java
new revision: 1.45; previous revision: 1.44

I hope that it will not trigger another sleeping defect...