Comments (5)
Wow, crazy! We pride ourselves on const correctness, but this could be a subtle memory bug. Unfortunately, it seems you are currently in the best position to uncover the bug. Maybe run with memory checking software, or do some print debugging? Printing a bunch of stuff and then doing a diff on both output files could uncover where the issue is introduced.
from gtsam.
@DanMcGann I was able to reproduce this. On My MAc I can't run valgrind, though. Could you try this?
from gtsam.
Interestingly, only occurs in Release mode, not in debug mode.
from gtsam.
@DanMcGann, I tracked down the issue with Xcode. Turns out auto and Eigen do not play well together. Changing this line:
auto error = -gtsam::traits<VALUE>::Local(val, prior_);
to
const Vector error = -gtsam::traits<VALUE>::Local(val, prior_);
will fix the issue. FYI, address sanitizer said:
AddressSanitizer: stack-use-after-scope on address 0x00016fdfce20 at pc 0x0001000512fc bp 0x00016fdfc6a0 sp 0x00016fdfc698
Closing as not a GTSAM issue.
from gtsam.
Interesting! Glad its not a deeper problem.
Also looks like this is well documented by Eigen which I will link here for posterity (https://eigen.tuxfamily.org/dox/TopicPitfalls.html).
Although, given this documentation I'm surprised to see the issue crop up here as the definition of traits<VALUE>::Local
will have an explicit type, so I would not expect it to return an intermediate Eigen expression type. Something to be careful of I suppose.
from gtsam.
Related Issues (20)
- Is the current latest tag a pre-release? HOT 4
- Matlab "IMUKittiExampleGPS" example result in an error HOT 3
- Generating Matlab toolbox on windows fails
- Error in test scrpipt "TranslationAveragingExample.py" HOT 4
- gtsam doesn't build on i386 or armhf HOT 40
- KeySet class in python is missing methods HOT 4
- doc/CMakeLists.txt refers to non-existent variable HOT 1
- how to build gtsam 4.0.3 with vs 2019 HOT 3
- optimizer.optimize works - Mariginals does not. Matlab HOT 2
- PCL let GTSAM crash. HOT 1
- MATLAB wrapper failed to build [Ubuntu] HOT 2
- release 4.2 should be tagged 4.2.0 HOT 3
- Shonan rotation averaging converging but relative rotation error is high!! HOT 6
- Cannot found tbb library when using MSVC compiler HOT 2
- error while loading shared libraries HOT 2
- tMin_ resets when an iteration has 0 us duration.
- Marginalization fail IncrementalFixedLagSmoother HOT 3
- Building fails in VS22 due to ambiguous call HOT 4
- PyPI wheels for Python 3.11 on Linux HOT 3
- Get key index of the latest robot pose in the optimized result HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtsam.