You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
fromjuliacallimportMainasjlimportpygamejl.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.
The text was updated successfully, but these errors were encountered:
That's weird! Why would loading a module but not using it have that effect? Presumably there is some weird threads thing going on (is pygame multithreaded? I don't know what it is) but I don't know how to diagnose it.
PythonCall/JuliaCall in general doesn't support threads (because of Python's GIL) but I would have thought that using Julia's multithreading to do Julia-only things (i.e. not calling out to Python) would be OK.
Unfortunately I can't reproduce it. Does the same thing happen if you combine those 3 seval calls into one? Also I assume the eval should be seval in the MWE.
Hi, since I had a workaround for this issue, I didn't find the time to follow it up.
I just created #202 for which I don't have a workaround :-( thanks
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
Initially I created a Julia issue but I guess having the issue here is more useful.
The text was updated successfully, but these errors were encountered: