Skip to content

Segfault when iterating on a transform-mapped Vector in a thread #3044

@outofculture

Description

@outofculture

Short description

Take a Vector, map it with a transform, put it in a threading Thread, iterate, and BOOM.

Code to reproduce

import pyqtgraph as pg
import threading


def do_it():
    xform = pg.SRTTransform3D()
    v = xform.map(pg.Vector((0, 0, 0)))
    tuple(v)


pg.mkQApp()
threading.Thread(target=do_it).start()

Expected behavior

Real behavior

SIGSEGV

Tested environment(s)

  • PyQtGraph version: 0.13.8dev0
  • Qt Python binding: PyQt5 5.15.10 Qt 5.15.2
  • Python version: 3.11
  • NumPy version: 1.26.3
  • Operating system: linux
  • Installation method: git

Additional context

Workaround: use a QThread, and this isn't an issue.

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