monich / sailfish-barcode

Barcode reader for Sailfish OS.
https://openrepos.net/content/slava/barcode
13 stars 12 forks source link

App crash click on button Contact Card #36

Closed pherjung closed 2 years ago

pherjung commented 2 years ago

Once BarCode recognized the QR-Code as VCARD, a button Contact Card is available. Clicking on it make the application to stop. Some log:

[D] unknown:0 - Using Wayland-EGL
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
[D] onMustShowViewFinderChanged:205 - creating viewfinder ...
[D] onCameraActiveChanged:160 - camera has started
[W] unknown:0 - QConnmanTechnologyInterface::scanReply() "No carrier"
[D] onStatusChanged:219 - Page is INACTIVE
[D] destroyViewFinder:81 - destroying viewfinder ...
Terminated
monich commented 2 years ago

Does that happen with any contact card or a particular one?

pherjung commented 2 years ago

It happened with 2 different contacts. Here they are with anonymous data:

MECARD:N:Test  TestLastName;ORG:Test bla bla;TEL:+41 73 123 12 12;EMAIL:test.test@test.dd;TIL:Lorem Ipsum;;

And this one:

BEGIN:VCARD
VERSION:3.0
N:Mustername;Test;;;
FN:Test Mustername
NICKNAME:Test
TEL;TYPE=WORK;TYPE=PREF:+4161231212
TEL;TYPE=CELL:+41741231212
EMAIL;TYPE=PREF;TYPE=HOME:test@gmail.kk
EMAIL;TYPE=HOME:test@ha.kk
EMAIL;TYPE=WORK:test.test@test.gg
EMAIL;TYPE=HOME:test.test@gmail.com
X-SAMSUNGADR:;;70 Musterstrasse;Muster;;9008;Switzerland;Musterstrasse 70\nMuster 9008\nSwitzerland
ADR;TYPE=PREF;TYPE=HOME:;;70 Musterstrasse;Muster;;9008;Switzerland
URL:www.test.gg
BDAY:1979-07-29
END:VCARD
monich commented 2 years ago

Yes, I was able to reproduce the crash with a 64-bit build. It appears that any vcard crashes it. But strangely, 32-bit one works (and that's the one I was primarily using for debugging and development). I'll take a look.

pherjung commented 2 years ago

Oh my bad. I totally forgot to mention those important information. Sorry again.

monich commented 2 years ago

The app dies somewhere deep in the guts of Qt QML runtime trying to instantiate a system contact card viewer component.

Perhaps I should write a contact card viewer of my own. The one provided by the system won't be functional in a sandbox anyway. Not to mention it's never been intended to be used by 3-rd party apps.

monich commented 2 years ago

Release 1.0.48 replaces system contact UI with a builtin viewer. The crash should be gone now.