[Rock-dev] Bug in qtruby connect in combination with blocks and metods

Sylvain Joyeux sylvain.joyeux at dfki.de
Fri Jan 14 10:00:24 CET 2011


On 01/14/2011 09:34 AM, Alexander Duda wrote:
> There is a very ugly bug in qtruby. The following connections are no
> longer working if the program needs more memory.
Is it your analysis of the problem, or did you ask the qtruby developers ?

> QObject.connect(SIGNAL(:signal)) do
> 	puts 123
> end
>
> QObject.connect(SIGNAL(:signal),myobj,:mymethod) do
> 	puts 123
> end
>
> The reason is that the garbage collector seems to delete the
> Qt::BlockInvocation / Qt::SignalBlockInvocation / Qt::MethodInvocation
> objects which are generated by the methods Internal.signal_connect,
> Internal.method_connect and Internal.connect (qtruby4.rb:2862).
>
> A fix for this would be a static array where a reference to each object
> is stored.
>
> Any suggestions?
If that's the case, you can always override #connect in vizkit ... But 
that's annoying.
-- 
Sylvain Joyeux (Dr.Ing.)
Space & Security Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
-----------------------------------------------------------------------


More information about the Rock-dev mailing list