Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

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

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

    Bas

    hi,

     

    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

     

    thanx,

    Bas

     

    #21702

    Bas
        // 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 {
                id: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: {
                    videoOutput.contentRect;
                    videoOutput.sourceRect;
                    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());
                            zxingFilter.active = false
                    }
                    tryHarder: false
                }
            } //-- filter
    
        } // QR Scanner Item
    

     

    #21703

    Bas

    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

    #21707

    Bas

    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.

    #21709

    Alex
    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: https://bugreports.qt.io/browse/QTBUG-71391

    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 🙂

    Cheers,
    Alex

    #21710

    Bas

    hi Alex,

    will do of course!

    greetz,

    Bas

    #21722

    Bas

    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?

     

    thanx,

    Bas

    #21735

    Alex
    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.

    Cheers,
    Alex

    #21737

    Bas

    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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded