title: Error calling method on NPObject! in JavaScript
body: <p>I've got some Visual C++ code (FireBreath) that wants to open a stream using PortAudio. After having done all the initial operations, I have this code:</p>
  <pre><code>err = Pa_OpenStream( &amp;stream, &amp;parametriIngresso, &amp;parametriUscita, SAMPLE_RATE, FRAMES_PER_BUFFER, 0, My_Callback, &amp;myData);
  err = Pa_StartStream(stream);
  
  while( ( err = Pa_IsStreamActive( stream ) ) == 1 )
      {
          Pa_Sleep(1000);
      }
  
  err = Pa_CloseStream(stream);
  </code></pre>
  <p>This function is called from JavaScript, and after a certain number of seconds the plugin crashes giving me a <code>Error calling method on NPObject!</code> error on the line where it's called from in the JavaScript.</p>