-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible regression in enum handling with pyside2 #14156
Comments
Does this only happen with this command or with others too that load a task dialog (e.g. Pad, Pocket, ...)? |
I wonder whether the two toEnum() functions really have to be that complicated and that we can't simply write:
This will have the same effect like the casts to an int on Python side: In #13611 it was claimed that this cast caused various problems but when looking at the mentioned issues all of them had other reasons and thus I doubt that |
For some reason the passed value to
|
From the code I think this will happen with any dialog that is created in python, but I haven't checked. Using
That was clear, but it worked before and I supect some weired interactions with package updates. But It could also be just the PR that changed the I can test with your simplified function, I'm sure that will work. |
@wwmayer I tested the simplified functions you posted and the crash is gone. |
Is there an existing issue for this?
Problem description
With the current set of packages on Arch Linux I get a SIGABRT when calling the "Involute Gear" command from PartDesign.
Full version info
Subproject(s) affected?
PartDesign
Anything else?
The last Arch Linux updates to python 3.12 caused some problems with pyside2 because it's not officially supported. With some patches it works, but something has changed with the enum handling.
This could be a regression from #13611. The
getStandardButtons
now returns aQFlags<QMessageBox::StandardButton>
akaQMessageBox::StandardButtons
, but theShiboken::Enum::check()
function returns false, triggering an assert inShiboken::Enum::getValue()
.If I compile against Qt6 with pyside6, the assert is not triggered.
I haven't figured out who really caused this. It could be libshiboken, python 3.12, #13611 or a combination of those.
If I patch the
PythonWrapper::toEnum()
function toit will work because flags are convertable to a number by
PyNumber_Long()
.Code of Conduct
The text was updated successfully, but these errors were encountered: