alexscheelmeyer / node-phantom

bridge to PhantomJS from Node.js
317 stars 117 forks source link

phantom crash: code -1073741819 on setting view port #89

Open majuansari opened 10 years ago

majuansari commented 10 years ago

I am getting "phantom crash: code -1073741819" on setting view port width to a value greater 600 .

Following is the code i use

 var phantom = require('node-phantom');
            phantom.create(function (err, ph) {
        ph.createPage(function (err, page) {
    page.get('viewportSize',function(err,value){
        console.log(value);
        page.set('viewportSize',{width:800,height:600},function(err){
             page.set('content',data.html, function (err, status) {
            setTimeout(function() {
                page.render('capture.png',function(err){
                console.log("created image");
                //    ph.exit();
                });
                                }, 10000);
            });
        });
    });
        });
      });

If here i set height to 600 it will work fine . //page.set('viewportSize',{width:600,height:600},function(err){

Can any body please help me out on this issue ? Thanks