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

InexactError() on windows with the 32bit version, Julia 0.7-dev #968

Closed
DrKrar opened this issue Jul 12, 2017 · 7 comments
Closed

InexactError() on windows with the 32bit version, Julia 0.7-dev #968

DrKrar opened this issue Jul 12, 2017 · 7 comments

Comments

@DrKrar
Copy link

DrKrar commented Jul 12, 2017

ERROR: LoadError: LoadError: InexactError: trunc(Int32, 4.107939275e9)
Stacktrace:
 [1] trunc at .\float.jl:652 [inlined]
 [2] round at .\float.jl:338 [inlined]
 [3] linspace(::Float64, ::Float64, ::Int32) at .\twiceprecision.jl:332
 [4] partialcircle at E:\Users\DrKra\.julia\v0.7\Plots\src\components.jl:53 [inlined]
 [5] #makeshape#97(::Float64, ::Float64, ::Function, ::Int32) at E:\Users\DrKra\.julia\v0.7\Plots\src\components.jl:84
 [6] (::Plots.#kw##makeshape)(::Array{Any,1}, ::Plots.#makeshape, ::Int32) at .\<missing>:0
 [7] include_from_node1(::Module, ::String) at .\loading.jl:556
 [8] include at .\sysimg.jl:14 [inlined]
 [9] include(::String) at E:\Users\DrKra\.julia\v0.7\Plots\src\Plots.jl:3
 [10] include_from_node1(::Module, ::String) at .\loading.jl:556
 [11] include(::Module, ::String) at .\sysimg.jl:14
 [12] anonymous at .\<missing>:2
while loading E:\Users\DrKra\.julia\v0.7\Plots\src\components.jl, in expression starting on line 131
while loading E:\Users\DrKra\.julia\v0.7\Plots\src\Plots.jl, in expression starting on line 140

The problem as I had figure it out that in trunc(Int32, 4.107939275e9) .

The number 4.107939275e9 exceeds the maximum of the type Int32 .

julia> typemax( Int32)
2147483647
julia> 4.107939275e9 > typemax( Int32)
true

i do not know the significant of the number or why we should use it so i cant think of a slon.

@timholy
Copy link
Contributor

timholy commented Jul 12, 2017

Nice to see such quick payback from the new InexactError.

@DrKrar, to fix this someone will have to know a lot more about what you did to trigger this error. Can you post an example that one can copy/paste into the REPL?

@timholy
Copy link
Contributor

timholy commented Jul 12, 2017

Could be the issue fixed in JuliaLang/julia#22644.

@daschw
Copy link
Member

daschw commented Jul 12, 2017

to fix this someone will have to know a lot more about what you did to trigger this error.

If this is related to #963, then apparently it is triggered by using Plots for the first time on 32bit architectures in this function

"get an array of tuples of points on a circle with radius `r`"
function partialcircle(start_θ, end_θ, n = 20, r=1)
    Tuple{Float64,Float64}[(r*cos(u),r*sin(u)) for u in linspace(start_θ, end_θ, n)]
end

Is this fixed in JuliaLang/julia#22644 or does it have to be fixed in Plots?

@timholy
Copy link
Contributor

timholy commented Jul 12, 2017

I don't have a 32bit machine, so someone else will have to test. I just merged that PR so anyone running 0.7 can just do a git pull && make.

It seems likely that it's fixed, and the fix should be backported to 0.6.

@DrKrar
Copy link
Author

DrKrar commented Jul 12, 2017

I agree with you @daschw . Dear @timholy thanks for your prompt response. I did not build my instillation of Julia. I will wait to download the Compiled master including this build and report the results.

@DrKrar
Copy link
Author

DrKrar commented Jul 13, 2017

Dear @timholy now all is alright .

@dpo
Copy link

dpo commented Sep 23, 2017

Any idea when this will be backported to 0.6? I keep getting this error on Appveyor/Win32, e.g., https://ci.appveyor.com/project/dpo/benchmarkprofiles-jl/build/1.0.31/job/kci9pba13oi3wwyx#L80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants