Details
Description
In a new module created using shiboken tools the generated code crashes when calling the function with an invalid signature,
This is the function signature generated:
PyQiTissue.Data.DataPipelineItemViewSettings.viewSettings(self,gate:PyQiTissue.Data.DataPipelineItems.AbstractGate)->std.optional[PyQiTissue.Data.DataPipelineItems.GateViewSettings]
This std::optional causes the problem:
tmp/embedded.f__6ji3c.zip/shibokensupport/signature/parser.py:199: RuntimeWarning: pyside_type_init: UNRECOGNIZED: 'std.optional' <renatu> OFFENDING LINE: '2:PyQiTissue.Data.DataPipelineItemViewSettings.viewSettings(self,gate:PyQiTissue.Data.DataPipelineItems.AbstractGate)->std.optional[PyQiTissue.Data.DataPipelineItems.GateViewSettings]'
this crash because in the signature.cpp line 341
PyObject *dict = PyObject_CallObject(pyside_globals->pyside_type_init_func, arg_tup); if (dict == nullptr) { if (PyErr_Occurred()) // ************** THIS RETURN NOT NULL return nullptr; // No error: return an empty dict. if (empty_dict == nullptr) empty_dict = PyDict_New(); return empty_dict; }
And because of PyErr was set we get this assert and the app crashes.
Fatal Python error: seterror_argument did not receive a result