Skip to content

Commit 1e2c174

Browse files
committed
fix createVarValsAll on deserialize
1 parent bbab98d commit 1e2c174

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"
4848
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
4949

5050
[compat]
51-
ApproxManifoldProducts = "0.6.3"
51+
ApproxManifoldProducts = "0.6.3, 0.7"
5252
BSON = "0.2, 0.3"
5353
Combinatorics = "1.0"
5454
DataStructures = "0.16, 0.17, 0.18"

src/services/CalcFactor.jl

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,23 @@ function _createVarValsAll(
241241
)
242242
#
243243
# Note, NamedTuple once upon a time created way too much recompile load on repeat solves, #1564
244-
varValsAll = map(var_i->getVal(var_i; solveKey), tuple(variables...))
245-
246-
for (i,vv) in enumerate(varValsAll)
247-
@assert pointer(vv) == pointer(getVal(variables[i]; solveKey)) "Developer check that ccw.varValsAll pointers go to same memory as getVal(variable)"
244+
# FIXME ON FIRE issue on deserialization
245+
valsAll = []
246+
247+
# when deserializing a factor, a new ccw gets created but the variables may not yet have VND entries
248+
for var_i in variables
249+
push!(
250+
valsAll,
251+
if haskey(getSolverDataDict(var_i), solveKey)
252+
getVal(var_i; solveKey)
253+
else
254+
Vector{typeof(getPointDefault(getVariableType(var_i)))}()
255+
end
256+
)
248257
end
249258

259+
varValsAll = tuple(valsAll...)
260+
250261
# how many points
251262
LEN = length.(varValsAll)
252263
maxlen = maximum(LEN)

0 commit comments

Comments
 (0)