(Steps Person B:) Rotate your phone: change the screen mode to landscape. You make a video call. Now Person A can see Person B. Then Person B shares the screen.
Result: Jami (Windows 10, Person A) crashes, the version of android keeps going on.
Elyschanged title from Jami (Windows 10): Crash if another person displays content in landscape (horizontal) mode to Jami (Windows 10): Crash if another person displays own screen in landscape (horizontal) mode
changed title from Jami (Windows 10): Crash if another person displays content in landscape (horizontal) mode to Jami (Windows 10): Crash if another person displays own screen in landscape (horizontal) mode
Person B makes a video call using portrait mode. No issues.
Person B starts to share the screen. Now if Person B rotates the screen, Person A (using Windows 10) can see the screen of Person B BUT in portrait mode.
Now person B switches to another camera multiple times and rotates the smartphone to landscape mode. BUT: As soon as person B start to share the screen (landscape mode) Jami (Windows 10, Person B) freezes and crashes.
Elyschanged title from Jami (Windows 10): Crash if another person displays own screen in landscape (horizontal) mode to Jami (Windows 10): Crash if another person displays own [Android]screen in landscape (horizontal) mode
changed title from Jami (Windows 10): Crash if another person displays own screen in landscape (horizontal) mode to Jami (Windows 10): Crash if another person displays own [Android]screen in landscape (horizontal) mode
Just tried again: (newest beta version of Jami Android and Windows Jami 202109211812) same result: Person B (Android user) starts a video call (portrait mode): Jami,Windows 10: Person A can see Person B Person B rotates the phone: Now Person A can see Person B in landscape (horizontal) mode Now Person B starts to share the screen: Person A: Jami crashes
Running Jami on Widows 10 Virtual Machine (hosted on Ubuntu 20.04 using VirtualBox v6.1) has revealed some issues not seen on native machines or reported by users.
The issues include crashes similar to the ones reported here, however on VMs the issue is more severe. Jami crashes by simply opening the video settings. Same thing if we try to make video call:
[Inline Frame] Jami.exe!std::_Check_C_return(int _Res) Line 131 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xthreads.h(131)[Inline Frame] Jami.exe!std::_Mutex_base::lock() Line 51 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\mutex(51)[Inline Frame] Jami.exe!std::lock_guard<std::mutex>::{ctor}(std::mutex & _Mtx) Line 438 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\mutex(438)Jami.exe!lrc::api::AVModel::getRenderer(const QString & id) Line 539 at C:\wdir\jami-win\lrc\src\avmodel.cpp(539)Jami.exe!FrameWrapper::startRendering() Line 54 at C:\wdir\jami-win\client-qt\src\rendermanager.cpp(54)Jami.exe!RenderManager::addDistantRenderer(const QString & id) Line 239 at C:\wdir\jami-win\client-qt\src\rendermanager.cpp(239)Jami.exe!VideoDevices::startDevice(const QString & deviceId, bool force) Line 299 at C:\wdir\jami-win\client-qt\src\videodevices.cpp(299)Jami.exe!VideoDevices::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 628 at C:\wdir\jami-win\client-qt\build\jami-qt_autogen\include_Release\UVLADIE3JM\moc_videodevices.cpp(628)Jami.exe!VideoDevices::qt_metacall(QMetaObject::Call _c, int _id, void * * _a) Line 775 at C:\wdir\jami-win\client-qt\build\jami-qt_autogen\include_Release\UVLADIE3JM\moc_videodevices.cpp(775)[External Code]Jami.exe!main(int argc, char * * argv) Line 117 at C:\wdir\jami-win\client-qt\src\main.cpp(117)Jami.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97 at C:\Users\qt\work\qt\qtbase\src\entrypoint\qtentrypoint_win.cpp(97)[External Code]
After patching AVModel to prevent access to AVModelPimpl::renderers_ if it's empty, I was able to make a video call (in/out) but still get similar crash on hangup, but in AVModel::removeRenderer():
[Inline Frame] Jami.exe!std::_Check_C_return(int _Res) Line 131 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xthreads.h(131)[Inline Frame] Jami.exe!std::_Mutex_base::lock() Line 51 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\mutex(51)[Inline Frame] Jami.exe!std::lock_guard<std::mutex>::{ctor}(std::mutex &) Line 438 at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\mutex(438)Jami.exe!lrc::AVModelPimpl::removeRenderer(const QString & id) Line 890 at C:\wdir\jami-win\lrc\src\avmodel.cpp(890)[External Code]Jami.exe!lrc::CallbacksHandler::stoppedDecoding(const QString & _t1, const QString & _t2) Line 1263 at C:\wdir\jami-win\lrc\build\ringclient_static_autogen\include_Release\UVLADIE3JM\moc_callbackshandler.cpp(1263)[External Code]Jami.exe!main(int argc, char * * argv) Line 117 at C:\wdir\jami-win\client-qt\src\main.cpp(117)Jami.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97 at C:\Users\qt\work\qt\qtbase\src\entrypoint\qtentrypoint_win.cpp(97)[External Code]
Not clear yet if the crashes seen on VM and native machines are the same
Another backtrace on windows (HW decoding disabled):
[Inline Frame] Jami.exe!std::_Deallocate(void * _Ptr, unsigned __int64 _Bytes) Line 221 C++ [Inline Frame] Jami.exe!std::allocator<unsigned char>::deallocate(unsigned char * const) Line 810 C++ [Inline Frame] Jami.exe!std::vector<unsigned char,std::allocator<unsigned char>>::_Tidy() Line 1696 C++ [Inline Frame] Jami.exe!std::vector<unsigned char,std::allocator<unsigned char>>::{dtor}() Line 673 C++ Jami.exe!lrc::api::video::Renderer::currentFrame() Line 163 C++ Jami.exe!FrameWrapper::slotFrameUpdated(const QString & id) Line 141 C++ [External Code] [Inline Frame] Jami.exe!lrc::api::AVModel::frameUpdated(const QString &) Line 344 C++ Jami.exe!lrc::AVModelPimpl::slotFrameUpdated(const QString & id) Line 969 C++ [External Code] Jami.exe!main(int argc, char * * argv) Line 129 C++ Jami.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97 C++
Inline Frame] Jami.exe!std::_Deallocate(void * _Ptr, unsigned __int64 _Bytes) Line 221 C++ [Inline Frame] Jami.exe!std::allocator<unsigned char>::deallocate(unsigned char * const) Line 810 C++ [Inline Frame] Jami.exe!std::vector<unsigned char,std::allocator<unsigned char>>::_Tidy() Line 1696 C++ [Inline Frame] Jami.exe!std::vector<unsigned char,std::allocator<unsigned char>>::{dtor}() Line 673 C++ [Inline Frame] Jami.exe!std::default_delete<DRing::FrameBuffer>::operator()(DRing::FrameBuffer *) Line 2537 C++ Jami.exe!std::unique_ptr<DRing::FrameBuffer,std::default_delete<DRing::FrameBuffer>>::~unique_ptr<DRing::FrameBuffer,std::default_delete<DRing::FrameBuffer>>() Line 2647 C++ Jami.exe!Video::DirectRendererPrivate::onNewFrame(std::unique_ptr<DRing::FrameBuffer,std::default_delete<DRing::FrameBuffer>> buf) Line 147 C++ [External Code] [Inline Frame] Jami.exe!std::_Func_class<void,std::unique_ptr<DRing::FrameBuffer,std::default_delete<DRing::FrameBuffer>>>::operator()(std::unique_ptr<DRing::FrameBuffer,std::default_delete<DRing::FrameBuffer>>) Line 995 C++ Jami.exe!jami::video::SinkClient::update(jami::Observable<std::shared_ptr<DRing::MediaFrame>> * __formal, const std::shared_ptr<DRing::MediaFrame> & frame_p) Line 457 C++ Jami.exe!jami::Observable<std::shared_ptr<DRing::MediaFrame>>::notify(std::shared_ptr<DRing::MediaFrame> data) Line 137 C++ Jami.exe!jami::video::VideoGenerator::publishFrame(std::shared_ptr<DRing::VideoFrame> frame) Line 56 C++ [External Code] [Inline Frame] Jami.exe!std::_Func_class<void,std::shared_ptr<DRing::MediaFrame> &&>::operator()(std::shared_ptr<DRing::MediaFrame> &&) Line 995 C++ Jami.exe!jami::MediaDecoder::decode(AVPacket & packet) Line 669 C++ [Inline Frame] Jami.exe!std::_Func_class<enum jami::DecodeStatus,AVPacket &>::operator()(AVPacket &) Line 995 C++ Jami.exe!jami::MediaDemuxer::decode() Line 386 C++ Jami.exe!jami::MediaDecoder::decode() Line 684 C++ Jami.exe!jami::video::VideoReceiveThread::decodeFrame() Line 175 C++ [Inline Frame] Jami.exe!std::_Func_class<void>::operator()() Line 995 C++ Jami.exe!jami::ThreadLoop::mainloop(std::thread::id & tid, const std::function<bool __cdecl(void)> setup, const std::function<void __cdecl(void)> process, const std::function<void __cdecl(void)> cleanup) Line 38 C++
Got this when opening the media settings on a fresh install of the Windows client after a deployment test:
Can't find renderer camera://video=@device_pnp_\\?\usb#vid_046d&pid_0825&mi_00#6&2be052f&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}Couldn't start rendering for id: "camera://video=@device_pnp_\\\\?\\usb#vid_046d&pid_0825&mi_00#6&2be052f&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}"Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.Texture 0x1e79a69ad10 () used with different accesses within the same pass, this is not allowed.
followed by a crash:
00007ffb50004f69() Unknown 00007ffb493a6220() Unknown 00007ffac4f03966() Unknown 00007ffac4f03909() Unknown> [Inline Frame] std::_Check_C_return(int _Res) Line 131 C++ [Inline Frame] std::_Mutex_base::lock() Line 51 C++ [Inline Frame] std::lock_guard<std::mutex>::{ctor}(std::mutex & _Mtx) Line 429 C++ lrc::api::AVModel::getRenderer(const QString & id) Line 541 C++ FrameWrapper::startRendering() Line 54 C++ RenderManager::addDistantRenderer(const QString & id) Line 239 C++ VideoDevices::startDevice(const QString & deviceId, bool force) Line 300 C++ VideoDevices::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 628 C++ VideoDevices::qt_metacall(QMetaObject::Call _c, int _id, void * * _a) Line 775 C++ [External Code] main(int argc, char * * argv) Line 121 C++ WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97 C++ [External Code]
This may be a separate issue, but I'm logging this here, as I'm testing to produce the crash related to this issue.
As seen with @mchibani1, the logs:
Can't find renderer camera ...Couldn't start rendering ...Updates can only be scheduled from GUI thread or from QQuickItem::updatePaintNode()Texture ... () used with different accesses within the same pass, this is not allowed.
are on master seem indicative of a dysfunctional architecture. Now I'm not sure if this was introduced with the Qt6
migration, but there's obviously something seriously wrong here. As discussed, I will propose some intermediate changes to JLC and client-qt.