newwindow() crashes unexpectedly
Atcold opened this issue · 1 comments
Running this
for i = 1,100 do
win = qtwidget.newwindow(math.random(500),math.random(500))
print('Iteration ' .. i)
win:close()
end
will cause this, at a random "iteration"
qlua: /usr/local/share/lua/5.1/qtwidget/init.lua:222: bad argument #1 to 'connect' (QObject expected, got userdata)
stack traceback:
[C]: at 0x010191b980
[C]: in function 'connect'
/usr/local/share/lua/5.1/qtwidget/init.lua:222: in function 'newwindow'
Is there a way to close the current window without creating problems?
This should fix it.
It seems that this was related to differences in the way lua and luajit handle weak tables.
-
L.
From: Alfredo Canziani [mailto:notifications@github.com]
Sent: Thursday, July 31, 2014 11:51 AM
To: torch/qtlua
Subject: [qtlua] newwindow() crashes unexpectedly (#5)
Running this
for i = 1,100 do
win = qtwidget.newwindow(math.random(500),math.random(500))
print('Iteration ' .. i)
win:close()
end
will cause this, at a random "iteration"
qlua: /usr/local/share/lua/5.1/qtwidget/init.lua:222: bad argument #1 to 'connect' (QObject expected, got userdata)
stack traceback:
[C]: at 0x010191b980
[C]: in function 'connect'
/usr/local/share/lua/5.1/qtwidget/init.lua:222: in function 'newwindow'
Is there a way to close the current window without creating problems?
—
Reply to this email directly or view it on GitHub #5 . https://github.com/notifications/beacon/612213__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMjQ0MTA1OCwiZGF0YSI6eyJpZCI6Mzg1MDMzMjd9fQ==--d412487bf2efce083d99762ab8e6dc72b8ef442b.gif