Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: V8 Null Pointer crash when using "for (let a of hostObj)"

$
0
0
In my application, the following code works for two successive calls but then causes a null pointer crash in v8-x64.dll during the third call:
function volumeOperation(choiceResults) {
    for (let c of choiceResults) {
        // anything here
     }
}
where choiceResults is a Dictionary<string, List<object>> passed in via a callback call. If I change this code to the following:
function volumeOperation(choiceResults) {
    const results = choiceResults.GetEnumerator();
    while (results.MoveNext()) {
        const c = results.Current;
        // anything here
    }
}
it does not crash. I've tried to reproduce this in C# Interactive but I was not successful. Hopefully this is useful anyway, but let me know if there's any additional information or experimenting I can provide to help narrow it down (or if I've done something wrong).

I'm using the NuGet ClearScript.V8 5.4.6 package, and here's the crash dialog in case it is helpful: crash dialog

Thanks,
Mike.

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>