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 56697 - [41cat] Application sometimes freezes in debugger
Summary: [41cat] Application sometimes freezes in debugger
Status: CLOSED WORKSFORME
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: RANDOM
: 56536 56657 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-20 21:00 UTC by lleland
Modified: 2010-04-29 09:21 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example Swing application. (3.19 KB, text/plain)
2005-03-20 21:03 UTC, lleland
Details
thread dump (11.37 KB, text/plain)
2005-03-21 11:47 UTC, Milan Kubec
Details
Thread from unsuccessful debugger start of console application (14.72 KB, text/plain)
2005-03-21 12:13 UTC, _ lcincura
Details
Output from verbose debugger start (34.71 KB, text/plain)
2005-03-21 15:51 UTC, _ lcincura
Details
message.log when 'debug project' action executed twice (1.22 KB, text/plain)
2005-03-21 15:56 UTC, Libor Kotouc
Details
Thread dump obtained immediatelly after connect task freeze (18.33 KB, text/plain)
2005-03-21 15:58 UTC, Libor Kotouc
Details
Taken while debugger waits at a breakpoint. (14.26 KB, text/plain)
2005-03-24 09:28 UTC, gugrim
Details
Taken after Continue. Swing app now frozen. (13.43 KB, text/plain)
2005-03-24 09:29 UTC, gugrim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lleland 2005-03-20 21:00:53 UTC
[ BUILD # : Dev 20050318 ]
[ JDK VERSION : 1.5.0_02 ]

In a Swing application, when you call setDefaultLookAndFeelDecorated(true), the application never appears when run in the debugger. This is mostly repeatable, but every once in awhile it will start to debug correctly until recompiled.

Include the call in the main() method:
    public static
    void main(String args[])
    {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                JFrame.setDefaultLookAndFeelDecorated(true);
                new SwingTest().setVisible(true);
            }
        });
    }

Compile and run the application in the debugger. The IDE will switch to debugger mode. The "Debugger Console" tab in the Output window will display nothing. The "<Project Name> (debug)" tab in the Output window will display:
  init:
  deps-jar:
  compile:

The application debugger state will show as running, and the Runtime window will show a "<Project Name> (debug)" process running.

However, the application main window will never be displayed, and any breakpoint set will not be triggered. When you stop the application (Ctrl-F5), the debugger session will end, but the debug process will still be shown as active in the Runtime window. the process must be terminated to end it.

When you comment out the setDefaultLookAndFeelDecorated(true) call, the application runs and stops in the debugger correctly.
Comment 1 lleland 2005-03-20 21:03:18 UTC
Created attachment 20967 [details]
Example Swing application.
Comment 2 Milan Kubec 2005-03-21 11:46:47 UTC
I managed to reproduce that as well. It doesn't seem to be related to
setDefaultLookAndFeelDecorated(true) call. 
Please attach thread dump (Ctrl+Break on Win) taken when it happens. Increasing
priority to P2. It's not reproducible everytime but frequently.
Comment 3 Milan Kubec 2005-03-21 11:47:48 UTC
Created attachment 20981 [details]
thread dump
Comment 4 Milan Kubec 2005-03-21 11:52:33 UTC
Please evaluate the issue, it would be P1 when it's reproducible reliably.
Comment 5 _ lcincura 2005-03-21 11:58:54 UTC
I have an evidence it is not related to swing applications. I reproduced the
issue (Win XP, NB build 200503170655 on jdk 1.5.0_02) with simple console
application which only writes strings into console. The same behaviour can be
seen when starting debugger via Step Into or Run to Cursor actions.
Comment 6 _ lcincura 2005-03-21 12:00:09 UTC
*** Issue 56536 has been marked as a duplicate of this issue. ***
Comment 7 _ lcincura 2005-03-21 12:13:02 UTC
Created attachment 20982 [details]
Thread from unsuccessful debugger start of console application
Comment 8 Libor Kotouc 2005-03-21 15:34:18 UTC
*** Issue 56657 has been marked as a duplicate of this issue. ***
Comment 9 _ lcincura 2005-03-21 15:51:02 UTC
Created attachment 20997 [details]
Output from verbose debugger start
Comment 10 Libor Kotouc 2005-03-21 15:53:24 UTC
We are facing this bug when trying to start web module on App server or Tomcat
server in debug mode. It happens quite rarely for me (but sometimes several
times in a row).

The Deploy task works well but JPDAConnect doesn't success because of
synchronization problems. 
I run NB with -J-Dnetbeans.debugger.start option and I put some additional
'printlns' into JPDADebugger.attach() and JPDADebuggerImpl.waitRunning() methods.
The typical case is that thread in which nbjpdaconnect task is run is suspended
on the LOCK2 object (in JDAPDebuggerImpl.waitRunning() ) and never resumed.

Attaching a thread dump and a relevant part of message.log.
Comment 11 Libor Kotouc 2005-03-21 15:56:20 UTC
Created attachment 20998 [details]
message.log when 'debug project' action executed twice
Comment 12 Libor Kotouc 2005-03-21 15:58:32 UTC
Created attachment 20999 [details]
Thread dump obtained immediatelly after connect task freeze
Comment 13 Roman Ondruska 2005-03-21 16:59:19 UTC
Fixed in TRUNK.
Comment 14 _ ttran 2005-03-21 20:59:58 UTC
rondurska: please always set target milestone correctly when you close the bug,
in this case to "4.1".  Thx
Comment 15 gugrim 2005-03-24 09:26:52 UTC
Doesn't work with build 200503232205 on Win XP Pro. Attaching two thread dumps.
Comment 16 gugrim 2005-03-24 09:28:08 UTC
Created attachment 21086 [details]
Taken while debugger waits at a breakpoint.
Comment 17 gugrim 2005-03-24 09:29:04 UTC
Created attachment 21087 [details]
Taken after Continue. Swing app now frozen.
Comment 18 _ lcincura 2005-03-24 09:38:18 UTC
I think you are now facing issue #56863.

If debugger is sucesfully started, do not reopen this issue, this issue is
solely about debugger start.
Comment 19 Roman Ondruska 2005-03-24 10:57:43 UTC
Closing (see above).
Comment 20 Max Sauer 2005-07-08 11:57:41 UTC
Verified in nbdev 200507061800.
Comment 21 Quality Engineering 2010-04-29 09:21:47 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.