Why does my mobile app crash?
-
[quote author="spode" date="1326400826"]my symbian^1 app crashes and makes the phone to restart. on symulator it starts...[/quote]
I guess there are no fortune tellers nor mind readers in Qt Developer Network so it will be better to show your source code :)
-
hahahah right! =) why can you everytime understand me? =P
@Add more folders to ship with the application, here
folder_01.source = qml/Werfer
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
symbian:TARGET.UID3 = 0xEC4A8CB9
Smart Installer package's UID
This UID is from the protected range and therefore the package will
fail to install if self-signed. By default qmake uses the unprotected
range value if unprotected UID is defined for the application and
0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
Allow network access on Symbian
symbian:TARGET.CAPABILITY += NetworkServices
If your application uses the Qt Mobility libraries, uncomment the following
lines and add the respective components to the MOBILITY variable.
CONFIG += mobility
MOBILITY += multimedia messaging contacts systeminfoSpeed up launching on MeeGo/Harmattan when using applauncherd daemon
CONFIG += qdeclarative-boostable
Add dependency to Symbian components
CONFIG += qt-components
The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
prima.cpp
FliegendeLieder/musica1.cpp
FliegendeLieder/musica2.cpp
Schnell.com/sms1.cpp
Schnell.com/sms2.cpp
Schnell.com/sms3.cpp
Schnell.com/sms4.cpp
Schnell.com/contatto.cppPlease do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()HEADERS +=
prima.h
FliegendeLieder/musica1.h
FliegendeLieder/musica2.h
Schnell.com/sms1.h
Schnell.com/sms2.h
Schnell.com/sms3.h
Schnell.com/sms4.h
Schnell.com/contatto.hOTHER_FILES +=
Rubrica/rubrica.qml
@code that fails:
@
#include "sms2.h"
#include <QApplication>
#include "sms1.h"
#include "sms3.h"
#include <QDeclarativeContext>
#include "sms4.h"
#include "contatto.h"
#include <QDebug>sms2::sms2(QWidget *parent) :
QWidget(parent)
{
view = new QDeclarativeView(this);qDebug()<<"qui"; QContactManager manager; QList<QContact> listaDiTuttiIContattiPresenti = manager.contacts(); qDebug()<<"qui2"; QList<QtMobility::QContactAvatar> listaDiTuttiGliAvatarsDeiContatti; QList<QObject*> listaDiTuttiGliUrlsDegliAvatarDeiContatti; qDebug()<<"qui3"; for(int i = 0; i < listaDiTuttiIContattiPresenti.length(); i++) { listaDiTuttiGliAvatarsDeiContatti.append(listaDiTuttiIContattiPresenti.at(i).detail<QContactAvatar>()); QContactName nome = listaDiTuttiIContattiPresenti.at(i).detail(QContactName::DefinitionName); QContactPhoneNumber numero = listaDiTuttiIContattiPresenti.at(i).detail(QContactPhoneNumber::DefinitionName); listaDiTuttiGliUrlsDegliAvatarDeiContatti.append(new contatto(listaDiTuttiGliAvatarsDeiContatti.at(i).imageUrl(), numero.number(), nome.customLabel())); } qDebug()<<"qui4"; view->rootContext()->setContextProperty("listaImmaginiAvatar", QVariant::fromValue(listaDiTuttiGliUrlsDegliAvatarDeiContatti));
qDebug()<<"qui5";
view->setSource(QUrl::fromLocalFile("qml/Werfer/Schnell.com/sms2.qml"));
qDebug()<<"qui6";
this->setAttribute(Qt::WA_LockLandscapeOrientation);QObject *b = view->rootObject(); b->setProperty("lunghezza", QApplication::desktop()->geometry().width()); b->setProperty("altezza", QApplication::desktop()->geometry().height()); b->setProperty("dataCorrente", this->getDate()); connect(b, SIGNAL(request_writeSMS(QUrl, QString, QString)), this, SLOT(openSMS3(QUrl, QString, QString))); connect(b, SIGNAL(request_close()), this, SLOT(openSMS1())); view->show(); this->showFullScreen();
}
QString sms2::getDate()
{
QDate date = QDate::currentDate();
QString datastringa, a, b, c;
datastringa = date.longDayName(date.dayOfWeek()) + " " + a.setNum(date.day()) + "." + b.setNum(date.month()) + "." + c.setNum(date.year());
datastringa[0] = datastringa[0].toUpper();
return datastringa;
}void sms2::openSMS3(const QUrl &urldelcontatto, const QString &numerodelcontatto, const QString &nomedelcontatto)
{
this->close();
sms3 *s = new sms3(urldelcontatto, numerodelcontatto, nomedelcontatto);
s->show();
}void sms2::openSMS4()
{
this->close();
sms4 *s = new sms4;
s->show();
}void sms2::openSMS1()
{
this->close();
sms1 *s = new sms1;
s->show();
}
@i am using symbian^1!
-
I suggest to add proper "Symbian capabilities":http://developer.qt.nokia.com/wiki/Symbian_Capabilities to the pro file. I think that QContactManager requires ReadUserData and ReadDeviceData but you might need something else too.
-
may you help me? i am using: QContact, QMessage and QMediaPlayer for symbian...
EDIT: ah this is the problem i should solve to make my app start:
@
Patching package file and relevant binaries...Patching: Executable with capabilities incompatible with self-signing detected: "Werfer_patched_caps.exe". (Incompatible capabilities: "ReadDeviceData", "WriteDeviceData", "AllFiles".) Reducing capabilities is only supported for libraries.
Patching: Unable to patch the package for self-singing.
Use a proper developer certificate for signing this package.make[1]: Leaving directory `C:/Users/7-Spode/Documents/Qt/Werfer'
ERROR: Automatic patching failed at C:\QtSDK\Symbian\SDKs\Symbian1Qt473\bin\createpackage.pl line 357.
make[1]: *** [ok_sis] Error 2
C:\QtSDK\Symbian\SDKs\Symbian1Qt473\epoc32\tools\make.exe: *** [sis] Error 2
15:27:40: The process "C:\QtSDK\Symbian\SDKs\Symbian1Qt473\epoc32\tools\make.exe" exited with code 2.
Error while building project Werfer (target: Symbian Device)
When executing build step 'Create SIS Package'
@ -
bq. Patching: Unable to patch the package for self-singing.
Use a proper developer certificate for signing this package.AFAIK , self-sign will get you only basic capabilities.
which are :
@LocalServices
Location
NetworkServices
UserEnvironment
ReadUserData
WriteUSerData@You might need developer or symbian certificates for extended capabilities.