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 167578 - "break no thread" breakpoint suspends target thread (for a split second)
Summary: "break no thread" breakpoint suspends target thread (for a split second)
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-24 09:46 UTC by Vojtech Sigler
Modified: 2009-07-09 09:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vojtech Sigler 2009-06-24 09:46:38 UTC
Product Version: NetBeans IDE 6.7 (Build 200906212001)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Linux version 2.6.28-13-generic running on i386; UTF-8; en_US (nb)

also confirmed in

Product Version: NetBeans IDE Dev (Build 200906220201)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Linux version 2.6.28-13-generic running on i386; UTF-8; en_US (nb)

When a breakpoint with setting "Suspend: no thread (continue)", it suspends the target thread for a split second. Mostly
it probably does not matter, but if I create such a breakpoint inside a cycle or any rapidly repeated bit of code, it
causes the Continue button to blink rapidly many times per second. The suspend/resume button in the Debugging view is
blinking as well. If I also open the Threads view and display the "Suspended" column, the checkbox in this column blinks
as well and the IDE slows down quite a bit in responsiveness (on a dual core 2GHz 2G ram, both cores at 100% cpu time
consumed by Netbeans and the running project).

Here is a sample code to reproduce this:

public class FlashTest {

    public static void main(String[] args) {
        for (;;)
        {
            System.out.println("Hi"); //<--add breakpoint on this line
        }
    }

}

Does a "suspend no thread" breakpoint really need to actually suspend the target thread (even though it's for a split
second)? Also the fact that the breakpoint actually *DOES* suspend the thread contradicts the setting "Suspend: no thread".
Comment 1 Martin Entlicher 2009-06-30 14:06:09 UTC
Well, it needs to suspend the thread in order to show the location and eventually also print some values into the
Debugger Console as specified by the print text. But it should not cause the Debugging (and others) window to blink.
Comment 2 Martin Entlicher 2009-07-07 15:41:13 UTC
Fixed in changeset:   137388:ee23e0e1b5a6
http://hg.netbeans.org/main/rev/ee23e0e1b5a6
The thread looks like running until we process the event and know that it should be really suspended.
Comment 3 Martin Entlicher 2009-07-07 15:46:13 UTC
(Fix corrected in http://hg.netbeans.org/main/rev/86b7cb62128f).
Comment 4 Quality Engineering 2009-07-08 05:35:32 UTC
Integrated into 'main-golden', will be available in build *200907080200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ee23e0e1b5a6
User: mentlicher@netbeans.org
Log: #167578 - Until the thread is processing an event, the thread will look like running. This prevents from unnecessary refreshing of various UI components (stack frames, variables), pause/continue actions.
Comment 5 Vojtech Sigler 2009-07-09 09:40:31 UTC
Verified in trunk build (200907090200).