Qt::SystemTrayIcon::isSystemTrayAvailable() segfault

Bug #454597 reported by Marc Bowes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kdebindings (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

$ irb
irb(main):001:0> require 'Qt4'
=> true
irb(main):002:0> Qt::SystemTrayIcon::isSystemTrayAvailable()
(irb):2: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]

ProblemType: Bug
Architecture: i386
Date: Sun Oct 18 13:38:38 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: libqt4-ruby 4:4.3.2-0ubuntu3
PackageArchitecture: all
ProcEnviron:
 LANG=en_ZA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: kdebindings
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Marc Bowes (marcbowes) wrote :
Revision history for this message
Terence Simpson (tsimpson) wrote :

This seems to be caused by a NULL pointer being passed as a Display*. I'm not sure this counts as a bug though, as a QApplication was not created, so it was not initialized.

irb(main):001:0> require 'Qt'
=> true
irb(main):002:0> app = Qt::Application.new []
=> #<Qt::Application:0xb61f6a60 objectName="irb">
irb(main):003:0> Qt::SystemTrayIcon::isSystemTrayAvailable()
=> true
irb(main):004:0>

Changed in kdebindings (Ubuntu):
status: New → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Terence Simpson (tsimpson) wrote :

This is a backtrace from ruby

Revision history for this message
Marc Bowes (marcbowes) wrote :

What is the C++ behaviour if no QApplication is made? Surely it doesn't segfault as well?

Revision history for this message
Terence Simpson (tsimpson) wrote :

This is an issue with Qt not being properly initialized before using a QObject, however it would be better if Ruby did not crash on this.
For that reason I'm closing this bug, but I have reported it to KDE: http://bugs.kde.org/show_bug.cgi?id=210991

Changed in kdebindings (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Terence Simpson (tsimpson) wrote :

Actually, the C++ version does segfault:
#include <QtGui>

int main(int argc, char** argv) {
    QSystemTrayIcon::isSystemTrayAvailable();
}

$ ./a.out
Segmentation fault

Revision history for this message
Marc Bowes (marcbowes) wrote :

Thanks. That sounds reasonable to me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.