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

null container causing a TypeError exception #42

Open
tharrington1 opened this issue May 12, 2015 · 0 comments
Open

null container causing a TypeError exception #42

tharrington1 opened this issue May 12, 2015 · 0 comments

Comments

@tharrington1
Copy link

A null ref exception is thrown occasionally when I'm parsing a well-formed xml file. I don't know how to reproduce this since it doesn't happen all the time. My code uses stream pause/resume a lot, so maybe there's a timing component to this bug. Logging here as an fyi to the author.

/home/tim/parser/node_modules/xml-stream/lib/xml-stream.js:430
      container[container.length - 1] = val;
                         ^
TypeError: Cannot read property 'length' of undefined
    at null.<anonymous> (/home/tim/parser/node_modules/xml-stream/lib/xml-stream.js:430:26)
    at EventEmitter.emit (events.js:95:17)
    at Parser.parse (/home/tim/parser/node_modules/xml-stream/node_modules/node-expat/lib/node-expat.js:23:22)
    at parseChunk (/home/tim/parser/node_modules/xml-stream/lib/xml-stream.js:513:14)
    at ReadStream.<anonymous> (/home/tim/parser/node_modules/xml-stream/lib/xml-stream.js:533:11)
    at ReadStream.EventEmitter.emit (events.js:95:17)
    at ReadStream.<anonymous> (_stream_readable.js:746:14)
    at ReadStream.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    at emitReadable (_stream_readable.js:404:5)
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

1 participant