Bug 199082

Summary: Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint
Product: WebKit Reporter: Saam Barati <saam>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case
none
Patch
mattbaker: review+
Patch none

Description Saam Barati 2019-06-20 14:53:10 PDT
Created attachment 372587 [details]
test case

This is happening to me on r246642 using a debug build. Attaching html test case here. (If you use a debug build, you'll need to wait until I land https://bugs.webkit.org/show_bug.cgi?id=198775 to have the WHLSL program not crash).

Repro steps:
1. Set a breakpoint on the line: "const shaderModule = device.createShaderModule({code: shaderSource, isWHLSL: true});"
2. reload the page
3. breakpoint will hit, then shortly, inspector will hit this error
Comment 1 Saam Barati 2019-06-20 14:53:58 PDT
stack trace shown in inspector:

null is not an object (evaluating 'syntaxTree.containersOfPosition')​ (at SourceCodeTextEditor.js:​1443:​35)​
    ?​ @ SourceCodeTextEditor.js:​1443:​35
    makeSyntaxTreeAndCallCallback @ Script.js:​212:​21
    ?​ @ Script.js:​226:​42
    promiseReactionJob @ [native code]​
Comment 2 Devin Rousso 2019-06-20 15:09:45 PDT
Created attachment 372589 [details]
Patch
Comment 3 Matt Baker 2019-06-20 15:54:08 PDT
Comment on attachment 372589 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372589&action=review

rs=me

> Source/WebInspectorUI/ChangeLog:10
> +        The script syntax tree may be fetched even if the resources hasn't finished parsing (or had

Nit: either "resource" or "resources haven't"
Comment 4 Devin Rousso 2019-06-20 17:49:17 PDT
Created attachment 372603 [details]
Patch
Comment 5 WebKit Commit Bot 2019-06-20 18:20:29 PDT
The commit-queue encountered the following flaky tests while processing attachment 372603 [details]:

imported/w3c/web-platform-tests/content-security-policy/reporting/report-multiple-violations-02.html bug 199095 (author: dbates@webkit.org)
fetch/fetch-worker-crash.html bug 187257 (author: youennf@gmail.com)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2019-06-20 18:21:14 PDT
Comment on attachment 372603 [details]
Patch

Clearing flags on attachment: 372603

Committed r246667: <https://trac.webkit.org/changeset/246667>
Comment 7 WebKit Commit Bot 2019-06-20 18:21:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-06-20 18:22:19 PDT
<rdar://problem/51969446>