It is currently Tue Dec 11, 2018 12:13 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Error running program with subsystem qt on Fedora 27
PostPosted: Mon Jun 11, 2018 1:00 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1571
Location: Germany
After installing the necessary packages on Fedora 27 x86 with
Quote:
> su
> dnf install qt5-qtbase-devel
> dnf install qt5-qttools-devel
> dnf install qt5-qtmultimedia-devel
> dnf install qt5-qtsvg-devel
> dnf install qt5-qtwebkit-devel

and trying to compile the following simple hello world code with PB 5.70 Beta 1
Code:
MessageRequester("Info", "Hello Qt world!")
I obtained the following error messages in the IDE:
Quote:
Executable started.
[ERROR] HelloWorld-PB-Qt-GUI.PB (Line: 1)
[ERROR] Invalid memory access.

When compiling from console the executable is compiled without error but after starting the executable the following error is displayed in the console:
Quote:
Speicherzugriffsfehler (Speicherabzug geschrieben)


Top
 Profile  
Reply with quote  
 Post subject: Re: Error running program with subsystem qt on Fedora 27
PostPosted: Mon Jun 11, 2018 3:13 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13434
Location: France
Could you try with the debugger and -ds switch and use gdb to see where it crash ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Error running program with subsystem qt on Fedora 27
PostPosted: Tue Jun 12, 2018 9:29 am 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1571
Location: Germany
I have compiled my HelloWorld program on Fedora 27 x86 in 4 versions:

GTK2 version (34384 bytes)
> pbcompiler -s gtk2 HelloWorld-PB-GUI.PB -e HelloWorld-PB-GTK2-GUI

GTK3 version (34384 bytes)
> pbcompiler HelloWorld-PB-GUI.PB -e HelloWorld-PB-GTK3-GUI

Qt version (38612 bytes)
> pbcompiler -s qt HelloWorld-PB-GUI.PB -e HelloWorld-PB-Qt-GUI1

Qt version with debug symbols (48528 bytes)
> pbcompiler -ds -s qt HelloWorld-PB-GUI.PB -e HelloWorld-PB-Qt-GUI2

All 4 executables are created without any error message. The GTK2 and GTK3 versions run like a charm. The qt versions abort with a memory access error ("Speicherzugriffsfehler").

Using gdb to load the qt executable with debug symbols states that no debugging symbols are found:
gdb wrote:
Reading symbols from HelloWorld-PB-Qt-GUI...(no debugging symbols found)...done.

(gdb) run wrote:
Starting program: /media/PureBASIC/HelloWorld-PB-Qt-GUI2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb3ff0b40 (LWP 3331)]
[New Thread 0xb2690b40 (LWP 3332)]
[New Thread 0xb1c44b40 (LWP 3333)]
[New Thread 0xb12ffb40 (LWP 3334)]
warning: Corrupted shared library list: 0x80ac970 != 0x80ab980
[New Thread 0xb0ab1b40 (LWP 3335)]
[New Thread 0xaba6fb40 (LWP 3337)]
[New Thread 0xaa91db40 (LWP 3338)]

Thread 1 "HelloWorld-PB-Q" received signal SIGSEGV, Segmentation fault.
0xb462de62 in xcb_send_request_with_fds64 () from /lib/libxcb.so.1

(gdb) backtrace wrote:
#0 0xb462de62 in xcb_send_request_with_fds64 () at /lib/libxcb.so.1
#1 0xb462e54f in xcb_send_request64 () at /lib/libxcb.so.1
#2 0xb462e593 in xcb_send_request () at /lib/libxcb.so.1
#3 0xb4636302 in xcb_change_property () at /lib/libxcb.so.1
#4 0xb025cd2f in Adwaita::Helper::setVariant(QWidget*, QByteArray const&) () at /usr/lib/qt5/plugins/styles/adwaita.so
#5 0xb027f95c in Adwaita::Style::eventFilter(QObject*, QEvent*) () at /usr/lib/qt5/plugins/styles/adwaita.so
#6 0xb704917c in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /lib/libQt5Core.so.5
#7 0xb7892028 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/libQt5Widgets.so.5
#8 0xb789a927 in QApplication::notify(QObject*, QEvent*) () at /lib/libQt5Widgets.so.5
#9 0xb704944c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/libQt5Core.so.5
#10 0xb78da222 in QWidgetPrivate::show_helper() () at /lib/libQt5Widgets.so.5
#11 0xb78dd772 in QWidget::setVisible(bool) () at /lib/libQt5Widgets.so.5
#12 0xb7aef415 in QDialog::setVisible(bool) () at /lib/libQt5Widgets.so.5
#13 0xb78d9f1f in QWidget::show() () at /lib/libQt5Widgets.so.5
#14 0xb7aee4d1 in QDialog::exec() () at /lib/libQt5Widgets.so.5
#15 0x0804b1b8 in PB_MessageRequester2 ()
#16 0x0804b33e in PB_MessageRequester ()


Last edited by Shardik on Thu Jul 12, 2018 7:50 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Error running program with subsystem qt on Fedora 27
PostPosted: Tue Jun 12, 2018 9:46 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13434
Location: France
Thanks for the stacktrace, I will take a closer look


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye