Description
Starting the attached script test.py leads to this message followed by a hard crash of the python interpreter. I get the errors stating "UNRECOGNIZED: QSharedPointer" all over the place when working with classes using QSharedPointers. I think there are two parts of this issues:
- The templated QSharedPointer[ptest.A] leads to a strange error message and traceback making it hard to follow the actual problem.
- The crash itself.
/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/parser.py:191: RuntimeWarning: pyside_type_init: UNRECOGNIZED: 'ptest.QSharedPointer' OFFENDING LINE: 'ptest.D.set(l:QList[ptest.QSharedPointer[ptest.A]])' """.format(thing, line), RuntimeWarning) Traceback (most recent call last): File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/loader.py", line 93, in pyside_type_init return parser.pyside_type_init(type_key, sig_strings) File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/parser.py", line 435, in pyside_type_init props = calculate_props(line) File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/parser.py", line 324, in calculate_props annotations[name] = _resolve_type(ann, line, 0, handle_argvar) File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/parser.py", line 260, in _resolve_type part = var_handler(_resolve_type(part, line, level+1, var_handler)) File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/parser.py", line 267, in _resolve_type return eval(result, namespace) File "<string>", line 1, in <module> AttributeError: module 'ptest' has no attribute 'QSharedPointer' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/loader.py", line 101, in seterror_argument return errorhandler.seterror_argument(args, func_name) File "/tmp/shiboken2-tests/lib/python3.7/site-packages/shiboken2/files.dir/shibokensupport/signature/errorhandler.py", line 99, in seterror_argument sigs = get_signature(func, "typeerror") SystemError: <built-in function get_signature> returned a result with an error set Fatal Python error: seterror_argument did not receive a result Current thread 0x00007fa03c1c7740 (most recent call first): File "test.py", line 5 in main File "test.py", line 7 in <module> Aborted
Attachments
Issue Links
- duplicates
-
PYSIDE-1367 Shiboken crashes with invalid signature
- Closed
For Gerrit Dashboard: PYSIDE-1212 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
314135,3 | shiboken2: Work around signature problems with smart pointer instantiations | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
314142,2 | Signature parser: Report error when eval fails | 5.15 | pyside/pyside-setup | Status: MERGED | +2 | 0 |