Registered Member
|
Hello folks!
I'm a very happy eigen3 user! Recently, I bumped into a very strange problem, which seems to be related to the compiler I use. Below is a contained c++ file that demonstrates the crash, in what looks like very simple code at first sight. The crash occurs when using a GCC 4.7.0 compiler. (when I use GCC 4.9.1, the problem does not appear).
Unfortunately, switching to gcc 4.9 is not an option, because other third-party tools / modules that are loaded at runtime, use gcc 4.7. I am using Windows. I tried looking through the issue tracker but could not find anything that could be related. |
Moderator
|
Could you paste the backtrace. Thanks.
And what about using std::cout << "data:" << std::endl << data << std::endl; instead of C code? |
Registered Member
|
Hello,
Thank you for the response! I just tested it on Linux, using gcc 4.7.0 (I was hoping to then use gdb / valgrind to look for something suspicious). Unfortunately I cannot reproduce it there: the program does not crash. So it's only on Windows, gcc 4.7.0. Here's the full specs of the compiler on Windows:
Additional things I tried: - I've been looking on how to create a backtrace on Windows but it seems to be extremely difficult. - I tried compiling with -g -O0, but the same problem occurs. - I tried the code you suggested, but it will crash, too. Are there compiler options from eigen which I could use that could give me some more information? I don't think it's really related to the printing: I think the matrix is somehow corrupted. This is because in my production code I don't explicitly print the matrix, and I also get crashes. |
Moderator
|
Without a backtrace we cannot do anything.
|
Moderator
|
Cannot you upgrade to a non experimental GCC, like gcc-4.7.2-1
|
Registered Member
|
Upgrading to 4.7.2 seems to be solving the problem. Furthermore, it seems the runtime libstdc++-6.dll is 'compatible' between 4.7.0 and 4.7.2-compiled modules.
Thank you very much for the assistance! I'll accept the answer, but I still have to do some more testing. if anything weird pops up, I'll re-open this topic. Thanks again! Martin |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]