Skip to content

Multiple assertion failures for Python classes derived from System.Exception in debug builds #1218

@lostmsu

Description

@lostmsu

Environment

  • Pythonnet version: 2.5.1
  • Python version: 3.8
  • Operating System: Win 10 64

Details

In debug build (DebugWinPY3) this test:

class Sub(System.Exception):

fails this assertion:

Debug.Assert(typeSize > 0 && typeSize <= ExceptionOffset.Size());

Python type object for Sub class gets an unknown extra field of size IntPtr.Size, causing it to be larger than its base type object (reflected) System.Exception.

See also #1196 (comment) for previous discussion.

@koubaa @amos402

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy