vespa / semantic-schema-parser

22 stars 6 forks source link

Node.js: Callback Does Not Get Call Until Abortion #4

Closed infty- closed 8 years ago

infty- commented 9 years ago

Specs

Node version: v0.10.33

Sample

var sm = require("semantic-schema-parser");

// src = source code of http://lakim.bandcamp.com/album/remixes (as an example)

console.log('--sm start');
sm.parseContent(src, function (msg) {
   console.log('--sm callback');
   console.log(JSON.stringify(msg));
   console.log('\n');
});
console.log('--sm after call');

Outputs:

--sm start
searching for microdata
{{cursor keeps blinking at this position}}

The JSON output (from console.log(JSON.stringify(msg));) doesn't get written to stdout until I abort the programm using ^C.

Bottom Line

Any idea why this could happen? (If there's still somethings unclear about the circumstances in which the problem occurs, please ask.)

Thanks.

vespa commented 9 years ago

I'll check that.

Are you using the original source code or the rendered at your test? Maybe some malformed HTML is crashing the process.