It appears that several uses of git master and distributions with GCC/G++ 4.5, such as openSUSE 11.3 and Arch Linux are experiencing random crashes when loading or unloading plugins. We think(*) this is a bug in GCC/G++ and I am currently drafting a testcase to confirm this and also a workaround for the bug. At the moment, in order to avoid this crash, you will need to use an older version of GCC/G++, such as GCC 4.4.3. For Arch Linux you can get this from the AUR with “yaourt gcc4”, selection 6, and I would imagine a package is available for openSUSE. When compiling, press ‘t’ in ccmake to get advanced options and change the compiler executable paths to your older compiler.
Technical Details of what we think the bug is:
We use a static variable within a template class in order to reference count it, so whenever a new class of some template is instantiated, the reference count increases (since the variable is static and is effectively global, only accessed with the operator of scope (::)). However, when new plugins are opened using ltdl, the constructor for this static variable can be called again, and so the reference count will decrease to zero. This creates a dangerous situation where if any more of those classes go away, then core will think all of them are gone and start removing bits necessary to make those classes work. I shall post a testcase in this bug as soon as it is ready.