-
Notifications
You must be signed in to change notification settings - Fork 21
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
Attempt to access 0-element Vector{Float64} at index [1] #1136
Comments
I think it's related to this issue: #993
Perhaps it should rather be julia> size([],2)
1 Also maybe for multiproc:
|
I haven't changed it because it might be a symptom of a larger problem: |
oops, we should also check order of operations here:
is Then SuggestionLooks like idea of this line is to set values if something exists or just do nothing if empty. So lets just use ( setkde && 0 < length(getPoints(newPts)) ) ? setValKDE!(dfg, sym, newPts, false, infdim) : nothing |
Would it be possible to share that file perhaps please? |
It was the saved fg in this issue: JuliaRobotics/RoME.jl#380 |
Oops okay thanks, this might be a bit slow until we see it again. |
Issues Leo is seeing (from solving his 00139_fg.tar.gz example) might be related to this: BoundsError: attempt to access 0-element Array{Float64,1} at index [1]
Stacktrace:
getindexSolve Progress: approx max 3216, at iter 854 Time: 0:03:38 at ./array.jl:809 [inlined]
[2] calcPPE[ Info: CSM-5 Clique 8 finished
([ Info: CSM-5 Clique 11 finished
DFGVariableSolve Progress: approx max 3216, at iter 867 Time: 0:03:38{Point2}, ::Point2[ Info: CSM-5 Clique 10 finished
[ Info: CSM-5 Clique 14 finished
[ Info: CSM-5 Clique 20 finished
; method::Type{DistributedFactorGraphs.MeanMaxPPE}, solveKey::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:204
[3] calcPPE(::DFGVariable{Point2}; method::Type{DistributedFactorGraphs.MeanMaxPPE}, solveKey::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:215
[4] setPPE!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::Symbol, ::Symbol, ::Type{DistributedFactorGraphs.MeanMaxPPE}, ::Nothing) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:552
[5] setPPE! at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:550 [inlined]
[6] updateFromSubgraph_StateMachine(::CliqStateMachineContainer{BayesTreeNodeData,LightDFG{SolverParams,DFGVariable,DFGFactor},LightDFG{SolverParams,DFGVariable,DFGFactor},MetaBayesTree}) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/CliqueStateMachine.jl:755
[7] (::StateMachine{CliqStateMachineContainer})(::CliqStateMachineContainer{BayesTreeNodeData,LightDFG{SolverParams,DFGVariable,DFGFactor},LightDFG{SolverParams,DFGVariable,DFGFactor},MetaBayesTree}, ::Nothing; pollinterval::Float64, breakafter::Function, verbose::Bool, verbosefid::Base.TTY, verboseXtra::IncrementalInference.CliqStatus, iterlimit::Int64, injectDelayBefore::Nothing, recordhistory::Bool, housekeeping_cb::IncrementalInference.var"#382#384"{IncrementalInference.TreeClique}) at /home/labuser/.julia/packages/FunctionalStateMachine/2JZFG/src/StateMachine.jl:82
[8] initStartCliqStateMachine!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::MetaBayesTree, ::IncrementalInference.TreeClique, ::Nothing; oldcliqdata::BayesTreeNodeData, verbose::Bool, verbosefid::Base.TTY, drawtree::Bool, show::Bool, incremental::Bool, limititers::Int64, upsolve::Bool, downsolve::Bool, recordhistory::Bool, delay::Bool, logger::Base.CoreLogging.SimpleLogger, solve_progressbar::ProgressMeter.ProgressUnknown, algorithm::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/CliqueStateMachine.jl:63
[9] tryCliqStateMachineSolve!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::MetaBayesTree, ::Int64, ::Nothing; oldtree::MetaBayesTree, verbose::Bool, verbosefid::Base.TTY, drawtree::Bool, limititers::Int64, downsolve::Bool, incremental::Bool, delaycliqs::Array{Symbol,1}, recordcliqs::Array{Symbol,1}, solve_progressbar::ProgressMeter.ProgressUnknown, algorithm::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/SolverAPI.jl:110
[10] (::IncrementalInference.var"#439#442"{MetaBayesTree,Bool,Bool,Base.TTY,Bool,Bool,Array{Symbol,1},Array{Symbol,1},Symbol,LightDFG{SolverParams,DFGVariable,DFGFactor},MetaBayesTree,Nothing,ProgressMeter.ProgressUnknown,Int64,Int64})() at ./task.jl:356┌ Warning: printCliqHistorySummary -- No CSM history found.
ERROR: TaskFailedException:
BoundsError: attempt to access 0-element Array{Float64,1} at index [1]
Stacktrace:
[1] getindex at ./array.jl:809 [inlined]
[2] calcPPE(::DFGVariable{Point2}, ::Point2; method::Type{DistributedFactorGraphs.MeanMaxPPE}, solveKey::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:204
[3] calcPPE(::DFGVariable{Point2}; method::Type{DistributedFactorGraphs.MeanMaxPPE}, solveKey::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:215
[4] setPPE!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::Symbol, ::Symbol, ::Type{DistributedFactorGraphs.MeanMaxPPE}, ::Nothing) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:552
[5] setPPE! at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/FGOSUtils.jl:550 [inlined]
[6] updateFromSubgraph_StateMachine(::CliqStateMachineContainer{BayesTreeNodeData,LightDFG{SolverParams,DFGVariable,DFGFactor},LightDFG{SolverParams,DFGVariable,DFGFactor},MetaBayesTree}) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/CliqueStateMachine.jl:755
[7] (::StateMachine{CliqStateMachineContainer})(::CliqStateMachineContainer{BayesTreeNodeData,LightDFG{SolverParams,DFGVariable,DFGFactor},LightDFG{SolverParams,DFGVariable,DFGFactor},MetaBayesTree}, ::Nothing; pollinterval::Float64, breakafter::Function, verbose::Bool, verbosefid::Base.TTY, verboseXtra::IncrementalInference.CliqStatus, iterlimit::Int64, injectDelayBefore::Nothing, recordhistory::Bool, housekeeping_cb::IncrementalInference.var"#382#384"{IncrementalInference.TreeClique}) at /home/labuser/.julia/packages/FunctionalStateMachine/2JZFG/src/StateMachine.jl:82
[8] initStartCliqStateMachine!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::MetaBayesTree, ::IncrementalInference.TreeClique, ::Nothing; oldcliqdata::BayesTreeNodeData, verbose::Bool, verbosefid::Base.TTY, drawtree::Bool, show::Bool, incremental::Bool, limititers::Int64, upsolve::Bool, downsolve::Bool, recordhistory::Bool, delay::Bool, logger::Base.CoreLogging.SimpleLogger, solve_progressbar::ProgressMeter.ProgressUnknown, algorithm::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/CliqueStateMachine.jl:63
[9] tryCliqStateMachineSolve!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::MetaBayesTree, ::Int64, ::Nothing; oldtree::MetaBayesTree, verbose::Bool, verbosefid::Base.TTY, drawtree::Bool, limititers::Int64, downsolve::Bool, incremental::Bool, delaycliqs::Array{Symbol,1}, recordcliqs::Array{Symbol,1}, solve_progressbar::ProgressMeter.ProgressUnknown, algorithm::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/SolverAPI.jl:110
[10] (::IncrementalInference.var"#439#442"{MetaBayesTree,Bool,Bool,Base.TTY,Bool,Bool,Array{Symbol,1},Array{Symbol,1},Symbol,LightDFG{SolverParams,DFGVariable,DFGFactor},MetaBayesTree,Nothing,ProgressMeter.ProgressUnknown,Int64,Int64})() at ./task.jl:356
Stacktrace:
[1] sync_end(::Channel{Any}) at ./task.jl:314
[2] macro expansion at ./task.jl:333 [inlined]
[3] taskSolveTree!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::MetaBayesTree, ::Nothing; oldtree::MetaBayesTree, drawtree::Bool, verbose::Bool, verbosefid::Base.TTY, limititers::Int64, limititercliqs::Array{Pair{Symbol,Int64},1}, downsolve::Bool, incremental::Bool, multithread::Bool, skipcliqids::Array{Symbol,1}, recordcliqs::Array{Symbol,1}, delaycliqs::Array{Symbol,1}, smtasks::Array{Task,1}, algorithm::Symbol) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/SolverAPI.jl:49
[4] solveTree!(::LightDFG{SolverParams,DFGVariable,DFGFactor}, ::MetaBayesTree; timeout::Nothing, storeOld::Bool, verbose::Bool, verbosefid::Base.TTY, delaycliqs::Array{Symbol,1}, recordcliqs::Array{Symbol,1}, limititercliqs::Array{Pair{Symbol,Int64},1}, injectDelayBefore::Nothing, skipcliqids::Array{Symbol,1}, eliminationOrder::Nothing, variableOrder::Nothing, eliminationConstraints::Array{Symbol,1}, variableConstraints::Nothing, smtasks::Array{Task,1}, dotreedraw::Array{Int64,1}, runtaskmonitor::Bool, algorithm::Symbol, multithread::Bool) at /home/labuser/.julia/packages/IncrementalInference/8DImq/src/SolverAPI.jl:371
[5] top-level scope at REPL[16]:1 |
Reliably on clique 4, and with julia> tree[4]
TreeClique (id=4)
frontals: [:l2, :x69]
separator: [:l8, :l6, :l9, :x64, :l15, :l12, :l14, :l11, :l7, :l5, :x114, :l10, :l1, :l3, :l4]
status: NULL
allmarginld: false
potentials: [:x69l6f1, :x69l8f1, :x69l9f1]
messages Using |
The graph does solve fine with This problem links directly back to #1010 which is the current highest priority issue. My recommendation is to set
for reference, the cc @lemauee, I think setting For completeness, we expect 1010 to improve numerical quality over |
Pretty sure I fixed this problem and closed the issue. This looks like a duplicate issue. |
It was a bad line of code in one of the function argument defaults, hence the stack trace was hard to read. Basically the code was trying to create some default list, but the source vector had length 0. This produce some error which looked exactly the same as the title of this issue. Also this issue has not shown up since i added a fix. |
Just capturing so long, will investigate further when I have a chance:
The text was updated successfully, but these errors were encountered: