Skip to content
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

libshiboken: Overflow: #68

Open
melMass opened this issue Jul 15, 2018 · 2 comments
Open

libshiboken: Overflow: #68

melMass opened this issue Jul 15, 2018 · 2 comments

Comments

@melMass
Copy link

melMass commented Jul 15, 2018

On maya 2017 I have the following error.

Replacing sys.maxint with maxint = 2 ** (struct.Struct('i').size * 8 - 1) - 1 works.

@BigRoy
Copy link
Member

BigRoy commented Jul 15, 2018

Can you post the exact error? How to reproduce it? And also, how come this fixes it?

@melMass
Copy link
Author

melMass commented Jul 15, 2018

Sorry about that, I just posted it quickly as I was fixing it.

So it's in the file timeplugin.py line 106
sys.maxintreturns 9223372036854775807

and trigger the following error:

# RuntimeWarning: libshiboken: 
Overflow: Value -9223372036854775807 exceeds limits of type  [signed] "i" (4bytes)., at line 106, in "${HOME}/Library/Preferences/Autodesk/maya/2017/scripts/capture_gui/plugins/timeplugin.py"
# OverflowError
# RuntimeWarning: libshiboken: Overflow: Value 9223372036854775807 exceeds limits of type  [signed] "i" (4bytes)., at line 106, in ${HOME}/Library/Preferences/Autodesk/maya/2017/scripts/capture_gui/plugins/timeplugin.py"

Whereas 2 ** (struct.Struct('i').size * 8 - 1) - 1 which computes C's maxint returns 2147483647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants