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 226022 - Embedded browser - sometimes line w/o breakpoint is hit after modifications
Summary: Embedded browser - sometimes line w/o breakpoint is hit after modifications
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 14:50 UTC by Vladimir Riha
Modified: 2013-03-05 13:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
webkit log code stopped on wrong line (76.64 KB, text/plain)
2013-02-12 14:50 UTC, Vladimir Riha
Details
rest of webkit log after continue (3.75 KB, text/x-log)
2013-02-12 14:51 UTC, Vladimir Riha
Details
IDE log (41.12 KB, text/x-log)
2013-02-12 14:51 UTC, Vladimir Riha
Details
sample project (5.35 KB, application/zip)
2013-02-12 14:53 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-02-12 14:50:14 UTC
Created attachment 131293 [details]
webkit log code stopped on wrong line

This seems to be issue only with embedded browser, Chrome is OK, and it is "random" (not always reproducible). I'll attach sample project:

- add line breakpoint to debugMod.html:14 (if possible in Dev builds, workaround would be to move the embedded JS in debugMode.html to own JS file)
- add line breakpoint to linebpMod.js:4 (line with "console.log("start");")
- run index.html twice in embedded browser
- press continue F5, so code execution stops at linebpMod.js:4 and add 3 lines BEFORE line 4, so result would be e.g.:

        step = 2;
        console.log("1");
        console.log("2");
        console.log("3");
        console.log("start"); 

- note that in editor and Breakpoints window, correct line with "start" log is marked as having breakpoint
- save the file, so breakpoint at debugMod.html:14 is hit, but do not continue, re-run the file again (LAST STEP)

=> wrong breakpoint is hit (in case of attached webkit log it was line 4), if I continue F5, then the expected line breakpoint is hit. If correct line is hit, just re-run the html file again until you reproduce it. Once I saw that even line 13 with closing "}" of Tester() was hit and then the expected one...

It might be some race condition, as LAST STEP seems to be necessary on Linux but I can't reproduce it w/o it on virtualized Windows7 (where I expect everything is a bit slower). I'm not sure about priority, not always reproducible + embedded browser, I'd vote more for P3.



Product Version: NetBeans IDE 7.3 (Build 201302062200)
Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 1 Vladimir Riha 2013-02-12 14:51:34 UTC
Created attachment 131295 [details]
rest of webkit log after continue

Rest of webkit log after I pressed continue (at the moment execution was stopped on incorrect line) and this continue brought me to expect line
Comment 2 Vladimir Riha 2013-02-12 14:51:48 UTC
Created attachment 131296 [details]
IDE log
Comment 3 Vladimir Riha 2013-02-12 14:53:16 UTC
Created attachment 131297 [details]
sample project
Comment 4 Vladimir Riha 2013-02-12 15:39:35 UTC
Similar case is with deleting line breakpoint. It seems that sometimes the first run after line breakpoint changes these changes are not fully reflected by embedded browser. Again Chrome does not suffer of this and also this is more visible in Windows than Linux.

This could be a duplicate of issue 225407
Comment 5 Vladimir Riha 2013-02-12 15:43:51 UTC
Workaround: close browser window after line breakpoint modifications
Comment 6 Vladimir Riha 2013-02-14 10:25:50 UTC
Possible patch candidate if the fix will be safe
Comment 7 Martin Entlicher 2013-03-04 16:12:05 UTC
I hope that this was fixed by the fix of issue #225407.
I'm not able to reproduce this bug after the fix. Please verify...
Comment 8 Vladimir Riha 2013-03-05 13:23:11 UTC
Thanks, I cannot reproduce it either


Product Version: NetBeans IDE Dev (Build 201303042300)
Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)