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

Alexander Duda Alexander.Duda at dfki.de
Fri Jan 14 09:34:07 CET 2011


There is a very ugly bug in qtruby. The following connections are no
longer working if the program needs more memory.

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?

Alex 


-- 
Dipl.-Ing. Alexander Duda 
Unterwasserrobotik

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

Phone: +49 (0)421 178-456620
Fax:   +49 (0)421 178-454150
E-Mail: alexander.duda 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