Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'nodeType' of undefined #355

Open
devatwork opened this issue May 21, 2021 · 3 comments
Open

Cannot read property 'nodeType' of undefined #355

devatwork opened this issue May 21, 2021 · 3 comments

Comments

@devatwork
Copy link
Contributor

Found by #349

!!! Crash found !!!
Selector: fn:empty((1,2,3)[/0])
Language: XPath3.1

TypeError: Cannot read property 'nodeType' of undefined
    at bs.evaluate (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:273:714)
    at ok (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:164:440)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:277:7)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:61:253)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Xc.E.first (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:59:76)
    at Xc.E.G (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:60:376)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:62:153)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
@devatwork
Copy link
Contributor Author

!!! Crash found !!!
Selector: string((1, 2! /))
Language: XPath3.1

TypeError: Cannot read property 'nodeType' of undefined
    at bs.evaluate (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:273:714)
    at ok (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:164:440)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:263:587)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:94:402)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Xc.E.ya (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:61:130)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:62:214)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Xc.E.first (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:59:76)

@devatwork
Copy link
Contributor Author

!!! Crash found !!!
Selector: fn:sum((1 to 100)[/tk0], 0)
Language: XPath3.1

TypeError: Cannot read property 'nodeType' of undefined
    at bs.evaluate (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:273:714)
    at ok (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:164:440)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:277:7)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:61:253)
    at Object.next (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:58:985)
    at Xc.E.first (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:59:76)
    at Xc.E.G (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:60:376)
    at ud.mu [as value] (C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:605:29)
    at C:\fontoxml\platform\fontoxpath\dist\fontoxpath.esm.js:181:201

@jarivm
Copy link
Contributor

jarivm commented Jun 4, 2021

The first error occurs in AbsolutePathExpression. Just the /0 part of fn:empty((1,2,3)[/0]) seems to be accepted in the XPath playground, resulting in 0. Anyway, I don't know what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants