-
Notifications
You must be signed in to change notification settings - Fork 748
Multiple assertion failures for Python classes derived from System.Exception in debug builds #1218
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
Comments
It seems that the reason is that
|
Because it used tp_basicsize as the slot to save GCHandle, you can test it on soft-shutdown branch, it should be fine. |
@amos402 not exactly sure what you mean. The reflected |
@lostmsu @amos402 I just took Amos's interop changes from the soft shutdown branch and applied them to master, and this issue goes away. I'll submit a PR soon with this change, even if it doesn't fix my PyType_FromSpec it could still make the soft shutdown branch easier to review without these changes |
Fixed in master |
Environment
Details
In debug build (
DebugWinPY3
) this test:pythonnet/src/tests/test_constructors.py
Line 41 in 61d1b7c
fails this assertion:
pythonnet/src/runtime/interop.cs
Line 92 in 61d1b7c
Python type object for
Sub
class gets an unknown extra field of sizeIntPtr.Size
, causing it to be larger than its base type object (reflected)System.Exception
.See also #1196 (comment) for previous discussion.
@koubaa @amos402
The text was updated successfully, but these errors were encountered: