OverviewFelgo 2 Support (Qt 5) › QZXing android crash felgo

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #21701




    I updated to the latest version of felgo, and now my app crashes only in Android!

    In the app i use QZXing the latest version (to scan a QR code) and somehow the android version crashes,

    it get’s stuck on processing the first frame, and keeps on processing.
    I test on a Samsung S9 device with the latest updates.

    Can someone help me out please, i was trying to get the app in the appstore






        // item for scanner, allows to show / remove camera live capturing as needed
        Item {
            anchors.fill: parent
            // initialize capture zone size
            Component.onCompleted: {
                captureZone.width = Qt.binding(function() { return videoOutput.contentRect.width / 2 })
                captureZone.height = Qt.binding(function() { return videoOutput.contentRect.height / 2 })
            // Camera
            Camera {
                focus {
                    focusMode: CameraFocus.FocusContinuous
                    focusPointMode: CameraFocus.FocusPointAuto
                onCameraStateChanged: {
                    console.log("camera state:", camera.cameraState)
            // Live Video Output
            VideoOutput {
                id: videoOutput
                source: camera
                anchors.fill: parent
                autoOrientation: true
                fillMode: VideoOutput.PreserveAspectCrop
                filters: [ zxingFilter ]
                MouseArea {
                    anchors.fill: parent
                    onClicked: {
                        camera.focus.customFocusPoint = Qt.point(mouse.x / width,  mouse.y / height);
                        camera.focus.focusMode = CameraFocus.FocusMacro;
                        camera.focus.focusPointMode = CameraFocus.FocusPointCustom;
            // Barcode Scanner Video Filter
            QZXingFilter {
                id: zxingFilter
                active: false
                // setup capture area
                captureRect: {
                    return videoOutput.mapRectToSource(videoOutput.mapNormalizedRectToItem(Qt.rect(0.25, 0.25, 0.5, 0.5)));
                // set up decoder
                decoder {
                    enabledDecoders: QZXing.DecoderFormat_QR_CODE
                    onTagFound: {
                        console.log(tag + " | " + decoder.foundedFormat() + " | " + decoder.charSet());
                   = false
                    tryHarder: false
            } //-- filter
        } // QR Scanner Item




    i used the code from the QtWS2017 pp, but i did not tried the QZXing version used in that felgo app.

    i did use the latest version of the QZXing project



    ok i managed to get what causes the problem, std::throw crashes the android app.

    i am trying to get rid of all the exceptions and try to debug further.


    Felgo Team

    Hi Bas,

    exactly, the guys from QZXing are using C++ exceptions to control their program flow, which causes issues with the current SSL version used with Qt 5.12.3.

    There is also a bugreport related to the SSL version used:

    We are currently looking for a fix as well. It would be great if you can keep us updated on your findings here as well 🙂




    hi Alex,

    will do of course!





    could it be possible to include different .pri projects for different build kits?

    so let’s say i want for ios and macx include(project-a.pri)

    and for android include(project-b.pri)


    I tried it in my pro file but it includes all pri projects in the main project.


    Any suggestions?





    Felgo Team

    Hi Bas,

    you should be able to use e.g. “android:” modifiers like done in all pro files of our examples, to also add/skip includes for certain platforms.




    ok thanx, i was not shure it would work because QT editor includes both projects.

Viewing 9 posts - 1 through 9 (of 9 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support