sip: Accessing members results in incorrect/missing data

Matthijs van der Burgh <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <AM0PR09MB38092A98812FE62A955BDD5AA23A0@AM0PR09MB3809.eurprd09.prod.outlook.com>
Hey All,

I think my problem is related to http://python.6.x6.nabble.com/sip-Member-objects-and-GC-td4503261.html, but this thread doesn't provide me any solution.

I have been using the following library for a long time: https://github.com/orocos/orocos_kinematics_dynamics

I have been using ubuntu 16.04 with sip 4.15.5 for a long time. Now I am moving to ubuntu 18.04 and sip 4.15.5 isn't working anymore.

Some versions of SIP will cause a segmentation fault on import of PyKDL, others will cause the following issue.

By accessing a member directly after calling a constructor or other operations which will return a new instance, the data of the member is incorrect.

By executing the following code:
```
# Part of an unittest.Testcase
v=Vector(3,4,5)
v1=Vector(4,-2,1)
w=Wrench(Vector(7,-1,3),Vector(2,-3,3))
t=Twist(Vector(6,3,5),Vector(4,-2,7))
R = Rotation.EulerZYX(radians(10),radians(20),radians(-10))
F = Frame(R, v1)
F2 = Frame(F)
v2 = Frame(F).p
self.assertEqual(F,F2)
self.assertEqual(F.p,Frame(F).p)
```
This last line will result in the following error:
```
ts/framestest.py", line 150, in testFrame
    self.assertEqual(F.p,Frame(F).p)
AssertionError: [           4,          -2,           1] != [           0,          -2,           1]
```
I have tried to locate the changes which caused the problem. I did this on ubuntu 16.04 as there 4.15.5 does work. I used the master branch of the KDL libary. I have started from 4.15.5 up to newer version till the error started to show up. I found that 4.16.8 is the first version which breaks the bindings. Especially changeset 11a92ebd4840, https://www.riverbankcomputing.com/hg/sip/rev/11a92ebd4840.

I hope you could help.

Kind regards,
Matthijs van der Burgh

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.