https://bugs.kde.org/show_bug.cgi?id=403289
Bug ID: 403289 Summary: MediaPlayer1 interface is NULL after changing audio player on BT source Product: frameworks-bluez-qt Version: 5.54.0 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: now...@gmail.com Reporter: snehal....@gmail.com Target Milestone: --- Setup: I am using bluez-qt package in isolation to develop a bluetooth a2dp sink application. I am not using any other packages from kde frameworks. I can reproduce the bug on my system, but I do not have the setup to reproduce the bug on a KDE platform. Below are the steps I THINK should trigger the bug. Please note that only audio sink application using bluez-qt API will trigger this bug. STEPS TO REPRODUCE 1. Establish the bluetooth connection between audio source (e.g. smartphone) and audio sink (e.g. PC can be configured as sink). 2. Start a audio playback on smartphone and audio should start playing on the sink. MediaPlayer name (typically the app playing the audio on smartphone) and track information will be visible on the audio sink application. This will be done through BluezQt::MediaPlayer signals. 3. On source switch to a different audio playback application. Audio streaming will continue but MediaPlayer control and track information will not available on the audio sink application. OBSERVED RESULT Audio streaming will continue but MediaPlayer control and track information will not available on the audio sink application. This is because BluezQt::Devie::MediaPlayerPtr mediaplayer is NULL. EXPECTED RESULT BluezQt::Devie::MediaPlayerPtr mediaplayer should point to new interface created after switching the audio app on source. ADDITIONAL INFORMATION I have checkout the github repo and analysed the bug. Object path .../PlayerX is not checked before removing MediaPlayer1 interface. BluezQt only saves most recently added object /playerX. But while removing MediaPlayer1 interface object path is not checked which could lead to accidental removal a valid interface. This can happen when events 'interfacesAdded' and 'interfacesRemoved' arrive in different order. Consider scenario: player0:interfacesAdded -> player1:interfacesAdded -> player0:interfacesRemoved. In this scenario MediaPlayer1 interface of player1 will be removed if object path is not checked. -- You are receiving this mail because: You are watching all bug changes.