Skip to content

Crash in Python binding #40

@klayoutmatthias

Description

@klayoutmatthias

Please refer to https://www.klayout.de/forum/comments.php?DiscussionID=989&page=1#Item_10 for the discussion.

The issue happens with this code:

poly = pya.Polygon(pya.Box(1, 2, 3, 4)).move(10, 20)
print poly

This code makes the application crash. Reason: "Polygon#move" returns a C++ reference which becomes invalid when the previously created polygon gets discarded. The solution is to use "moved" which returns a copy.

Apparently 0.24 could handle this case, hence this ticket.

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