PDA

View Full Version : QWT 5, QT3, SuSE 10.2. Crash and burn



DrMcCleod
7th September 2007, 13:07
I have recently upgraded my Linux distribution to SuSE 10.2 and am having some trouble running programs that were previously OK.

The software in question is using QT3 and Qwt5. It builds OK, but crashes at runtime before it even reaches main().

Here is the verbose output from the debugger...

Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Reading symbols from /usr/lib64/libGL.so.1...done.
Reading symbols from /usr/lib64/libGLU.so.1...done.
Reading symbols from /usr/lib64/libqwt.so.5...done.
Reading symbols from /usr/lib/qt3/lib64/libqt-mt.so.3...done.
Reading symbols from /usr/lib64/libXext.so.6...done.
Reading symbols from /usr/lib64/libX11.so.6...done.
Reading symbols from /lib64/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 47860039768784 (LWP 28887)]
Reading symbols from /usr/lib64/libstdc++.so.6...done.
Reading symbols from /lib64/libm.so.6...done.
Reading symbols from /lib64/libgcc_s.so.1...done.
Reading symbols from /lib64/libc.so.6...done.
Reading symbols from /usr/lib64/libGLcore.so.1...done.
Reading symbols from /usr/lib64/tls/libnvidia-tls.so.1...done.
Reading symbols from /lib64/libdl.so.2...done.
Reading symbols from /usr/lib64/libQtGui.so.4...done.
Reading symbols from /usr/lib64/libpng12.so.0...done.
Reading symbols from /usr/lib64/libSM.so.6...done.
Reading symbols from /usr/lib64/libICE.so.6...done.
Reading symbols from /usr/lib64/libXi.so.6...done.
Reading symbols from /usr/lib64/libXrender.so.1...done.
Reading symbols from /usr/lib64/libXrandr.so.2...done.
Reading symbols from /usr/lib64/libXfixes.so.3...done.
Reading symbols from /usr/lib64/libXcursor.so.1...done.
Reading symbols from /usr/lib64/libXinerama.so.1...done.
Reading symbols from /usr/lib64/libfreetype.so.6...done.
Reading symbols from /usr/lib64/libfontconfig.so.1...done.
Reading symbols from /usr/lib64/libQtCore.so.4...done.
Reading symbols from /lib64/libz.so.1...done.
Reading symbols from /usr/lib64/libXft.so.2...done.
Reading symbols from /usr/lib64/libXdmcp.so.6...done.
Reading symbols from /usr/lib64/libXau.so.6...done.
Reading symbols from /usr/lib64/libexpat.so.1...done.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47860039768784 (LWP 28887)]
0x00002b874389b9e4 in QMutex::lock () from /usr/lib/qt3/lib64/libqt-mt.so.3



Now, this seems to suggest a problem with the QT multithread library, but when I use the Kdevelop wizard to make a quick and dirty Qmake-based test application it runs perfectly, even though it also uses libqt-mt.
However, if I link the QWT library to it, it crashes in the same way as above.

I have rebuilt two versions of the QWT library from source and both show identical results. All the libraries are 64-bit.

I am all out of ideas. Any suggestions?

marcel
7th September 2007, 13:10
Is the QWT library compiled on 64 bits, or it is on 32?

DrMcCleod
7th September 2007, 13:14
Is the QWT library compiled on 64 bits, or it is on 32?


That was my first guess as well ;)

Running file on it gives...

libqwt.so.5.0.0: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped


which looks correct.

Besides, if you link against a 32-bit library then the debugger gives you an ELFCLASS error instead.

wysota
7th September 2007, 14:16
Did you recompile the application after the upgrade? What does the backtrace say?

DrMcCleod
7th September 2007, 14:34
Did you recompile the application after the upgrade? What does the backtrace say?


Yeah, totally clean rebuild. All object files removed, qmake re-run etc

Backtrace...


#0 0x00002adf271b59e4 in QMutex::lock () from /usr/lib/qt3/lib64/libqt-mt.so.3
#1 0x00002adf2b672d5c in QAbstractFileEngineHandler::QAbstractFileEngineHan dler ()
from /usr/lib64/libQtCore.so.4
#2 0x00002adf2b6911c5 in QTemporaryFile::createLocalFile () from /usr/lib64/libQtCore.so.4
#3 0x00002adf2b691269 in qInitResourceIO () from /usr/lib64/libQtCore.so.4
#4 0x00002adf2b6912a5 in qInitResourceIO () from /usr/lib64/libQtCore.so.4
#5 0x00002adf2b700c12 in QTextCodecPlugin::qt_metacast () from /usr/lib64/libQtCore.so.4
#6 0x00007fff849beed8 in ?? ()
#7 0x00002adf2b3bb4f0 in ?? ()
#8 0x00002adf26103000 in ?? ()
#9 0x00002adf2b62de4b in _init () from /usr/lib64/libQtCore.so.4
#10 0x00002adf28521000 in ?? ()
#11 0x00002adf260f443b in call_init () from /lib64/ld-linux-x86-64.so.2
#12 0x00002adf260f4545 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#13 0x00002adf260e7b9a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#14 0x0000000000000001 in ?? ()
#15 0x00007fff849c098c in ?? ()
#16 0x0000000000000000 in ?? ()




Um... I am not mixing QT4 and QT3 libraries here by mistake am I.... :confused: ?

marcel
7th September 2007, 14:38
Well, yes you are using Qt4 libraries: #9 0x00002adf2b62de4b in _init () from /usr/lib64/libQtCore.so.4.

You should be using the libs from /usr/lib/qt3/lib64/.

Make sure LD_LIBRARY_PATH contains /usr/lib/qt3/lib64/ before usr/lib64 and also make sure QTDIR points to the right qt installation.

Regards

wysota
7th September 2007, 14:38
Seems that you are.

DrMcCleod
7th September 2007, 15:30
Well, yes you are using Qt4 libraries: #9 0x00002adf2b62de4b in _init () from /usr/lib64/libQtCore.so.4.

You should be using the libs from /usr/lib/qt3/lib64/.

Make sure LD_LIBRARY_PATH contains /usr/lib/qt3/lib64/ before usr/lib64 and also make sure QTDIR points to the right qt installation.

Regards


OK, this looks like it may be the problem.
I have uninstalled QT4 and its many parts from the PC. I will rebuild QWT etc etc so that it no longer uses the QT4 libraries. Hopefully, this should fix the problem.

Thanks to you both.

wysota
7th September 2007, 21:53
It should be enough to rebuild qwt - without uninstalling Qt4.