Category Archives: Operating Systems

QT6 multimedia module crashes on iOS

After several hours of playing sounds my iOS app crashes and the QT Creator displays the following stack trace:

1 caulk::thread::join() (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/caulk.framework/caulk 0x7fff49a06293
2 std::__shared_ptr_emplace<AURemoteIO::IOThread, std::allocator<AURemoteIO::IOThread>>::__on_zero_shared() (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438a7469
3 AURemoteIO::Stop() (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438a58d3
4 ausdk::AUMethodStop(void *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438f3529
5 QDarwinAudioSink::audioDeviceStop() qdarwinaudiosink.mm 619 0x10ffa7afd
6 QDarwinAudioSink::audioDeviceIdle() qdarwinaudiosink.mm 629 0x10ffa7b68
7 QDarwinAudioSink::renderCallback(void *, unsigned int *, AudioTimeStamp const *, unsigned int, unsigned int, AudioBufferList *) qdarwinaudiosink.mm 446 0x10ffa7ab7
8 ausdk::AUInputElement::PullInput(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438f12d2
9 AUInputFormatConverter2::InputProc(OpaqueAudioConverter *, unsigned int *, AudioBufferList *, AudioStreamPacketDescription * *, void *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff4382cf27
10 acv1::AudioConverterChain::CallInputProc(unsigned int) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff30323840
11 acv1::AudioConverterChain::FillBufferFromInputProc(unsigned int *, CADeprecated::CABufferList *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff3032467f
12 acv1::BufferedAudioConverter::GetInputBytes(unsigned int, unsigned int&, CADeprecated::CABufferList const *&) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff3045c7bd
13 acv1::CBRConverter::RenderOutput(CADeprecated::CABufferList *, unsigned int, unsigned int&, AudioStreamPacketDescription *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff303091bc
14 acv1::BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff3045c589
15 acv1::AudioConverterChain::RenderOutput(CADeprecated::CABufferList *, unsigned int, unsigned int&, AudioStreamPacketDescription *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff303235bb
16 acv1::BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff3045c589
17 acv1::_AudioConverterFillComplexBuffer(OpaqueAudioConverter *, int ( *)(OpaqueAudioConverter *, unsigned int *, AudioBufferList *, AudioStreamPacketDescription * *, void *), void *, unsigned int *, AudioBufferList *, AudioStreamPacketDescription *, AudioStreamPacketDependencyInfo *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff30491df6
18 AudioConverterFillComplexBuffer (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AudioToolboxCore.framework/AudioToolboxCore 0x7fff303a3680
19 AUConverterBase::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff4382b617
20 AURemoteIO::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438a4317
21 ausdk::AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438f06a9
22 AURemoteIO::PerformIO(unsigned int, unsigned int, unsigned int, AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const *, AudioBufferList *, unsigned int&) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438af7df
23 _XPerformIO (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438e9817
24 mshMIGPerform (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libAudioToolboxUtility.dylib 0x7fff2e30936a
25 MSHMIGDispatchMessage (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libAudioToolboxUtility.dylib 0x7fff2e309759
26 void * caulk::thread_proxy<std::tuple<caulk::thread::attributes, AURemoteIO::IOThread::IOThread(AURemoteIO&, caulk::thread::attributes const&, caulk::mach::os_workgroup const&)::'lambda'(), std::tuple<>>>(void *) (x86_64) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/libEmbeddedSystemAUs.dylib 0x7fff438a7200
27 _pthread_start (x86_64) /usr/lib/system/libsystem_pthread.dylib 0x7fff6da2b8fc
28 thread_start (x86_64) /usr/lib/system/libsystem_pthread.dylib 0x7fff6da27443
(more…)

What is the difference between -nativeScale and -scale on UIScreen in iOS

Found the answer on stackoverflow.com and installed iPhone 6 Plus simulator:

(more…)

Building QT6.4 on Windows for Android with OpenSSL and clang 14

Installed latest NDK:

(more…)

Building QT6.4 on Windows for Android with OpenSSL and clang 12

My mistake was that while building QT6.4 on Windows for Android I tried to set OPENSSL_ROOT_DIR as an environment variable that doesn’t take an effect. Now I set it as an argument:

C:\dev\build\qta
  
set "CMAKE_ROOT=C:\dev\PFiles\cmake-3.24.2-windows-x86_64\bin"
set "NINJA_ROOT=C:\dev\PFiles\ninja-win"
set "PERL_ROOT=C:\dev\PFiles\Strawberry\perl\bin"
set "MINGW_ROOT=C:\dev\PFiles\x86_64-12.2.0-release-win32-seh-rt_v10-rev0\mingw64\bin"
set "PYTHON_ROOT=C:\dev\PFiles\Python35"
set "JDK_ROOT=C:\dev\libs\jdk-19\bin"
          
set PATH=C:\WINDOWS\system32;C:\WINDOWS
set PATH=%CMAKE_ROOT%;%PATH%
set PATH=%NINJA_ROOT%;%PATH%
set PATH=%MINGW_ROOT%;%PATH%
set PATH=%PERL_ROOT%;%PATH%
set PATH=%PYTHON_ROOT%;%PATH%
set PATH=%JDK_ROOT%;%PATH%  

(more…)

My attempt to build OpenSSL for Android on Windows

I tried to build OpenSSL for Android with the following commands in Windows Command Prompt:

cd C:\dev\repos\openssl-1.1.1r

set MY_NDK_DIR=C:\Users\dmitr\AppData\Local\Android\Sdk\ndk\23.1.7779620

set MY_CLANG_DIR=%MY_NDK_DIR%\toolchains\llvm\prebuilt\windows-x86_64\bin
set MY_CMAKE=%MY_NDK_DIR%\prebuilt\windows-x86_64\bin\make.exe
set MY_PERL_DIR=C:\dev\PFiles\Strawberry\perl\bin

set PATH=%MY_CLANG_DIR%;%MY_PERL_DIR%;%PATH%

set "MY_ANDROID_BUILD_ABI=x86_64"
rem set "MY_ANDROID_BUILD_ABI=x86"
rem set "MY_ANDROID_BUILD_ABI=arm64"
rem set "MY_ANDROID_BUILD_ABI=arm"

set MY_INSTALL_ROOT_DIR=C:/dev/libs/OpenSSL-android
set MY_INSTALL_DIR=%MY_INSTALL_ROOT_DIR%/%MY_ANDROID_BUILD_ABI%

set ANDROID_NDK_HOME=%MY_NDK_DIR%

# Set compiler clang, instead of gcc by default
set CC=clang

perl Configure android-%MY_ANDROID_BUILD_ABI% -D__ANDROID_API__=23 --prefix="%MY_INSTALL_DIR%" --openssldir="%MY_INSTALL_DIR%" no-shared
(more…)

Building QT6.4 on Windows for Android

I installed Android Studio and pressed two buttons in QT Creator:

(more…)

OpenVPN in a Docker container

Run a docker container:

export MY_IP=$(curl -s https://api.ipify.org)

sudo docker run -it --rm --cap-add=NET_ADMIN -p 1194:1194/udp -e HOST_ADDR=$MY_IP --name dockovpn alekslitvinenk/openvpn

or

sudo docker run -it --rm --cap-add=NET_ADMIN -p 1194:1194/udp -e HOST_ADDR=$MY_IP --name dockovpn alekslitvinenk/openvpn -v openvpn_conf:/opt/Dockovpn_data

to persist generated files in volume storage.

Type Ctrl+P then Ctrl+Q to turn interactive mode to daemon mode.

Determine its IP address:

sudo docker ps
sudo docker inspect dockovpn | grep IPAddress
(more…)

Building QT6.4 with OpenSSL for Windows – iteration #2

Install build tools, build OpenSSL as described in my previous post, extract QT sources with Bash:

tar -xf ../distrib/qt-everywhere-src-6.4.0.tar.xz

Configure QT as follows:

cd C:\dev\build\qt
 
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64
     
set "CMAKE_ROOT=C:\dev\PFiles\cmake-3.24.2-windows-x86_64\bin"
set "NINJA_ROOT=C:\dev\PFiles\ninja-win"
set "PERL_ROOT=C:\dev\PFiles\Strawberry\perl\bin"
     
set PATH=%CMAKE_ROOT%;%PATH%
set PATH=%NINJA_ROOT%;%PATH%
set PATH=%PERL_ROOT%;%PATH%
set PATH=C:\dev\PFiles\Python35;%PATH%
     
rem Check if the tools are in PATH
where perl.exe
where python.exe
where cmake.exe
where ninja.exe
     
set MY_INSTALL_PATH=C:/dev/libs/Qt6.4/windows
set MY_QT_SRC_DIR=C:\dev\repos\qt-everywhere-src-6.4.0
set CL=/MP
   
%MY_QT_SRC_DIR%\configure.bat -prefix %MY_INSTALL_PATH% -DQT_NO_EXCEPTIONS=1 -debug-and-release -force-debug-info -platform win32-msvc -opensource -confirm-license ^
  -c++std c++20 -static -static-runtime -I "C:/Program Files/OpenSSL/include" -L "C:/Program Files/OpenSSL/lib" -openssl-linked ^
  -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity ^
  -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua ^
  -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects ^
  -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland ^
  -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qthttpserver
(more…)

Running my app with QT6.4 on iOS

I built QT6.4 for iOS and added it to QT creator:

(more…)

Building QT6.4 for iOS

I built QT6.4. for MacOS first and then configured QT6.4 release build for iOS as follows:

export LC_ALL=en_US.UTF-8  
export LANG=en_US.UTF-8
cd ~/build/qt
export MY_QT_SRC_DIR=~/repos/qt-everywhere-src-6.4.0
export MY_HOST_PATH=~/libs/QT6.4/MacOs
export MY_INSTALL_PATH=~/libs/QT6.4/iOs
export MY_MODE=release

${MY_QT_SRC_DIR}/configure -prefix $MY_INSTALL_PATH -qt-host-path $MY_HOST_PATH \
  -platform macx-ios-clang -c++std c++20 -opensource -confirm-license \
  -static -static-runtime -$MY_MODE -force-debug-info \
  -no-openssl -securetransport -DQT_NO_EXCEPTIONS=1 \
  -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity \
  -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua \
  -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects \
  -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland \
  -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qtlocation \
  -skip qthttpserver
(more…)