Skip to content

SDL2: gfxdraw.aa* functions segfault with 8-bit surfaces (849) #586

@GalacticEmperor1

Description

@GalacticEmperor1

Issue №849 opened by dlon at 2019-02-24 22:01:42

An 8-bit surface without a palette (masks (0xe0, 0x1c, 0x3, 0x0)) can cause a segfault for aapolygon, aacircle, aatrigon, and aaellipse.

from pygame import Surface, Color, init
from pygame.gfxdraw import aacircle

init()

s = Surface(size=(512, 512), flags=0, depth=8, masks=(0xE0, 0x1C, 0x3, 0x0))

aacircle(
    s,
    256,
    256,
    64,
    Color("red"),
)

System: pygame 1.9.5 / SDL2 / Python 3.7.2 (64-bit). Doesn't happen with SDL1.2.

Related Docs: https://www.pygame.org/docs/ref/gfxdraw.html


Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    gfxdrawpygame.gfxdraw

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions