Closed araue closed 7 years ago
Do you have any clue where to look or how to reproduce this problem? What you were doing at the time that you noticed it?
The only thing I can think of, which may not be covered, is changing tExp or tFine. Can you confirm whether it is this? All the other variables that affect dynamics should be covered afaik. Changing tExp or tFine by hand requires invalidating the cache manually ( arCheckCache(1) ).
I can add those to the cache mechanism, but that would involve looping over all the data/condition substructs and validating them against stored versions whenever the cache is checked. It kind of sucks that tExp and tFine aren't shielded from direct access.
Should be fixed now. Added a config flag for the cache system (ar.config.useCache). It's turned off by default. If you use the cache, you have to invalidate it when you change tExp or tFine manually (arCheckCache(1)). In the future, I will add an option for a stricter cache handling (which checks tExp and tFine as well).
Hi Joep, in fact tExp or tFine are not the issue for my case, I don't change them. Something really weird happens there, it might be even a bug in the MATLAB. We had issues in the past with global variable, and I get some really strange behavior.
I will look into it more and let you know.
D'oh! I forgot the early out in the arCheckCache (the return statement), so the useCache=0 override didn't work:
% Always resimulate
if ( ar.config.useCache == 0 )
invalidate = 1;
return;
end
Could you check it now without the dynamics=1 in arSimu. I didn't remove it yet from the repo, so if you want to try it you have to remove it again by hand.
The issue is that the framework becomes unusably slow for me in certain projects when plotting certain things with the override in place. Are you certain it is coming from the caching? Do you have an example I can work with?
Hi Joep,
I just saw your latest commit 9161b31. Do you think the bug that you describe there could be related to the problems I observed?
I can see any issue on my side any more when I remove the forced simulation (dynamics=1). Do you agree to take out the flag now?
Andreas
Hey Andreas,
yeah, I think that bug was probably causing the faulty behaviour. I'd be happy if you'd take out the flag :)
Best, Joep.
Fixed! Open a new issue if (new) problems pop back up.
There is a bug in arSimu / the caching section above. Sometimes calculations are missed due to faulty house-keeping. I can't figure it out at the moment, so I force the calculations here for now.
Please see my commit: 593ac01 There is a note in the code, for now I force the calculation...
Andreas