Index: /trunk/FACT++/gui/fact.cc
===================================================================
--- /trunk/FACT++/gui/fact.cc	(revision 13756)
+++ /trunk/FACT++/gui/fact.cc	(revision 13757)
@@ -1,4 +1,5 @@
 #include "FactGui.h"
 
+#include <TQtWidget.h>
 #include <TSystem.h>
 
@@ -73,6 +74,13 @@
     QApplication app(argc, const_cast<char**>(argv));
 
-    cout << "--- Instaniating GUI ---" << endl;
+    cout << "--- Working around a root bug ---" << endl;
+    {
+        // It seems sometimes TGQt::RegisterWid is called before
+        // fWidgetArray is initialized, so we force that to happen here
+        TQtWidget(NULL);
+        cout << "LD_LIBRARY_PATH=" << gSystem->GetDynamicPath() << endl;
+    }
 
+    cout << "--- Instantiating GUI ---" << endl;
     FactGui gui(conf);
 
