Skip to content

Segmentation fault debugging aggdraw.Pen #58

@eduardomezencio

Description

@eduardomezencio

Using aggdraw 1.3.10 in arch linux with cpython 3.7, I get a segmentation fault every time my debugger tries to inspect an aggdraw.Pen object. I tried it debugging with pudb3, with vscode python extension and with pycharm. Here's a minimal code:

from PIL import Image
import aggdraw


def main():
    image = create_image()
    image.show()


def create_image():
    image = Image.new('RGBA', (1024, 1024))
    draw = aggdraw.Draw(image)
    pen = aggdraw.Pen('red', 20)
    draw.line((0, 0, 100, 100), pen)
    draw.flush()
    return image


if __name__ == '__main__':
    main()

Put a breakpoint in the line draw.line((0, 0, 100, 100), pen) and try to inspect pen in your debugger to see if you can reproduce it.

I checked some issues here, and found #22 that also mentions segmentation faults related to Pen, but it seems to be a different issue, and already solved.

And less important, but just to mention it, I don't really want to inspect this object. It's just that debuggers usually show all local variables when you break, so every time I put a breakpoint with a local Pen object, my session crashes and this is the real problem

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