title: bluebird npm TypeError: Cannot read property 'call' of null
body: <p>I am using bluebird npm,I am getting the above error</p>
  
  <p>I am calling three different function &amp; doing some database operation, but I am getting this error.</p>
  
  <p>If I tried with two functions, it is working but with three function it is throwing error, TypeError: Cannot read property 'call' of null.</p>
  
  <p>If you go to bluebird/js/release/using.js and comment the line no 39 ;</p>
  
  <p>If I comment this line, then this issue is not coming &amp; all is working fine.</p>
  
  <p>If you want more info please <a href="https://github.com/petkaantonov/bluebird/issues/1356" rel="nofollow noreferrer">Click Here</a></p>
  
  <pre><code>This is main.js
  
  var myModule = require('../lib/myModule');
  var sync = require('deasync');
  
  var id = 90;
  var moduleObj = new moduleEntity(id);
  console.log(moduleObj);
  
  var id = 90;
  var moduleObj = new moduleEntity(id);
  console.log(moduleObj);
  
  var id = 90;
  var moduleObj = new moduleEntity(id);
  console.log(moduleObj);
  
  In MyModule.js
  
  var deasync = require('deasync');
  var dbEntity = require('../db/dbEntity');
  
  module.exports = function (id) {
  var outputEntity;
  dbEntity(id, function(data){
  outputEntity = data
  });
  while(outputEntity === undefined) { deasync.runLoopOnce();};
  return outputEntity;
  
  };
  
  In dbEntery.js
  
  var Promise = require("bluebird");
  var getConnection = require('./dbcon');
  
  module.exports = function (id,cb) {
  var sql_getRecords = SELECT * from tanle_name;
  
  Promise.using(getConnection, function (conn) {
      return conn.query(sql_getRecords).then(function(data){
          cb(data[0]);
      })
  });
  };
  </code></pre>
  
  <p><strong>Here is error stack trace</strong></p>
  
  <pre><code>TypeError: Cannot read property 'call' of null
  at FunctionDisposer.doDispose (/home/user/Projects/project_name/node_modules/bluebird/js/release/using.js:98:18)
  at FunctionDisposer.Disposer.tryDispose (/home/user/Projects/project_name/node_modules/bluebird/js/release/using.js:78:20)
  at iterator (/home/user/Projects/project_name/node_modules/bluebird/js/release/using.js:36:53)
  at dispose (/home/user/Projects/project_name/node_modules/bluebird/js/release/using.js:48:9)
  at /home/user/Projects/project_name/node_modules/bluebird/js/release/using.js:194:20
  at PassThroughHandlerContext.finallyHandler (/home/user/Projects/project_name/node_modules/bluebird/js/release/finally.js:55:23)
  at PassThroughHandlerContext.tryCatcher (/home/user/Projects/project_name/node_modules/bluebird/js/release/util.js:16:23)
  at Promise._settlePromiseFromHandler (/home/user/Projects/project_name/node_modules/bluebird/js/release/promise.js:510:31)
  at Promise._settlePromise (/home/user/Projects/project_name/node_modules/bluebird/js/release/promise.js:567:18)
  at Promise._settlePromise0 (/home/user/Projects/project_name/node_modules/bluebird/js/release/promise.js:612:10)
  at Promise._settlePromises (/home/user/Projects/project_name/node_modules/bluebird/js/release/promise.js:687:18)
  at Async._drainQueue (/home/user/Projects/project_name/node_modules/bluebird/js/release/async.js:133:16)
  at Async._drainQueues (/home/user/Projects/project_name/node_modules/bluebird/js/release/async.js:143:10)
  at Immediate.Async.drainQueues (/home/user/Projects/project_name/node_modules/bluebird/js/release/async.js:17:14)
  at runCallback (timers.js:651:20)
  at tryOnImmediate (timers.js:624:5)
  </code></pre>
  
  <p>Bluebird version -- 3.5</p>
  
  <p>Node Version -- v7.6.0</p>