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 122293 - Conditional breakpoint doesn't work
Summary: Conditional breakpoint doesn't work
Status: CLOSED INVALID
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-11-19 13:56 UTC by Anton Chechel
Modified: 2010-04-29 09:37 UTC (History)
2 users (show)

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 Anton Chechel 2007-11-19 13:56:49 UTC
Product Version: NetBeans IDE Dev (Build 071113)
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Userdir: C:\Documents and Settings\Manowar\.netbeans\dev

Steps to reproduce:
1. Create java project
2. Create Main class:

===============
1 package javaapplication4;
2
3 import java.awt.Color;
4
5 public class Main {
6
7    public static void main(String[] args) {
8        final int height = 256;
9        final int width = 256;
10
11        for (int x = 0; x < width; x++) {
12            float hue = (float) x / (float) width;
13            for (int y = 0; y < height; y++) {
14                float saturation = 1f;
15                float brightness = 1f;
16                if (y < height / 2) {
17                    saturation = (float) y * (float) 2 / (float) height;
18                } else {
19                    brightness = 1f - (float) (y - height / 2) / (float) height;
20                }
21                Color color = new Color(Color.HSBtoRGB(hue, saturation, brightness));
22            }
23        }
24    }
25
26 }
===============

3. Put breakpoint with condition x == 255 at line #12.
4. Run. Breakpoint works.
5. Remove first breakpoint and put breakpoint with condition y == 255 at line #21.
6. Run. Breakpoint works.
7. Change condition of second breakpoint at line #21 to x == 255.
8. Run. Breakpoint doesn't work. Application stuck untill you remove breakpoint.
Comment 1 Anton Chechel 2007-11-19 16:09:36 UTC
I this this P1 should be fixed in 6.0.
Comment 2 Anton Chechel 2007-11-19 16:10:02 UTC
I think*
Comment 3 ehucka 2007-11-19 16:28:05 UTC
We cannot reproduce it. Do you mean Continue Or Start debugging by 'Run' action in steps? thanks
Comment 4 Martin Entlicher 2007-11-19 18:00:22 UTC
The breakpoint is hit, but it takes some time.
The condition needs to be evaluated 65280 times in the last case and this takes some time. We need to stop on the
breakpoint, retrieve the value of the variable, compare it and resume the application again.
The breakpoint was hit after 1 minute for me.
Comment 5 Anton Chechel 2007-11-20 08:58:12 UTC
> Do you mean Continue Or Start debugging by 'Run' action in steps?
I mean Start debugging.
Comment 6 Quality Engineering 2010-04-29 09:37:12 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.