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

Strange errors with ifelse #5813

Closed
simonster opened this issue Feb 14, 2014 · 0 comments
Closed

Strange errors with ifelse #5813

simonster opened this issue Feb 14, 2014 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@simonster
Copy link
Member

I ran into this while making #5811. It's silly (it's not actually a good idea to use ifelse here) but I don't think it should be doing what it was. The code is here. When the benchmark runs the first time, it works, but the second time, it reliably gives:

julia> reload("pathological_unique.jl")
ran once
ERROR: no method getindex(Array{Float64,2}, Array{Any,1}, Range1{Int64})
 in unique at /home/simon/Desktop/pathological_unique.jl:25
 in reload_path at loading.jl:144
 in reload at loading.jl:77
while loading /home/simon/Desktop/pathological_unique.jl, in expression starting on line 35

If I keep reloading the file at the REPL, I keep getting errors:

julia> reload("pathological_unique.jl")
ran once
ERROR: no method getindex(
 in unique at /home/simon/Desktop/pathological_unique.jl:25
 in reload_path at loading.jl:144
 in reload at loading.jl:77SYSTEM: show(lasterr) caused an error
ERROR: no method Enumerate{I}((Array{Float64,2},Array{Any,1},Range1{Int64}))
 in showerror at repl.jl:108
 in showerror at repl.jl:63
 in showerror at repl.jl:71
 in anonymous at client.jl:93
 in with_output_color at util.jl:441
 in display_error at client.jl:91

julia> reload("pathological_unique.jl")
ERROR: no method getindex(
 in unique at /home/simon/Desktop/pathological_unique.jl:25
 in reload_path at loading.jl:144
 in reload at loading.jl:77SYSTEM: show(lasterr) caused an error
ERROR: no method Enumerate{I}(
 in showerror at repl.jl:108
 in showerror at repl.jl:63
 in showerror at repl.jl:71
 in anonymous at client.jl:93
 in with_output_color at util.jl:441
 in display_error at client.jl:91SYSTEM: show(lasterr) caused an error
WARNING: it is likely that something important is broken, and Julia will not be able to continue normally

versioninfo is:

julia> versioninfo()
Julia Version 0.3.0-prerelease+1561
Commit d15ce97* (2014-02-13 16:38 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm

I can't reproduce this on OS X on my MacBook Pro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant