2

I have a problem when deploying an application written in Qt 4.7.4/QtQuick 1.0 for Harmattan. While everything goes right in the Simulator, the application does not draw any User Interface when deployed on Nokia N9 (MeeGo 1.2 Harmattan, Version PR1.1). The deployment succeeds and the app can be found in the application list on the device, and even the console log outputs can be seen in QtCreator, but there is no sign that the app actually runs on the device - I can freely navigate through the system and open other apps while QtCreator says my application is running.

The application output view in QtCreator says:

Killing remote process(es)...
Starting remote process ...
Remote process started.
Using the meego graphics system
Found SGX/MBX driver, enabling FullClearOnEveryFrame 
Found v1.4 driver, enabling brokenTexSubImage 

And heres the compile output:

Running build steps for project pacca...
Configuration unchanged, skipping qmake step.
Starting: "C:\qtsdk\madde\bin\make.exe" -w
make: Entering directory `/d/qtproject/pacca'
make: Nothing to be done for `first'.
make: Leaving directory `/d/qtproject/pacca'
The process "C:\qtsdk\madde\bin\make.exe" exited normally.
Creating package file ...
Package Creation: Running command 'c:/qtsdk/madde/bin/mad dpkg-buildpackage -nc -uc -us'.
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value: 
dpkg-buildpackage: set LDFLAGS to default value: 
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
which: pgp: unknown command
dpkg-buildpackage: source package pacca
dpkg-buildpackage: source version 0.0.1
dpkg-buildpackage: source changed by unknown <>
dpkg-buildpackage: host architecture armel
 debian/rules build
make: Nothing to be done for `build'.
 debian/rules binary
dh_testdir
dh_testroot
dh_clean -k 
dh_installdirs
# Add here commands to install the package into debian/pacca.
/usr/bin/make INSTALL_ROOT="/d/qtproject/pacca"/debian/pacca install
make[1]: Entering directory `/d/qtproject/pacca'
cp -f -r d:/qtproject/pacca/qml/pacca /d/qtproject/pacca/debian/pacca/opt/pacca/qml/
install -m 644 -p d:/qtproject/pacca/pacca80.png /d/qtproject/pacca/debian/pacca/usr/share/icons/hicolor/80x80/apps/
install -m 644 -p d:/qtproject/pacca/pacca_harmattan.desktop /d/qtproject/pacca/debian/pacca/usr/share/applications/
install -m 755 -p "pacca" "/d/qtproject/pacca/debian/pacca/opt/pacca/bin/pacca"
make[1]: Leaving directory `/d/qtproject/pacca'
dh_testdir
dh_testroot
dh_installchangelogs 
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
# dh_shlibdeps # Uncomment this line for use without Qt Creator
dh_gencontrol
dh_md5sums
dpkg-gencontrol: warning: unknown substitution variable ${shlibs:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dh_builddeb
aegis-manifest: No findings in 'pacca'.
 dpkg-genchanges -b -u.. >../pacca_0.0.1_armel.changes
dpkg-buildpackage: binary only upload (no source included)
dpkg-genchanges: binary-only upload - not including any source code
Can't locate Debian/Debhelper/Dh_Lib.pm in @INC (@INC contains: /usr/lib/perl5/5.8/msys /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/msys /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/msys /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at c:/qtsdk/madde/madbin/dh_clean line 10.
BEGIN failed--compilation aborted at c:/qtsdk/madde/madbin/dh_clean line 10.
Package created.
Installing package to sysroot ...
Package 'pacca' removed.

Package 'pacca' installed.

Connecting to device...
Preparing SFTP connection...
Starting upload...
Successfully uploaded package file.
Installing package to device...
(Reading database ... 41700 files and directories currently installed.)
Preparing to replace pacca 0.0.1 (using .../pacca_0.0.1_armel.deb) ...
Unpacking replacement pacca ...
aegis-installing pacca (from '')
Setting up pacca (0.0.1) ...
Processing triggers for desktop-file-utils ...
Processing triggers for hicolor-icon-theme ...
Package installed.
Deployment finished.

Although the compile output may gives some hints about the error, I have no clue what is going wrong. Ridiculously, at some earlier development point the app worked on the device. But unfortunately i don't know what I have changed since then.

Any help is highly appreciated. Thanks in advance.

endowzoner
  • 2,238
  • 3
  • 17
  • 20
  • Do you have a PageStackWindow or Page in your main QML file? Do you import QtQuick 1.0 or 1.1? – fejd Jan 16 '12 at 22:20
  • I neither have PageStackWindow nor Page in my main QML file. I use QtQuick 1.0. Do you think importing QtQuick 1.1 could resolve the problem? I'll give it a try. – endowzoner Jan 17 '12 at 10:13
  • Possibly, Qt 4.7.4 includes Qt Quick 1.1 but it might be alright to include 1.0 anyway. I've had issues when I in one file included 1.1, and the other 1.0. Do you get any log output in the console if you add Component.onCompleted { // get component status here } to your root item? The run and deploy logs look good to me otherwise. The reason why I suggested Page or PageStackWindow is that most examples I've seen seem to use them, or Window. But since you said it worked before then that's probably not the issue. – fejd Jan 17 '12 at 21:00
  • No luck. I have changed all QtQuick 1.0 includes with QtQuick 1.1, the result stays the same. Component.onCompleted gets called, I can see the log output. – endowzoner Jan 18 '12 at 19:07
  • That means the component gets loaded at least. All I can recommend at this point is to try adding QML_IMPORT_TRACE = 1 as a system variable to your run settings in Qt Creator and see if you can spot anything odd in the log. If you haven't done so already, try to scale down the QML UI to a minimum, or temporarily switch to a dummy view to rule out the QML code. If that doesn't lead anywhere I'd recommend trying the Qt dev boards (http://developer.qt.nokia.com/forums/viewforum/12/) and (http://www.developer.nokia.com/Community/Discussion/forumdisplay.php?220-Maemo-MeeGo). – fejd Jan 18 '12 at 21:51

1 Answers1

0

Finally, I solved the issue. It was a very trivial thing - however, it took me many hours.

To make the code generic (I thought), I didn't want to declare exact width and height for my root QML element. Instead, I specified

anchors.fill: parent

Well, that was the problem. Just adding 2 lines of code solved my problem (at least, for executing the application on a Nokia N9).

width: 480
height: 854

It looks like although the simulator can manage with the fill anchor, the N9 does not recognize it in the root element and therefore draws exactly nothing on the screen.

Thank you fejd for your help which led me to the right direction.

endowzoner
  • 2,238
  • 3
  • 17
  • 20