[Interest] QR-Code reading using QZXing crashes Android activity

Michael Heiser | SYSTRONIK Elektronik und Systemtechnik GmbH Heiser at systronik.de
Mon Mar 21 12:37:41 CET 2022

Hello experts,

I'm currently porting my app to Qt6. The App depends on QZXing as QR-Code reading library which is working really good with Qt 5.15.x. With the changes in Qt Multimedia framework (no QAbstractVideoFilter) the guys of QZXing library are using QVideoSink as provider for QVideoFrame. From QVideoFrame the construct QImages for processing the QRCode information.

I'm currently testing this approach with the example provided by QZXing and the example is crashing with this new approach when the current frame from the camera is copied via QImage::copy(srcImageFromVideoFrame, QRect(captureRect)). I narrowed it down with debug outputs to this call:

            if (captureRect.isValid() && frameToProcess.size() != rect.size()) {
                frameToProcess = image.copy(rect);

What could cause the app to crash here? Are there some checks for image format of the source image missing? What can I do get it to work? Any help is appreciated.

Furher information to this problem: https://github.com/ftylitak/qzxing/issues/217

Mit freundlichen Grüßen  |  With best regards

Michael Heiser

Email:   heiser at systronik.de<mailto:heiser at systronik.de>
Web:    www.systronik.com<http://www.systronik.com/>

SYSTRONIK Elektronik u. Systemtechnik GmbH, Gewerbestr. 57, D-88636 Illmensee
Registergericht Ulm - HRB 710423, Sitz der Gesellschaft Illmensee, USt-IdNr. DE 811 264 405
Geschäftsführer: Dipl.-VW Elmar Fritz, Ing. Ramon J. van Tuijl, Dipl.-Ing. (FH) Richard Skoberla

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder die E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und löschen Sie die E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail may contain confidential and / or privileged information. If you are not the intended recipient or the e-mail may contain error, inform you immediately ask the sender and delete the e-mail. Unauthorized copying, unauthorized disclosure of e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220321/037e8e86/attachment.htm>

More information about the Interest mailing list