Crashes with libQtUiTools.a if linked multiple times into the same process (with Bsymbolic-functions flag)

Friedrich W. H. Kossebau kossebau at
Sat May 11 19:53:46 BST 2013


tl;dr how to avoid crashes if libQtUiTools.a is linked multiple times into a 

You use at least one of kross, kjsembed, or plasma in your 
application/lib/module and possibly also directly libQtUiTools yourself?

Then shows that chances are that you have seen crashes with this 
in the backtrace:
#6  0xb5320313 in 
QMetaObject const*, QFormInternal::DomProperty const*) () from XXX 

where XXX could be libplasma, libkjsembed, krossmoduleforms or your own 

For historic reasons libQtUiTools is a static lib, not a shared, and there has 
been no work to change that, compare

A few days ago I looked into Kross scripts in Calligra the first time, only to 
ran into this problem, as reported to my distri here:

As can be read in that report, I saw in my backtrace that QFormInternal 
methods are once called in, once in in 
the very same call stack, while they surely should be only done in a single 
place. And Hrvoje Senjan found that linking libQtUiTools.a into the own code 
without Bsymbolic-functions flag seems to avoid the crashes.

So, anyone with more clue than me WRT symbols from static libs and the 
Bsymbolic-functions linker flag who could tell if that indeed should fix such 
problems if code from the same static lib is arriving multiple times in the 
same process via different libs/modules?

If so, should all the places where ${QT_QTUITOOLS_LIBRARY} is linked in 
kdelibs and elsewhere get a blocker to the Bsymbolic-functions flag?
How would that be done, to force this flag to be unset?

What about other non-GCC platforms/compilers, is there a similar problem?


More information about the kde-core-devel mailing list