[Rock-dev] weired typelib related error

Sylvain Joyeux sylvain.joyeux at dfki.de
Mon Jun 11 11:16:59 CEST 2012


On 06/08/2012 11:27 AM, Janosch Machowinski wrote:
> I would like to point out, that this is your code
I don't see how that is even remotely relevant. I'm not allowed to write 
code that has bugs or what ? You of all people should know that I do ;-)

> It randomly fails at
> 11:16:30.059 (Roby)
> /home/imoby/dev-m3/install/share/typelib/ruby/corridor_plan.rb:100:in
> `block in split',
> The problem is the access of new_corridor.boundary_curves it seems that
> as soon as one tries to assign
> a value to it the constructor for the spline gets called. Which is
> weired, boundary_curves is a static array,
> the elements should be constructed when new_corridor gets constructed.
Nope. The *typelib data* is created when new_corridor gets constructed, 
the Spline is created only when needed, which happens when the array is 
accessed. Assigning the whole array at once instead of 
element-by-element should fix the problem. I did a quick test script, 
and it indeed seems to be the problem. (Untested) patch attached to this 
mail.

typelib/ruby should definitely allow to define constructors for data 
structures.
-- 
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
-----------------------------------------------------------------------
-------------- nächster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname   : 0001-ruby-fix-initialization-of-new_corridor.boundary_cur.patch
Dateityp    : text/x-diff
Dateigr??e  : 0 bytes
Beschreibung: nicht verf?gbar
URL         : http://www.dfki.de/pipermail/rock-dev/attachments/20120611/ea08c352/attachment.patch 


More information about the Rock-dev mailing list