Runtime Error on 32bits...



  • I'm getting this error on rutime:

    @
    (InoveSATBEV:7109): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
    Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    GConf Error: No D-BUS daemon running

    (InoveSATBEV:7109): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
    Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

    ** (InoveSATBEV:7109): WARNING **: gst_gconf_get_string: error: No D-BUS daemon running
    @

    The application don't close, still running, but some events install on the QWebView is not executed:
    Appears to be a something with Webkit... I'm not sure!

    The code that insert Qwebview events:
    @
    ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("sender", this);
    @

    The JavaScript inside the SVG File loaded in "webview":
    @
    sender.clicked( 1 );
    @

    On 64bits, works everything fine.
    What's the problem?



  • This prolem occours when I run with Root!

    If I use the sudo ./MyApplication, this error appears to me:

    @
    WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface
    @

    I don't use any kind od "audio"... not in my code!



  • With high probability it is used by WebKit to handle audio or video tags in HTML5. If you set application name does this problem ends?



  • How to set "application name"?





  • Nothing change...
    The error still there!



  • What exactly did you change in your code and what is the resulting error. You have to tell and do a little more if you want people to help you.



  • KA510... I don't change anything between Compilations...
    The problems is all showed above, the errors still the same!

    I change the main.cpp, now is:

    @
    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    a.setApplicationName( "Balança Embarcada Veicular - Sistema Assistência Técnica" );
    a.setApplicationVersion( "1.0" );
    a.setOrganizationDomain( "none" );
    a.setOrganizationName( "Inove Tecnologia" );
    setlocale( QApplication::UnicodeUTF8, "C" );
    MainWindow w;
    w.show();
    return a.exec();
    }
    @



  • The source code of screen that shows the error on 32bits:

    UI:
    @
    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
    <class>WidgetSVG</class>
    <widget class="QWidget" name="WidgetSVG">
    <property name="geometry">
    <rect>
    <x>0</x>
    <y>0</y>
    <width>400</width>
    <height>300</height>
    </rect>
    </property>
    <property name="minimumSize">
    <size>
    <width>400</width>
    <height>300</height>
    </size>
    </property>
    <property name="windowTitle">
    <string>Form</string>
    </property>
    <property name="styleSheet">
    <string notr="true">background-color: rgb(145, 145, 145)</string>
    </property>
    <layout class="QHBoxLayout" name="horizontalLayout">
    <property name="spacing">
    <number>5</number>
    </property>
    <property name="margin">
    <number>5</number>
    </property>
    <item>
    <widget class="QWebView" name="webView">
    <property name="autoFillBackground">
    <bool>false</bool>
    </property>
    <property name="url">
    <url>
    <string>about:blank</string>
    </url>
    </property>
    </widget>
    </item>
    <item>
    <widget class="QGroupBox" name="groupBox">
    <property name="font">
    <font>
    <weight>75</weight>
    <bold>true</bold>
    </font>
    </property>
    <property name="title">
    <string>Detalhes:</string>
    </property>
    <property name="alignment">
    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
    </property>
    <property name="flat">
    <bool>true</bool>
    </property>
    <layout class="QVBoxLayout" name="verticalLayout_2">
    <property name="spacing">
    <number>3</number>
    </property>
    <property name="margin">
    <number>5</number>
    </property>
    <item>
    <widget class="QLabel" name="lbClasse">
    <property name="text">
    <string>Classe:</string>
    </property>
    </widget>
    </item>
    <item>
    <widget class="QLabel" name="lbCodigo">
    <property name="text">
    <string>Código:</string>
    </property>
    </widget>
    </item>
    <item>
    <widget class="QLabel" name="lbGrupo">
    <property name="text">
    <string>Grupo:</string>
    </property>
    </widget>
    </item>
    <item>
    <widget class="QLabel" name="lbNumeroEixos">
    <property name="text">
    <string>Número de Eixos:</string>
    </property>
    </widget>
    </item>
    <item>
    <widget class="QLabel" name="lbCargaMaxima">
    <property name="text">
    <string>Carga Máx.:</string>
    </property>
    </widget>
    </item>
    <item>
    <spacer name="verticalSpacer">
    <property name="orientation">
    <enum>Qt::Vertical</enum>
    </property>
    <property name="sizeHint" stdset="0">
    <size>
    <width>20</width>
    <height>40</height>
    </size>
    </property>
    </spacer>
    </item>
    <item>
    <widget class="QPushButton" name="btSelecionar">
    <property name="text">
    <string>Selecionar Veículo</string>
    </property>
    </widget>
    </item>
    </layout>
    </widget>
    </item>
    </layout>
    </widget>
    <customwidgets>
    <customwidget>
    <class>QWebView</class>
    <extends>QWidget</extends>
    <header>QtWebKit/QWebView</header>
    </customwidget>
    </customwidgets>
    <resources/>
    <connections/>
    </ui>
    @



  • The source code of screen that shows the error on 32bits:

    cpp
    @
    #include "widgetsvg.h"
    #include "ui_widgetsvg.h"

    #include <QWebFrame>
    #include "QtCore/QDebug"

    WidgetSVG::WidgetSVG(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::WidgetSVG)
    {
    ui->setupUi(this);
    ui->webView->setContextMenuPolicy(Qt::CustomContextMenu);
    ui->webView->setEnabled(false);
    }
    WidgetSVG::WidgetSVG(Veiculo *newVeiculo, QWidget *parent):
    QWidget(parent),
    ui(new Ui::WidgetSVG)
    {
    ui->setupUi(this);
    ui->webView->setContextMenuPolicy(Qt::CustomContextMenu);
    ui->webView->setEnabled(false);
    setVeiculo( newVeiculo );
    installEventFilter(this);
    }
    WidgetSVG::~WidgetSVG()
    {
    delete ui;
    }
    void WidgetSVG::setVeiculo(Veiculo newVeiculo)
    {
    this->veiculo = newVeiculo;
    ui->webView->setUrl( getVeiculo()->getFileUrl() );
    loadScreenData();
    }
    Veiculo
    WidgetSVG::getVeiculo()
    {
    return this->veiculo;
    }
    void WidgetSVG::adjust()
    {
    QString url = ui->webView->url().toString().remove(0, 7);
    renderer = new QSvgRenderer(url);
    ui->webView->setZoomFactor( getFactor() );
    }
    void WidgetSVG::clicked(int codigo)
    {
    eixoSelecionado( codigo );
    }
    int WidgetSVG::getComponentWidth()
    {
    return ui->webView->size().width();
    }
    int WidgetSVG::getSVGWidth()
    {
    return renderer->defaultSize().width();
    }
    double WidgetSVG::getSVGRatio()
    {
    return (double) renderer->defaultSize().height() / renderer->defaultSize().width();
    }
    double WidgetSVG::getFactor()
    {
    return (double) getComponentWidth() / getSVGWidth();
    }
    void WidgetSVG::loadScreenData()
    {
    ui->lbClasse->setText( ui->lbClasse->text() + " " + getVeiculo()->getClasse() );
    ui->lbCodigo->setText( ui->lbCodigo->text() + " " + QString::number(getVeiculo()->getCodigo()) );
    ui->lbGrupo->setText( ui->lbGrupo->text() + " " + QString::number(getVeiculo()->getGrupo()) );
    ui->lbNumeroEixos->setText( ui->lbNumeroEixos->text() + " " + QString::number(getVeiculo()->getNumeroEixos()) );
    ui->lbCargaMaxima->setText( ui->lbCargaMaxima->text() + " " +QString::number(getVeiculo()->getPBT()) + " Ton." );
    }
    bool WidgetSVG::eventFilter(QObject *obj, QEvent *event)
    {
    bool retorno = false;
    if (event->type() == QEvent::Resize)
    {
    adjust();
    retorno = true;
    } else {
    ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("sender", this);
    retorno = QWidget::eventFilter(obj, event);
    }
    return retorno;
    }

    void WidgetSVG::on_btSelecionar_clicked()
    {
    emit veiculoSelecionado(getVeiculo());
    emit selected();
    this->setStyleSheet("background-color: rgb(138, 121, 35);");
    ui->webView->setEnabled(true);
    }
    void WidgetSVG::setUnselected()
    {
    this->setStyleSheet("background-color: rgb(145, 145, 145);");
    ui->webView->setEnabled(false);
    }
    @



  • I try this too:

    @
    #include <QtGui/QApplication>
    #include "QtCore/QtDebug"
    #include "mainwindow.h"

    int main(int argc, char *argv[])
    {
    QString appName = "Balança Embarcada Veicular - Sistema Assistência Técnica";
    QString appVersion = "1.0";
    QString orgName = "Inove Tecnologia";
    QString orgDomain = "http://inovetecnologia.com.br/";
    QApplication::setApplicationName( appName );
    QApplication::setApplicationVersion( appVersion );
    QApplication::setOrganizationName( orgName );
    QApplication::setOrganizationDomain( orgDomain );
    QCoreApplication::setApplicationName( appName );
    QCoreApplication::setApplicationVersion( appVersion );
    QCoreApplication::setOrganizationDomain( orgDomain );
    QCoreApplication::setOrganizationName( orgName );
    QApplication a(argc, argv);
    a.setApplicationName( appName );
    a.setApplicationVersion( appVersion );
    a.setOrganizationDomain( orgDomain );
    a.setOrganizationName( orgName );
    setlocale( QApplication::UnicodeUTF8, "C" );
    MainWindow w;
    w.show();
    return a.exec();
    }
    @

    Still got problems...
    This problems could be from lib's?
    The 64bits I using OpenSuse to Compile, And 32bits I'm using Ubuntu 32bits (VMware)!



  • Well, I install OpenSuse 32bits (with KDE)
    Install QT, Compile on then and run...
    The errors appears, but the application works as needed:

    @
    klauncher(26995) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.
    kdeinit4: Communication error with launcher. Exiting!
    Balança Embarcada Veicular - Sistema Assistência Técnica(26948): No ksycoca4 database available!

    Balança Embarcada Veicular - Sistema Assistência Técnica(26948)/kdecore (trader) KServiceTypeTrader::defaultOffers: KServiceTypeTrader: serviceType "PhononBackend" not found
    @

    Appears to be something with Ubuntu or maybe the gnome 32bits.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.