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 254366 - JPDA watch expression evaluator blocks further processing when a watch is deleted
Summary: JPDA watch expression evaluator blocks further processing when a watch is del...
Status: VERIFIED DUPLICATE of bug 250305
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 09:35 UTC by stwr
Modified: 2015-08-14 12:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Never ending waiting (25.99 KB, image/png)
2015-08-14 09:37 UTC, stwr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-08-14 09:35:23 UTC
Product Version = NetBeans IDE Dev (Build 201508130002)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_60-ea
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

--Use Case--

1. Open some Java project
2. Create watch 'a'
3. Toggle some line breakpoint and start debugger session
4. Edit the watch 'a' once debugger stops on the breakpoint; type 'while(true)' as name for the watch
5. Confirm the watch change

--Mid-Result--
Watch evaluator works. 'Type' and 'Value' columns are displaying 'Evaluating...' for the watch

--Use Case cont'd--

6. Delete watch

--Expected result--
Watch is deleted and 'Watches'/'Variables' views are refreshed

--Actual result--
The 'Watches' and 'Variables' views are not refreshed. There is 'Please wait...' notification shown.
The same happens to 'Breakpoints', 'Sessions' and 'Call Stack' view.

It seems that expression evaluator is not interrupted when JPDAWatch.remove() is being called but I did not have enough time to analyze the source code.
Comment 1 stwr 2015-08-14 09:37:26 UTC
Created attachment 155341 [details]
Never ending waiting
Comment 2 Martin Entlicher 2015-08-14 10:25:35 UTC
Sorry, but you can not expect the program to recover, when you execute 'while(true)'.
When you have 'while(true)' in your program, you can not do anything, but kill that program. Watch evaluation simply changes the program flow to execute the expression.

We have already issue #250305 to try to solve never-ending evaluations somehow. Even if we manage to interrupt the evaluation somehow, it can leave the program in an inconsistent state.

*** This bug has been marked as a duplicate of bug 250305 ***
Comment 3 Jiri Kovalsky 2015-08-14 12:57:32 UTC
Verified as duplicate.