[Interest] OSX security – allow dialogue

Volker Hilsheimer volker.hilsheimer at qt.io
Sat Oct 9 22:38:36 CEST 2021


Hi Alexander,

Fascinating. I can reproduce this. Starting from Terminal doesn’t crash (no matter whether with ‘open’ or the binary inside the bundle directly), starting camera.app via Finder does. Starting the camera binary inside the camera.app bundle via Finder does not crash, it asks for permission and if rejected nothing special happens (no video, obviously, also no crash).

The multimedia/declarative-camera example however does start correctly in all cases. It doesn’t ask for microphone access, which the multimediawidgets/camera example does when launched from Terminal.

The stack trace I get with the widgets example goes to

12  com.apple.avfoundation        	0x00007fff30bbe7a5 -[AVCaptureSession addInput:] + 71
13  org.qt-project.QtMultimedia   	0x000000010ec99f00 AVFCameraSession::attachAudioInputDevice() + 176
14  org.qt-project.QtMultimedia   	0x000000010ec9a190 AVFCameraSession::updateAudioInput() + 128 (avfcamerasession.mm:487)
15  org.qt-project.QtMultimedia   	0x000000010ec97dd0 AVFCameraService::setAudioInput(QPlatformAudioInput*) + 624 (avfcameraservice.mm:146)
16  org.qt-project.QtMultimedia   	0x000000010ec65c98 QMediaCaptureSession::setAudioInput(QAudioInput*) + 56 (qmediacapturesession.cpp:204)

before disappearing into com.apple.Foundation. Perhaps that helps us figure out what’s going on.

From those observations I’d either way think that things should work as you expect them to (ie. nothing special needs to be done to trigger those permission dialogs).

Filed a JIRA ticket at

https://bugreports.qt.io/browse/QTBUG-97408


Thanks,
Volker



> On 9 Oct 2021, at 22:08, Alexander Carôt <alexander_carot at gmx.net> wrote:
> 
> P.S.: see below – in that regard I compiled the camera example (Qt6.2) and ran it via clicking on the app icon (rather than running it from the console which per se has cam access). Also here it did not ask for allowing cam access and then the app crashed. Can anyone reconstruct this ?
> 
> 
> --
> http://www.carot.de
> Email : Alexander at Carot.de
> Tel.: +49 (0)177 5719797
> 
> 
>> Gesendet: Samstag, 09. Oktober 2021 um 11:47 Uhr
>> Von: "Alexander Carôt" <alexander_carot at gmx.net>
>> An: "qt qt" <interest at qt-project.org>
>> Betreff: [Interest] OSX security – allow dialogue
>> 
>> Hej all,
>> 
>> not sure if this is a bug on my end, a bug in Qt or even a bug in OSX:
>> 
>> When I deploy a new release of my software (which uses audio and video capture) after installation on a user's machine it asks for  permissions to access the mic and the camera. When not enabled sound capture does not work and video even crashes – when enabled all is fine. So this dialogue is really important to the user. 
>> 
>> However, in some cases the new deployed version does not ask this question anymore and as a result the user manually has to change the security settings. Otherwise they stick to the previous version.
>> 
>> For some reason I discover this again after deploying with the new Qt6.2 but (as written above) I don't know if it's related.
>> 
>> Can anyone help in this regard ? Any hint appreciated because for almost one year I am really confused about this. Maybe there is a way to force the OS to enable this dialogue ?!
>> 
>> Thanks a lot in advance,
>> best
>> 
>> Alex
>> 
>> --
>> http://www.carot.de
>> Email : Alexander at Carot.de
>> Tel.: +49 (0)177 5719797
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
>> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest



More information about the Interest mailing list