Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 272962

Summary: [breakpoints] Conditional breakpoint executed twice
Product: [Eclipse Project] JDT Reporter: Paul Webster <pwebster>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, Michael_Rennie
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Paul Webster CLA 2009-04-20 15:00:10 EDT
I have a conditional breakpoint:
System.err.println("dispose: " + getSite() + " : " + this);
return false;


When running, I get:
createEditorPresentation: org.eclipse.ui.internal.PartStack$1@4f744f74 : org.eclipse.ui.internal.presentations.util.TabbedStackPresentation@bee0bee
createEditorPresentation: org.eclipse.ui.internal.PartStack$1@4f744f74 : org.eclipse.ui.internal.presentations.util.TabbedStackPresentation@bee0bee

Since the TabbedStackPresentation is created on each run and stored in a local variable, it appears to be executing twice.

PW
Comment 1 Darin Wright CLA 2009-04-20 15:15:00 EDT
I'm not seeing this in a simple stand alone Java program, are you?
Comment 2 Paul Webster CLA 2009-04-20 15:25:44 EDT
This is simply starting up a self-hosted IDE with the platform-ui plugins in my workspace.

I'm running:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20080315 (SR7))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20080315 (JIT enabled)
J9VM - 20080314_17962_lHdSMr
JIT  - 20080130_0718ifx2_r8
GC   - 200802_08)
JCL  - 20080314


Sorry, the conditional breakpoint is:
System.err.println("createEditorPresentation: " + site + " : " + result);
return false;

Where result is a local variable from the line above:
TabbedStackPresentation result = new ....;

My first example was from was from the dispose (not useful).  

I'll see if I can reproduce this tomorrow.

PW
Comment 3 Paul Webster CLA 2009-04-20 15:26:13 EDT
(In reply to comment #2)
> 
> I'll see if I can reproduce this tomorrow.

I mean, I'll try with some simple programs to help narrow it down.

PW

Comment 4 Paul Webster CLA 2009-04-20 16:00:27 EDT
I'm using "TabbedStackPresentation@bee0bee" as proof that the breakpoint is being executed twice since result is local.

Is there a way to make sure that it is a unique object (or is that good enough)?

PW
Comment 5 Darin Wright CLA 2009-04-20 16:08:57 EDT
You can compare the Object ID's (display the "Instance ID" column - the view menu "Layout > Select Columns..." action, when debugging). You should be able to see if the breakpoint is being hit in the same object/this instance. If you just insert a line breakpoint with no condition, how many times is the breakpoint hit?
Comment 6 Eclipse Genie CLA 2020-03-25 15:46:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.