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 244452 - Paused debugging session keeps on stealing viewport focus
Summary: Paused debugging session keeps on stealing viewport focus
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Martin Entlicher
URL:
Keywords: FOCUS
: 247241 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-12 21:13 UTC by _ gtzabari
Modified: 2015-05-13 02:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshots of 10 suspended threads with breakpoint hit in Thread-1 which is not visible. (58.03 KB, image/png)
2015-02-11 16:14 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2014-05-12 21:13:33 UTC
Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1.1
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\8.0
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\8.0

1. Open a debugging session with 10+ threads.
2. Cause the session to hit a breakpoint.
3. Click the "Pause" icon to suspend all threads.
4. Scroll down the list of threads in the "debugging" viewport such that the "active" debugging session is no longer in view.
5. Notice that the "active" debugging sessions keeps on forcing the viewport to jump up, so it is back in view.

Expected behavior: suspended threads should not steal viewport focus. The focus should only shift when a breakpoint is hit (which shouldn't happen when the thread is already suspended on a breakpoint).

Please consider assigning this a higher priority because it makes the IDE very annoying to work with.
Comment 1 _ gtzabari 2014-05-12 21:41:24 UTC
To clarify, the problem is even worse than that. Whatever is stealing the focus is forcing the scrollbar position so that the "active" session is at the top of the screen. Meaning, even if the "active" session is technically visible (but its first line is not) the scrollbar will keep on jumping to a different position.

So more clarifications: I am scrolling using the mouse wheel and the scrollbar position doesn't jump 100% of the time. Sometimes I can scroll fine, but most times something is stealing focus. I haven't figured out what is triggering this behavior (why it happens one time but not another).
Comment 2 Martin Entlicher 2014-06-13 12:14:49 UTC
Reproduced.
Comment 3 Martin Entlicher 2014-08-15 09:16:08 UTC
This was fixed in 8.0.1.
Comment 4 _ gtzabari 2014-08-23 15:20:08 UTC
Are there plans to merge this into the dev builds? I can still reproduce it in build 201408220001.
Comment 5 _ gtzabari 2014-11-20 19:24:38 UTC
Reopening. I can still reproduce the problem in:

Product Version: NetBeans IDE 8.0.1 (Build 201408251540)
Updates: NetBeans IDE is updated to version NetBeans 8.0.1 Patch 1.1
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\8.0.1
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\8.0.1
Comment 6 _ gtzabari 2014-11-20 19:42:39 UTC
I think this issue has something to do with tooltips. Focus is only stolen if the mouse is hovering on top of a line item as you scroll down the list with the mouse wheel. If the mouse is not hovering over a line item, focus is not stolen.
Comment 7 Jiri Kovalsky 2015-02-11 16:14:04 UTC
Created attachment 151954 [details]
Screenshots of 10 suspended threads with breakpoint hit in Thread-1 which is not visible.

I am sorry but I can't reproduce it. Did I miss something? Please see the attached screeenshot.
Comment 8 _ gtzabari 2015-03-31 00:06:25 UTC
Jiri,

I need to find a better way to reproduce this. Every time I've been it, I was debugging some sort of web server, whether it be Jetty or Tomcat. Maybe the focus change is triggered by a thread being added or removed from the list (something that is a lot more likely when a web server is being debugged).

In any case, I've seen this bug as late as last week using the nightly build so the issue is definitely still reproducible.
Comment 9 Martin Entlicher 2015-04-30 14:55:34 UTC
There was a fix of this going into 8.0.1, but all fixes go through trunk, therefore trunk has to have the fix as well.
The most probable is, that there is a use-case in which the bug still manifests. The fix might not have been complete.
Comment 10 Martin Entlicher 2015-04-30 14:56:06 UTC
*** Bug 247241 has been marked as a duplicate of this bug. ***
Comment 11 Martin Entlicher 2015-05-11 17:00:35 UTC
It should be fixed by changeset:   287601:3d496df550f1
http://hg.netbeans.org/core-main/rev/3d496df550f1
Comment 12 Quality Engineering 2015-05-13 02:55:17 UTC
Integrated into 'main-silver', will be available in build *201505130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3d496df550f1
User: mentlicher@netbeans.org
Log: #244452: Improve the scrolling of debugging view to hold the desired position and to scroll when user scrolls.