Skip to content

GC crash when importing pygame & pyjulia #168

Closed
@dpinol

Description

@dpinol

Hi,
Julia crashes if pygame is imported after importing julia. The MWE that causes the crash is a python application which just loads pygame after JuliaCall (I get the same crash using pyjulia) and then allocates memory from a Julia thread. Swapping the 2 import lines avoids the issue

from juliacall import Main as jl
import pygame

jl.seval("""
function worker()
        for i in 1:10000000
            a = Float64[]
            push!(a, 0.42)
        end
    end
""")
jl.seval("t= Threads.@spawn worker()")
jl.eval("wait(t)")""")

Initially I created a Julia issue but I guess having the issue here is more useful.

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