Reply to topic

qt-4.4 to qt-4.6 without recompiling, is it possible?

zekkerj
Registered Member
Posts
5
Karma
0
OS
Hi,

I have an application (non open-source) which was compiled to use qt-4.4. But this application is, to put it on one word, ugly.

If I configure it to use qt-4.6.2, it's gui look very beautyfull --- but it crashes with SEGV when I try to save its files. :-\

Should I assume that this application is incompatible with qt-4.6? Or is there any way to fix this?

Note: 32-bit app on 64-bit system. :'(
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
Given that Qt is binary compatible ( like kdelibs ) this should be possible without problems.

Have you tried debugging the application using gdb to see where it is crashing? Does it output messages on the console indicating the issue?


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
zekkerj
Registered Member
Posts
5
Karma
0
OS
bcooksley wrote:Given that Qt is binary compatible ( like kdelibs ) this should be possible without problems.

Have you tried debugging the application using gdb to see where it is crashing? Does it output messages on the console indicating the issue?


Yes, gdb says that it crashes somewhere inside libQtXml.so.4, in QDomNode::save(QTextStream&, int):

Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0xf69ea2ad in ?? () from /usr/lib32/libQtXml.so.4
(gdb) bt
#0  0xf69ea2ad in ?? () from /usr/lib32/libQtXml.so.4
#1  0xf69dccf2 in ?? () from /usr/lib32/libQtXml.so.4
#2  0xf69ea3b9 in ?? () from /usr/lib32/libQtXml.so.4
#3  0xf69dccf2 in ?? () from /usr/lib32/libQtXml.so.4
#4  0xf69ea3b9 in ?? () from /usr/lib32/libQtXml.so.4
#5  0xf69ee46b in ?? () from /usr/lib32/libQtXml.so.4
#6  0xf69ee8d3 in QDomNode::save(QTextStream&, int) const () from /usr/lib32/libQtXml.so.4
#7  0xf69ee93e in QDomDocument::toString(int) const () from /usr/lib32/libQtXml.so.4
#8  0xf69ee9b6 in QDomDocument::toByteArray(int) const () from /usr/lib32/libQtXml.so.4
#9  0x08a13ef5 in CNetworkFile::saveFileStream() ()
#10 0x08a2baaa in CNetworkFile::saveFile(QString, bool) ()
#11 0x080addab in CAppWindow::fileSaveAs(QString const&) ()
#12 0x080ae3ed in CAppWindow::fileSave() ()
#13 0x0a9e1061 in CAppWindow::qt_metacall(QMetaObject::Call, int, void**) ()
#14 0xf5bedc9a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib32/libQtCore.so.4
#15 0xf5bfc3d5 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib32/libQtCore.so.4
#16 0xf6081af3 in QAction::activated(int) () from /usr/lib32/libQtGui.so.4
#17 0xf6083de5 in QAction::activate(QAction::ActionEvent) () from /usr/lib32/libQtGui.so.4
#18 0xf6576bd2 in QToolButton::nextCheckState() () from /usr/lib32/libQtGui.so.4
#19 0xf6493cb3 in ?? () from /usr/lib32/libQtGui.so.4
#20 0xf6493fae in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib32/libQtGui.so.4
#21 0xf657709c in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib32/libQtGui.so.4
#22 0xf60e67f8 in QWidget::event(QEvent*) () from /usr/lib32/libQtGui.so.4
#23 0xf6492d4e in QAbstractButton::event(QEvent*) () from /usr/lib32/libQtGui.so.4
#24 0xf6579bca in QToolButton::event(QEvent*) () from /usr/lib32/libQtGui.so.4
#25 0xf60884dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib32/libQtGui.so.4
#26 0xf608f9f7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib32/libQtGui.so.4
#27 0xf5be8a3b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib32/libQtCore.so.4
#28 0xf608e952 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib32/libQtGui.so.4
#29 0xf611a088 in ?? () from /usr/lib32/libQtGui.so.4
#30 0xf6119511 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib32/libQtGui.so.4
#31 0xf614860a in ?? () from /usr/lib32/libQtGui.so.4
#32 0xf51ef5e5 in g_main_context_dispatch () from /lib32/libglib-2.0.so.0
#33 0xf51f32d8 in ?? () from /lib32/libglib-2.0.so.0
#34 0xf51f34b8 in g_main_context_iteration () from /lib32/libglib-2.0.so.0
#35 0xf5c145d5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib32/libQtCore.so.4
#36 0xf6148135 in ?? () from /usr/lib32/libQtGui.so.4
#37 0xf5be7059 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib32/libQtCore.so.4
#38 0xf5be74aa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib32/libQtCore.so.4
#39 0xf5beb69f in QCoreApplication::exec() () from /usr/lib32/libQtCore.so.4
#40 0xf6088577 in QApplication::exec() () from /usr/lib32/libQtGui.so.4
#41 0x081b1061 in main ()


Code: Select all
ldd /opt/pt/bin/PacketTracer5
        linux-gate.so.1 =>  (0xf775b000)
        libQtWebKit.so.4 => /usr/lib32/libQtWebKit.so.4 (0xf6719000)
        libQtScript.so.4 => /usr/lib32/libQtScript.so.4 (0xf64b3000)
        libQt3Support.so.4 => /usr/lib32/libQt3Support.so.4 (0xf61d0000)
        libQtSql.so.4 => /usr/lib32/libQtSql.so.4 (0xf6190000)
        libQtXml.so.4 => /usr/lib32/libQtXml.so.4 (0xf614b000)
        libQtGui.so.4 => /usr/lib32/libQtGui.so.4 (0xf56cf000)
        libXext.so.6 => /usr/lib32/libXext.so.6 (0xf56bf000)
        libX11.so.6 => /usr/lib32/libX11.so.6 (0xf55a1000)
        libQtNetwork.so.4 => /usr/lib32/libQtNetwork.so.4 (0xf547a000)
        libQtCore.so.4 => /usr/lib32/libQtCore.so.4 (0xf51fc000)
        librt.so.1 => /lib32/librt.so.1 (0xf51f3000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf51da000)
        libdl.so.2 => /lib32/libdl.so.2 (0xf51d6000)
        libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf50df000)
        libm.so.6 => /lib32/libm.so.6 (0xf50b9000)
        libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf509a000)
        libc.so.6 => /lib32/libc.so.6 (0xf4f40000)
        libsqlite3.so.0 => /usr/lib32/libsqlite3.so.0 (0xf4ebd000)
        libphonon.so.4 => /usr/lib32/libphonon.so.4 (0xf4e67000)
        libQtXmlPatterns.so.4 => /usr/lib32/libQtXmlPatterns.so.4 (0xf4a4c000)
        libXrender.so.1 => /usr/lib32/libXrender.so.1 (0xf4a42000)
        libfontconfig.so.1 => /usr/lib32/libfontconfig.so.1 (0xf4a12000)
        libaudio.so.2 => /usr/lib32/libaudio.so.2 (0xf49fb000)
        libglib-2.0.so.0 => /lib32/libglib-2.0.so.0 (0xf4930000)
        libpng12.so.0 => /lib32/libpng12.so.0 (0xf490b000)
        libz.so.1 => /usr/lib32/libz.so.1 (0xf48f6000)
        libfreetype.so.6 => /usr/lib32/libfreetype.so.6 (0xf4880000)
        libgobject-2.0.so.0 => /usr/lib32/libgobject-2.0.so.0 (0xf4841000)
        libSM.so.6 => /usr/lib32/libSM.so.6 (0xf4837000)
        libICE.so.6 => /usr/lib32/libICE.so.6 (0xf481e000)
        libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf4804000)
        libgthread-2.0.so.0 => /usr/lib32/libgthread-2.0.so.0 (0xf47fe000)
        /lib/ld-linux.so.2 (0xf775c000)
        libQtDBus.so.4 => /usr/lib32/libQtDBus.so.4 (0xf4785000)
        libexpat.so.1 => /lib32/libexpat.so.1 (0xf475d000)
        libXt.so.6 => /usr/lib32/libXt.so.6 (0xf470a000)
        libXau.so.6 => /usr/lib32/libXau.so.6 (0xf4706000)
        libpcre.so.3 => /lib32/libpcre.so.3 (0xf46d5000)
        libuuid.so.1 => /lib32/libuuid.so.1 (0xf46d0000)
        libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf46c9000)


Just say if there is any other information that could be useful.

By the way... Kubuntu 10.04 64bits, kernel 2.6.32-22-generic.
/usr/lib32/libQtXml.so.4.6.2: 276324 bytes, MD5: f91c0766eb1cc1e14a69b3da90155161.

Application: Cisco Packet Tracer 5.3 (32 bits).
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
This appears to be due to a behaviour change or a regression in Qt. The QDom API however is effectively in minimal maintenance mode only however, so it will likely not be fixed.

To resolve this, setting "LD_LIBRARY_PATH" to a directory containing a copy of libQtXml from Qt 4.4 should be sufficient to fix the issue in the interim.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
zekkerj
Registered Member
Posts
5
Karma
0
OS
Ouch, seems to work.

Created dir /usr/lib32/qt-4.4, copied libQtXml.so.4.4.3 shipped with application to there, with its symlinks "libQtXml.so.4" and "libQtXml.so.4.4".

started app this way:

LD_LIBRARY_PATH=/usr/lib32/qt-4.4 /opt/pt/bin/PacketTracer5

Repeated the steps to reproduce the SEGV, and it haven't appeared. :D

Thanks for your help!
Popolo
Registered Member
Posts
2
Karma
0
OS
Cisco's PacketTracer 5.3 (32bit app.) correctly runs on my 64bit machine.
I can save and reread applications files.
However, fonts are ugly, close to unreadable!
In packettracer's lib dir, I renamed the original libQtGui.so.4.4.3 library to another name and replaced it by a new link to /usr/lib32/libQtGui.so.4.6.2
But there seems to be a changed or missing symbol in the new Qt4.6 lib:
./PacketTracer5: symbol lookup error: /usr/local/PacketTracer5/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv

Any idea to solve this problem?
zekkerj
Registered Member
Posts
5
Karma
0
OS
Popolo wrote:Cisco's PacketTracer 5.3 (32bit app.) correctly runs on my 64bit machine.
I can save and reread applications files.
However, fonts are ugly, close to unreadable!
In packettracer's lib dir, I renamed the original libQtGui.so.4.4.3 library to another name and replaced it by a new link to /usr/lib32/libQtGui.so.4.6.2
But there seems to be a changed or missing symbol in the new Qt4.6 lib:
./PacketTracer5: symbol lookup error: /usr/local/PacketTracer5/lib/libQtGui.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv

Any idea to solve this problem?


When I ran into this problem, I've edited the PacketTracer script to not set LD_LIBRARY_PATH, and then used "getlibs" to install the needed libraries. But "getlibs" need to be run against the real app, not to the script.
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
You need to provide access to the Qt 4.6.2 QtCore library.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
Popolo
Registered Member
Posts
2
Karma
0
OS
Great!
- Use getlibs to grab and install missing libs,
- Comment LD_LIBRARY line in 'packettracer' start script
and it works!
Thanks a lot. :)

 
Reply to topic

Bookmarks



Who is online

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