Google Pixel C Tablet again , Black screen on OpenGL apps?



  • This question was posted about a month ago but there were no answers and we are having the same issue. We can deploy to Samasung and other Android devices (pones and tablets, at least a few we have tried) but on Google Pixel C running Android 6.0.1 we sget a black screen but only with OpenGL applications. A few non-OGL
    samples we have tried (ex analog clock) seem to run fine. We have tried deployment from Ubutu and Mac running Qt 5.5 and Qt creator 3.5.1.

    Any help will be appreciated, Thanks.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Since 5.6.0 just got out, can you test against it ?



  • Hi, thank you for your response. Sure I will do that today and report back. I have managed to cross compile Qt 5.5 for nVidia X1 development kit , DRIVEC X (which is the processor used in Pixel C) with nVidia provided 64bit toolchain running on Ubuntu and it is all good. It is only the Android builds that have the issue. I am wondering if this has to do with 64bit architecture! I will try this today on my Mac . Thanks again.



  • Hi,
    Just uninstalled previous (5.5) version of Qt for iOS and Android and installed the 5.6. The same thing. I am trying the QtBase qopenglwindow example which is one of the simplest ones. BTW I cannot do debugging on the device as connection is refused. The helloGL2 sample in Android runs fine through Android Studio but even there I am not able to launch the debugger wither.
    Also when I run the Qt sample in Qt Creator I see this on application out put pane:

    Starting remote process.I art : Late-enabling -Xcheck:jni
    W System : ClassLoader referenced unknown path:
    W linker : /data/app/org.qtproject.example.qopenglwindow-1/lib/arm/libQt5Gui.so: unused DT entry: type 0xf arg 0x5042f
    W linker : /data/app/org.qtproject.example.qopenglwindow-1/lib/arm/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/data/org.qtproject.example.qopenglwindow/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unused DT entry: type 0xf arg 0x9260
    W linker : /data/data/org.qtproject.example.qopenglwindow/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/data/org.qtproject.example.qopenglwindow/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: is missing DT_SONAME will use basename as a replacement: "libqtforandroid.so"
    I Qt : qt start
    W linker : /data/app/org.qtproject.example.qopenglwindow-1/lib/arm/libqopenglwindow.so: unused DT entry: type 0x1d arg 0x3a56
    D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
    D NvOsDebugPrintf: NvRmPrivGetChipPlatform: Could not read platform information
    D NvOsDebugPrintf: Expected on kernels without fuse support, using silicon
    I OpenGLRenderer: Initialized EGL, version 1.4
    D libphs : cannot connect to power hinting service: service not available


  • Lifetime Qt Champion

    Just to be sure we're on the same track. You used the stock version of Qt or did you cross-compile it ?



  • It is stock out of the box on my Mac, Qt 5.6 downloaded this morning. On Ubuntu I have cross compiled Qt from source (5.5) for DRIVECX (Tegra X1) but even there the Qt Android builds are all stock. I just have a separate Qt libs that I have cross compiled for our development for my DRIVECX and that all work fine.

    I am now trying to compile a 64 bit Qt app on my Mac by messing with Android-g++ config and it seems that a QtGui and and Qt5Core lib is missing according to the linker. This makes sense if the pre build libs are all 32 bit. I wonder is this is the issue. Maybe I need a set of 64bit Qt libs for android. This is the only difference I can think of , I also noticed that Android NDK platform 21 has 64 bit libs so I changed that in the projects ANDROID_MDH_PLATFORM build Environment variables as the default I think was 9. Do you think this is a 32 v. 64 issue or am I barking up a wrong tree here :)


  • Lifetime Qt Champion

    That would make sense indeed.

    AFAIK to you should only need to setup ANDROID_TARGET_ARCH in order to have 64 bit build of Qt for Android.



  • Yes After trying a few things and looking in the qmake.conf I did realize that I only had to set that one env variable to do a 64bit build and when I do trying to build the app I get this , do you know of anyone anyone who has ran a Qt OpenGL app on Pixel C ?

    In file included from /home/allen/Android/Sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/include/signal.h:37:0,
    from /home/allen/Android/Sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/include/pthread.h:33,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include/bits/gthr-default.h:35,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include/bits/gthr.h:148,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:35,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/basic_string.h:39,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/string:52,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/random:40,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:66,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62,
    from /home/allen/QtAndroid/5.5/android_armv7/include/QtCore/qglobal.h:85,
    from /home/allen/QtAndroid/5.5/android_armv7/include/QtGui/qopenglwindow.h:37,
    from /home/allen/QtAndroid/5.5/android_armv7/include/QtGui/QOpenGLWindow:1,
    from ../qopenglwindow/main.cpp:41:
    /home/allen/Android/Sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/include/asm/sigcontext.h:44:2: error: '__uint128_t' does not name a type
    __uint128_t vregs[32];
    ^
    In file included from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/random:49:0,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:66,
    from /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62,
    from /home/allen/QtAndroid/5.5/android_armv7/include/QtCore/qglobal.h:85,
    from /home/allen/QtAndroid/5.5/android_armv7/include/QtGui/qopenglwindow.h:37,
    from /home/allen/QtAndroid/5.5/android_armv7/include/QtGui/QOpenGLWindow:1,
    from ../qopenglwindow/main.cpp:41:
    /home/allen/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/random.h:106:26: error: expected unqualified-id before '__int128'
    { typedef unsigned __int128 type; };
    ^
    make: *** [.obj/main.o] Error 1
    14:31:02: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project qopenglwindow (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.5.1))
    When executing step "Make"


  • Lifetime Qt Champion

    Sorry, I'm not aware of somebody owning a Pixel C around me.

    Did you rebuild Qt for 64 bit ?



  • noticed that I had to set a few other Env variables

    ANDROID_NDK_TOOLCHAIN_PREFIX=aarch64-linux-android
    ANDROID_NDK_TOOLS_PREFIX=aarch64-linux-android

    No, I am looking in to building Qt from source with the NDK 64bit toolchain, but what is puzzling is why non-opengl apps run?


  • Lifetime Qt Champion

    Do you mean widget based app ?



  • Yes, so far any non-OGL app works. I am trying to cross compile with Android 64bit toolchain but in the configure command I seem not to be able to tell it to go to the aarch64 architecture. the qdevice.pri that is generated keeps listing
    DEFAULT_ANDROID_TARGET_ARCH = armeabi-v7a

    So I am not using the correct compilers. I have exported all the environment variable (BTW I am on Ubuntu) bit it seems that these environment variables are not set in the qmake.conf. What is the configure option to set these?

    Thanks


  • Lifetime Qt Champion

    Can you show your environment setup and configure call ?



  • Sorry for the delay , This website was flaky yesterday. I have it all building. I managed (and it took a bit ) to cross compile Qt for 64 bit android using the android-24 NDK platform and toolchains. No luck , but I see a more meaningful message now. The activity fails to start on the device and here is the message
    W ActivityThread: Application org.qtproject.example.qopenglwindow can be debugged on port 8100...
    E Qt : Can't create main activity
    E Qt : java.io.FileNotFoundException: /data/user/0/org.qtproject.example.qopenglwindow/lib/libplugins_platforms_android_libqtforandroid.so: open failed: ENOENT (No such file or directory)

    I do have the ibplugins_platforms_android_libqtforandroid.so in the folder where the app is built. I saw some Qt bug report yesterday and some one mentioned they had the black screen and it was due to third party libs. I tried in the configuration to turn all third party libs disabled or use the Qt Bundle , Here is "final Qt Config report at the end of cross compiling. Is there something I am missing? Any ideas about third part libs or why I get this error on Activity start? Thanks

    Final config for Android 64 bit

    Running configure tests...

    Checking for fontconfig... no
    Checking for gccdepends... yes
    Checking for glx... no
    Checking for gnuld... yes
    Checking for icu... no
    Checking for leveldb... no
    Checking for libwebp... no
    Checking for libXcomposite... no
    Checking for libxml2... no
    Checking for libXrender... no
    Checking for libxslt... no
    Checking for libzlib... yes

    Final configuration:

    Build ......................... webkit1 webkit2
    Configuration ................. debug
    All-in-one files .............. no
    GNUmake ....................... yes
    Static libs as shared ......... no
    Static libs as thin archives .. yes
    Production build .............. yes

    Have .......................... qtquick qtprintsupport qstyle qttestlib qtpositioning qtsensors
    Use ........................... tiled_backing_store cross_platform_context_menus zlib 3d_graphics gstreamer native_fullscreen_video leveldb wchar_unicode glib
    Features ...................... fast_mobile_scrolling gesture_events inspector_server legacy_viewport_adaption smooth_scrolling subpixel_layout touch_adjustment view_mode_css_media plugin_architecture_unsupported

    3D Rendering .................. yes
    Accelerated 2D Canvas ......... yes
    Battery Status ................ no
    Blob .......................... yes
    Canvas Path ................... yes
    CanvasProxy ................... no
    Channel Messaging ............. yes
    Content Security Policy 1.1 ... no
    CSS Device Adaptation ......... no
    CSS Exclusions ................ yes
    CSS Shapes .................... yes
    CSS Filters ................... yes
    CSS3 Conditional Rules support (i.e. @supports) no
    CSS3 Text ..................... no
    CSS3 Text Line Break .......... no
    CSS box-decoration-break ...... yes
    CSS image-orientation ......... no
    CSS image-resolution .......... no
    CSS image-set ................. yes
    CSS Regions ................... yes
    CSS Shaders ................... no
    CSS sticky position ........... yes
    CSS Compositing ............... yes
    Support for unprefixed CSS animations and transforms yes
    CSS Variable .................. no
    Custom Scheme Handler ......... no
    Datalist Element .............. yes
    Data Transfer Items ........... no
    Details Element ............... yes
    Device Orientation ............ yes
    Dialog Element ................ no
    Directory Upload .............. no
    Expose DOM4 Events constructors no
    Download Attribute ............ yes
    File System ................... no
    Filters ....................... yes
    Font Load Events .............. no
    FTP Directory ................. yes
    Fullscreen API ................ yes
    Gamepad ....................... no
    Geolocation ................... yes
    High DPI Canvas ............... no
    Icondatabase .................. yes
    Iframe seamless attribute ..... yes
    Indexed Database .............. yes
    Input Speech .................. no
    Input Type Color .............. yes
    Input Type Date ............... no
    Broken Input Type Datetime .... no
    Input Type Datetimelocal ...... no
    Input Type Month .............. no
    Input Type Time ............... no
    Input Type Week ............... no
    Inspector ..................... yes
    JavaScript Debugger ........... yes
    Legacy Notifications .......... yes
    Legacy Vendor Prefix .......... yes
    Legacy Web Audio .............. yes
    Link Prefetch ................. yes
    MathML ........................ no
    Media Capture ................. no
    Media Source .................. no
    Media Statistics .............. no
    Media Stream .................. no
    Meter Element ................. yes
    MHTML ......................... yes
    Microdata ..................... no
    Scaled mouse cursor ........... no
    Navigator Content Utils ....... no
    Netscape Plugin API ........... no
    Network Info .................. no
    Support for 'X-Content-Type-Options: nosniff' no
    Notifications ................. yes
    Orientation Events ............ yes
    Page Visibility API ........... yes
    Performance Timeline .......... no
    Progress Element .............. yes
    Proximity Events .............. no
    Quota ......................... no
    Resolution media query ........ yes
    Resource Timing ............... no
    Request Animation Frame ....... yes
    Seccomp Filter sandbox ........ no
    Scripted Speech ............... no
    Shadow DOM .................... no
    Shared Workers ................ yes
    SQL Database .................. yes
    Style Scoped .................. no
    Suid sandbox for linux ........ no
    SVG ........................... yes
    SVG Fonts ..................... yes
    HTMLTemplateElement ........... no
    Text Autosizing ............... no
    Tiled Backing Store ........... no
    Threaded HTML parser .......... no
    Touch Events .................. yes
    Touch Slider .................. yes
    Touch Icon Loading Support .... no
    User Timing ................... no
    Vibration ..................... no
    Video ......................... yes
    Video Track ................... yes
    WebGL ......................... yes
    Web Audio ..................... no
    Web Sockets ................... yes
    Web Timing .................... yes
    Workers ....................... yes
    XHR Timeout ................... yes
    XSLT .......................... no

    Encountered 2 configuration warning(s):

    ! Qt not configured to use system libjpeg, QImageDecoder will decode JPEG images
    ! Qt not configured to use system libpng, QImageDecoder will decode PNG images



  • @SGaist So I did some more looking around and saw a blog post that explained how to use Android Studio to source level debug the Java Activity part of a Qt app. It seem that in createBundeleBinary methot in QtActivity.java
    it looks for libqtforandroid.so in /data/usr/0/org.qtproject.example/q-reserved-files/plugins/platforms/android and it does not find it there, there is a msg in the code that I never see on the application window

    "This application requires Ministro service. Would you like to install it"
    which makes sense if it does not find the .so . I never specified using Ministro in the kit. Also /data folder is protected and I
    cannot look in it in the adb shell, I suppose unless I root the device which since it is not mine I do not want to do.
    Do you have any idea why this so is not installed even though it is in the Android folder when I build, is this
    a bug in androiddeplyqt? I have the code but was wondering if you know anything about this. I read in some other
    bug reports or discussions that there maybe a bug. Again this happen ONLY on Pixel C , we run fine on other android devices.


  • Lifetime Qt Champion

    That might be something specific to the Pixel C OS setup.

    One thing to check is the properties of your project. IIRC you can select whether you want to use Ministro or embed Qt with your application when deploying.


Log in to reply
 

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