Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
1.2.x
Description
Two different C++ objects may have the same C pointer address. An example is QTextEdit.ExtraSelection which is a fairly simple struct whose first member is a cursor. With pyside / shiboken:
from PySide2 import shiboken2 as shiboken from PySide2.QtWidgets import * extra = QTextEdit.ExtraSelection() cursor = extra.cursor print(shiboken.getCppPointer(extra)) print(shiboken.getCppPointer(cursor))
Both will have the same address. The probable bug is that both are registered in binding manager's wrapperMapper and code looking up one or the other may get the wrong wrapper. I found this when I inserted local changes to ensure two wrappers aren't inserted in the wrapperaMapper; I don't know of an observable bug caused by this.
Attachments
Issue Links
- relates to
-
PYSIDE-224 SegFault due to erroneous identification of a variable as QListWidgetItem
- Closed
-
PYSIDE-31 shiboken.wrapInstance returns the type of object passed whereas sip.wrapinstance returns the best possible match
- Closed