Skip to content

Compatibility with Threads? #131

@DrChainsaw

Description

@DrChainsaw

Trying to run jcall in a separate thread kills the julia session:

PS > julia -i -t 8 --project -e "using JavaCall; JavaCall.init()"
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.1 (2020-08-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.5.1
Commit 697e782ab8 (2020-08-25 20:08 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

julia> Threads.@spawn begin
       jlm = @jimport java.lang.Math
       jcall(jlm, "sin", jdouble, (jdouble,), pi/2)
       end

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x708e3523 -- JVM_ResolveClass at C:\Program Files\Java\jre1.8.0_181\bin\server\jvm.dll (unknown line)
in expression starting at none:0
JVM_ResolveClass at C:\Program Files\Java\jre1.8.0_181\bin\server\jvm.dll (unknown line)
unknown function (ip: AA0000000006F755)
Allocations: 14080219 (Pool: 14076404; Big: 3815); GC: 14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions