Skip to content

Assertion `handle->InternalFieldCount() > 0' failed. #23

@chengluyu

Description

@chengluyu

Forgive my poor English.:)

In my computer, both Windows XP SP3 and Ubuntu 13.04, when I run the example code in README.md. It reported error :Assertion `handle->InternalFieldCount() > 0' failed.

The code in README.md:

var qt = require('node-qt'),
    app = new qt.QApplication,
    window = new qt.QWidget;

// Prevent objects from being GC'd
global.app = app;
global.window = window;

// Quirk: the virtual method paintEvent() is mapped into a callback setter
window.paintEvent(function() {
  var p = new qt.QPainter();
  p.begin(window);
  p.drawText(20, 30, 'hello node, hello qt');
  p.end();
});

window.resize(300, 150);
window.show();

// Join Node's event loop
setInterval(app.processEvents, 0);

But after I replace the statement

setInterval(app.processEvents, 0);

with

setInterval(function () {
  app.processEvents();
}, 0);

It's okay. Is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions