Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on pygui(:wx) or pyimport("wx") using PyCall. #35490

Closed
FredK712 opened this issue Apr 15, 2020 · 5 comments
Closed

Crash on pygui(:wx) or pyimport("wx") using PyCall. #35490

FredK712 opened this issue Apr 15, 2020 · 5 comments
Labels
ffi foreign function interfaces, ccall, etc. system:windows Affects only Windows

Comments

@FredK712
Copy link

With these packages:
(@v1.4) pkg> status
Status C:\Users\Fred\.julia\environments\v1.4\Project.toml
[8f4d0f93] Conda v1.4.1
[438e738] PyCall v1.91.4
[d330b81b] PyPlot v2.9.0

With everything installed in the default locations, when using the Conda local python version 3.7 and Conda installed wxPython, if I attempt either of the commands in the title, Julia halts with the crash dump below. "pygui(:qt)" works OK.


Microsoft Windows [Version 10.0.18362.720]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\Fred>C:\Users\Fred\AppData\Local\Programs\Julia\Julia-1.4.0\bin\julia.exe
_
_ _ ()_ | Documentation: https://docs.julialang.org
() | () () |
_ _ | | __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 1.4.0 (2020-03-21)
/ |_'|||_'_| | Official https://julialang.org/ release
|__/ |

julia> using PyCall

julia> pyimport("wx")

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: UNKNOWN at 0x7ffc285e0b41 -- memset at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
in expression starting at REPL[2]:1
memset at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
DeactivateActCtxWorker at C:\Windows\System32\KERNEL32.DLL (unknown line)
DeactivateActCtx at C:\Windows\System32\KERNELBASE.dll (unknown line)
DeactivatePyActCtx at C:\Users\Fred.julia\packages\PyCall\zqDXB\src\PyCall.jl:449 [inlined]
_pyimport at C:\Users\Fred.julia\packages\PyCall\zqDXB\src\PyCall.jl:463
pyimport at C:\Users\Fred.julia\packages\PyCall\zqDXB\src\PyCall.jl:485
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1692 [inlined]
do_call at /cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:369
eval_value at /cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:458
eval_stmt_value at /cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:409 [inlined]
eval_body at /cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:799
jl_interpret_toplevel_thunk at /cygdrive/d/buildbot/worker/package_win64/build/src\interpreter.c:911
jl_toplevel_eval_flex at /cygdrive/d/buildbot/worker/package_win64/build/src\toplevel.c:814
jl_toplevel_eval_flex at /cygdrive/d/buildbot/worker/package_win64/build/src\toplevel.c:764
jl_toplevel_eval at /cygdrive/d/buildbot/worker/package_win64/build/src\toplevel.c:823 [inlined]
jl_toplevel_eval_in at /cygdrive/d/buildbot/worker/package_win64/build/src\toplevel.c:843
eval at .\boot.jl:331
eval_user_input at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:86
macro expansion at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:118 [inlined]
#26 at .\task.jl:358
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1692 [inlined]
start_task at /cygdrive/d/buildbot/worker/package_win64/build/src\task.c:687
Allocations: 3542476 (Pool: 3541866; Big: 610); GC: 4

@FredK712
Copy link
Author

FredK712 commented Apr 21, 2020

If I change line 405 of PyCall.jl from "@static if Sys.iswindows()" to "@static if false #Sys.iswindows()" to bypass the activation context stuff which wxpython classic does on its own (https://github.com/wxWidgets/wxPython-Classic/blob/master/src/helpers.cpp) and wxpython - Phoenix doesn't appear to need, then:
julia> Pkg.add("PyCall")
julia> using PyCall
julia> pyimport("wx")
julia> pygui(:wx)
both commands work without crashing.

@ViralBShah
Copy link
Member

Can you try with the recent stable releases if this is still an issue? Works fine on mac, but it may only be a problem on windows.

@ViralBShah ViralBShah added ffi foreign function interfaces, ccall, etc. system:windows Affects only Windows labels Sep 6, 2022
@ViralBShah ViralBShah changed the title Crash on pygui(:wx) or pyimport("wx") on Julia 1.4 using PyCall. Crash on pygui(:wx) or pyimport("wx") using PyCall. Sep 6, 2022
@FredK712
Copy link
Author

FredK712 commented Oct 12, 2022 via email

@ViralBShah
Copy link
Member

Let's close and reopen if someone finds otherwise.

@FredK712
Copy link
Author

FredK712 commented Oct 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ffi foreign function interfaces, ccall, etc. system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests

2 participants