JuliaInterop / JavaCall.jl

Call Java from Julia
http://juliainterop.github.io/JavaCall.jl
Other
118 stars 53 forks source link

Fix memory leak for primitive array #135

Closed ahnlabb closed 3 years ago

ahnlabb commented 3 years ago

Stopgap fix for #134 .

mkitti commented 3 years ago

I will merge once appveyor passes.

mkitti commented 3 years ago

This passes tests for 1.5.3 and 1.0 on x86 on Windows. I'll merge and confirm that tests pass on Linux shortly. We need to configure Github Actions for CI.

mkitti commented 3 years ago

Confirming that tests passed on Linux on Julia 1.5.1:

(@v1.5) pkg> test JavaCall
    Testing JavaCall
Status `/tmp/jl_mLwIOB/Project.toml`
  [a93c6f00] DataFrames v0.21.8
  [864edb3b] DataStructures v0.17.20
  [494afd89] JavaCall v0.8.0 `~/.julia/dev/JavaCall`
  [61d0e4fa] Taro v0.8.3
  [1b915085] WinReg v0.3.1
  [ade2ca70] Dates
  [8f399da3] Libdl
  [44cfe95a] Pkg
  [8dfed614] Test
Status `/tmp/jl_mLwIOB/Manifest.toml`
  [324d7699] CategoricalArrays v0.8.3
  [34da2185] Compat v3.25.0
  [9a962f9c] DataAPI v1.4.0
  [a93c6f00] DataFrames v0.21.8
  [864edb3b] DataStructures v0.17.20
  [e2d170a0] DataValueInterfaces v1.0.0
  [41ab1584] InvertedIndices v1.0.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [682c06a0] JSON v0.21.1
  [494afd89] JavaCall v0.8.0 `~/.julia/dev/JavaCall`
  [e1d29d7a] Missings v0.4.4
  [bac558e1] OrderedCollections v1.3.2
  [69de0a69] Parsers v1.0.15
  [2dfb63ee] PooledArrays v0.5.3
  [189a3867] Reexport v0.2.0
  [a2af1166] SortingAlgorithms v0.3.1
  [856f2bd8] StructTypes v1.2.2
  [3783bdb8] TableTraits v1.0.0
  [bd369af6] Tables v1.3.1
  [61d0e4fa] Taro v0.8.3
  [1b915085] WinReg v0.3.1
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
Test Summary:  | Pass  Total
initialization |    2      2
[ Info: ("Java Version: ", "1.8.0_152-release")
Test Summary:    | Pass  Total
unsafe_strings_1 |    3      3
In Java, recd: 10
In Java, recd: 10
In Java, recd: 10
In Java, recd: 2147483647
In Java, recd: 9223372036854775807
In Java, recd: Hello Java
In Java, recd: 10.02
In Java, recd: 10.02
In Java, recd: 1.7976931348623157E308
In Java, recd: 3.4028235E38
In Java, recd: null
Test Summary:       | Pass  Total
parameter_passing_1 |   13     13
Test Summary:        | Pass  Total
static_method_call_1 |    3      3
Test Summary:              | Pass  Total
static_method_call_async_1 |    3      3
Test Summary:      | Pass  Total
instance_methods_1 |    3      3
nullnullnullnullnullnullTest Summary: | Pass  Total
null_1        |   10     10
Test Summary: | Pass  Total
arrays_1      |   14     14
Test Summary: | Pass  Total
dates_1       |    6      6
Test Summary:    | Pass  Total
map_conversion_1 |    1      1
Test Summary:           | Pass  Total
array_list_conversion_1 |    1      1
Test Summary:   | Pass  Total
inner_classes_1 |    8      8
Test Summary: | Pass  Total
sinx_1        |    2      2
Test Summary:  | Pass  Total
method_lists_1 |    9      9
Test Summary: | Pass  Total
double_free_1 |  100    100
Test Summary:       | Pass  Total
array_conversions_1 |    1      1
Test Summary:          | Pass  Total
iterator_conversions_1 |   11     11
Test Summary:      | Pass  Total
roottask_and_env_1 |    4      4
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Resolving package versions...
No Changes to `/tmp/jl_mLwIOB/Project.toml`
No Changes to `/tmp/jl_mLwIOB/Manifest.toml`
┌ Warning: JVM already initialised. This call has no effect
└ @ JavaCall ~/.julia/dev/JavaCall/src/jvm.jl:155
┌ Warning: JVM already initialised. This call has no effect
└ @ JavaCall ~/.julia/dev/JavaCall/src/jvm.jl:155
┌ Warning: JVM already initialised. This call has no effect
└ @ JavaCall ~/.julia/dev/JavaCall/src/jvm.jl:155
┌ Warning: JVM already initialised. This call has no effect
└ @ JavaCall ~/.julia/dev/JavaCall/src/jvm.jl:211
┌ Warning: JVM already initialised. This call has no effect
└ @ JavaCall ~/.julia/dev/JavaCall/src/jvm.jl:211
    Testing Taro
Status `/tmp/jl_LFMlE6/Project.toml`
  [a93c6f00] DataFrames v0.21.8
  [494afd89] JavaCall v0.8.0 `~/.julia/dev/JavaCall`
  [bd369af6] Tables v1.3.1
  [61d0e4fa] Taro v0.8.3
  [ade2ca70] Dates
  [8dfed614] Test
Status `/tmp/jl_LFMlE6/Manifest.toml`
  [324d7699] CategoricalArrays v0.8.3
  [34da2185] Compat v3.25.0
  [9a962f9c] DataAPI v1.4.0
  [a93c6f00] DataFrames v0.21.8
  [864edb3b] DataStructures v0.17.20
  [e2d170a0] DataValueInterfaces v1.0.0
  [41ab1584] InvertedIndices v1.0.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [682c06a0] JSON v0.21.1
  [494afd89] JavaCall v0.8.0 `~/.julia/dev/JavaCall`
  [e1d29d7a] Missings v0.4.4
  [bac558e1] OrderedCollections v1.3.2
  [69de0a69] Parsers v1.0.15
  [2dfb63ee] PooledArrays v0.5.3
  [189a3867] Reexport v0.2.0
  [a2af1166] SortingAlgorithms v0.3.1
  [856f2bd8] StructTypes v1.2.2
  [3783bdb8] TableTraits v1.0.0
  [bd369af6] Tables v1.3.1
  [61d0e4fa] Taro v0.8.3
  [1b915085] WinReg v0.3.1
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
Feb 02, 2021 2:42:16 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: J2KImageReader not loaded. JPEG2000 files will not be processed.
See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
for optional dependencies.

Feb 02, 2021 2:42:16 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: Tesseract OCR is installed and will be automatically applied to image files unless
you've excluded the TesseractOCRParser from the default parser.
Tesseract may dramatically slow down content extraction (TIKA-2359).
As of Tika 1.15 (and prior versions), Tesseract is automatically called.
In future versions of Tika, users may need to turn the TesseractOCRParser on via TikaConfig.
Feb 02, 2021 2:42:16 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
WARNING: org.xerial's sqlite-jdbc is not loaded.
Please provide the jar on your classpath to parse sqlite files.
See tika-parsers/pom.xml for the correct version.
[ Info: wrote all tables to /home/mkitti/.julia/packages/Taro/Nx69Q/test/df-test-writexl.xlsx.
[ Info: wrote all tables to /home/mkitti/.julia/packages/Taro/Nx69Q/test/df-test-writexl.xlsx.
INFO  Rendered page #1.
    Testing Taro tests passed 
    Testing JavaCall tests passed