This forum has been archived. All content is frozen. Please use KDE Discuss instead.

MinGW crash after upgrade from Eigen 3.1 to 3.2

Tags: None
(comma "," separated)
Seb
Registered Member
Posts
99
Karma
0
Hi,

I upgraded from Eigen 3.1.2 to 3.2.0 this week. I use Eigen in a fairly complex C++ project that involves, for example, OpenMP, dense and sparse algebra (inluding several types of decompositions), Qt 4.8, SWIG 2.11 bindings (meaning, that C++ and Eigen objects are passed through extern "C"{} blocks), Boost 1.55 etc.

We use the MinGW-w64 cross compiler based on GCC 4.8.2.

Now the interesting thing is:
  • GCC/MinGW-w64 crashes when compiling two C++ source files of my project.
Further notes:
  • It does not crash when I compile most of the project sources although they make use of Eigen. This makes it a little hard to reproduce the problem since I can not post my complete project here. Further, a small separatable example snippet is not so easy to create, since it seems that many conditions must be met.
  • It does not crash on Linux using GCC 4.3.1, 4.4, 4.7.2 or on Mac GCC 4.2.1, 4.8.2.
  • I reverted to Eigen 3.1.2 and the crash was gone.
  • Closer investigation shows me that GCC crashes due to memory problems (crashes after taking 98% RAM - nearly 8 GB). Using Eigen 3.1.2 it took <5% RAM.
  • compiling individual code blocks is no problem, but when including various headers from Eigen, boost and Qt, I observe an increasing memory usage of GCC (yes, it seems that I only need to include certain C++ header files).
Now I am wondering what the reasons for this behavior are:
  • bug in Eigen or GCC (ok, very likely for the latter)
  • bug in another component that was simply not obvious before (Qt, boost?)
  • certain compiler flags? (already checked all -O0 to -O3)
  • colliding symbols/defines ?

Did any of you experiences similar problems?
Does any of you might have an idea of what is going on there? Can you imagine any new Eigen magic that might produce such effects?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
That's really hard to guess what a workaround could be without more information. You could use 'hg bisect' to narrow the offending changeset.
Seb
Registered Member
Posts
99
Karma
0
At least I went a few steps further on this topic.

- The problem appears when including Qt 4.8 OpenGL and graphics headers (e.g. QOpenGLWidget, QImageReader, QPainter) and Eigen Core. (Yes, simply including the header files is the problem)
- Upgrade MinGW runtime from 2013/March (SVN) to 3.1.0 at least relaxes the memory issue.

So, if anyone else encounters this problem: Try to remove included headers (also check recursive includes), split your CPP files and upgrade your MinGW-w64 runtime to the most recent version.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]