Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.13.1
-
None
-
macOS 10.13.6
PySide2 installed through pip
Python3 installed using macports
Description
When using an Enum based custom type, declaring a signal with:
from enum import Enum
class Color(Enum):
RED = 1
GREEN = 2
BLUE = 3
class MyObject(QObject):
mySignal = Signal(MyEnum)
triggers a crash on load of the file.
However, putting the class in a list of parameters makes it work correctly
{{ class MyObject(QObject):}}
mySignal = Signal([MyEnum])
The stack trace shows:
{{ thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)}} {{ frame #0: 0x0000000103619760 libpyside2.abi3.5.13.dylib`PySide::Signal::getTypeName(_object*) + 16}} {{ libpyside2.abi3.5.13.dylib`PySide::Signal::getTypeName:}} {{ -> 0x103619760 <+16>: movq 0x8(%rbx), %rdi}} {{ 0x103619764 <+20>: callq 0x103624fc2 ; symbol stub for: PyType_GetFlags}} {{ 0x103619769 <+25>: testl %eax, %eax}} {{ 0x10361976b <+27>: js 0x1036197c7 ; <+119>}}