tlk / beoplay-macos-remote-gui

Remote control B&O Beoplay loudspeakers from macOS
MIT License
16 stars 1 forks source link

Connecting to Beosound Moment causes high CPU usage #26

Closed tlk closed 3 years ago

tlk commented 3 years ago

From beoworld.org:

controlling a Moment with the app triggers high CPU usage on the Mac and the app must closed to recover.

mbolo01 commented 3 years ago

Bonjour Thomas - Unfortunately the issue with the Moment persists:

screenshot_193
tlk commented 3 years ago

Bonjour Jérôme, peeking at the screenshot - just wanted to double check - are you sure you tested the latest code and not an existing long-running process? Just hoping that could be it, as I noticed the string "4 : " in the process line :)

mbolo01 commented 3 years ago

Very strange indeed as I made sure the one I use (compiled) was not running prior to launch the latest code via Xproj. An I think you also renamed it "B&O" in the Mac status bar, correct? That said I relaunched it and same happens. You can see the Processing time is more consistent.


De : Thomas L. Kjeldsen notifications@github.com Envoyé : mercredi 23 septembre 2020 17:36 À : tlk/beoplay-macos-remote-gui beoplay-macos-remote-gui@noreply.github.com Cc : mbolo01 mbolo01@hotmail.fr; Comment comment@noreply.github.com Objet : Re: [tlk/beoplay-macos-remote-gui] Connecting to Beosound Moment causes high CPU usage (#26)

Bonjour Jérôme, peeking at the screenshot - just wanted to double check - are you sure you tested the latest code and not an existing long-running process? Just hoping that could be it, as I noticed the string "4 : " in the process line :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/tlk/beoplay-macos-remote-gui/issues/26#issuecomment-697556889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANXLJNZENV765JROLB2VJWTSHIIZNANCNFSM4RXDIBFQ.

Carolpa commented 3 years ago

If you see B&o it is your own changed build. But I changed the files and rebuilt it. Still the memory does as show in your picture.

Same issue with Beolink ML/NL converter, Beovision 11, Beovision Horizon

mbolo01 commented 3 years ago

I may have reached my limits in the dev world :-) (I'm not a dev, that's why) I downloaded the project with the most recent code Placed the folder on my desktop (my compiled version package is in the Applications folder) Click on the .xcodeproj file which launched Xcode Package dependencies have been successfully downloaded I run the project which fails on the Developper Team name that I correct by adding my name from the drop down box Run the project again which displays B&O in the status bar Looking for B&O in the latest project ...... I indeed don't find it ! Where is it then ???? How can I be sure I run the latest code? In the past I have alway been doing this way, downloading new projects when there was a code change and I could see the expected changes, so I'm assuming I'm using the latest code here too, even if it uses something I changed a while ago.

Carolpa commented 3 years ago

Hoi,

See picture. Choose BeoplayRemoteGUI on the left. Click the small arrow on the right. There you’ll find the latest build

mbolo01 commented 3 years ago

Hoi, See picture. Choose BeoplayRemoteGUI on the left. Click the small arrow on the right. There you’ll find the latest build

Hi -I don't see the picture, I had the same issue when answering by email where images don't seem to go through, while answering via Github permits adding pictures.

Carolpa commented 3 years ago

Image 23-09-2020 at 19 08

mbolo01 commented 3 years ago

So what I have here is what is linked to the project I downloaded from Github. I even emptied it to be sure fresh data is created .... the B&O name subsist.

screenshot_195
Carolpa commented 3 years ago

that must be the one

tlk commented 3 years ago

@mbolo01 The app may pick up the "B&O" string from the app.title config value.

Would you be able to share a pcap or a screenshot of what data is passed over TCP/IP between the client and the Moment device? It would also be interesting to have a look at what is going over the wire when remote controlled by something that works (e.g. the iOS app).

tlk commented 3 years ago

If the project builds and runs in Xcode it should also be possible to open a terminal and run make clean install to compile the app and install it into /Applications. I find it easier than navigating the Xcode UI.

Carolpa commented 3 years ago

2020-09-23 19:37:21.650510+0200 BeoplayRemoteGUI[75117:447461] hotkeys.VolumeStep: 4 2020-09-23 19:37:21.651651+0200 BeoplayRemoteGUI[75117:447461] hotkeys.NextDevice: F2 2020-09-23 19:37:21.651906+0200 BeoplayRemoteGUI[75117:447461] hotkeys.Leave: F3 2020-09-23 19:37:21.652004+0200 BeoplayRemoteGUI[75117:447461] hotkeys.PrevSource: F5 2020-09-23 19:37:21.652095+0200 BeoplayRemoteGUI[75117:447461] hotkeys.NextSource: F6 2020-09-23 19:37:21.652190+0200 BeoplayRemoteGUI[75117:447461] hotkeys.Back: F7 2020-09-23 19:37:21.652273+0200 BeoplayRemoteGUI[75117:447461] hotkeys.TogglePlayPause: F8 2020-09-23 19:37:21.652366+0200 BeoplayRemoteGUI[75117:447461] hotkeys.Join: F4 2020-09-23 19:37:21.652636+0200 BeoplayRemoteGUI[75117:447461] hotkeys.Next: F9 2020-09-23 19:37:21.652742+0200 BeoplayRemoteGUI[75117:447461] hotkeys.VolumeDown: F11 2020-09-23 19:37:21.652826+0200 BeoplayRemoteGUI[75117:447461] hotkeys.PrevDevice: F1 2020-09-23 19:37:21.652901+0200 BeoplayRemoteGUI[75117:447461] hotkeys.ToggleMute: F10 2020-09-23 19:37:21.652975+0200 BeoplayRemoteGUI[75117:447461] hotkeys.VolumeUp: F12 2020-09-23 19:37:21.657165+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoPlay M3 garden, moreComing: true 2020-09-23 19:37:21.657292+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoSound Moment, moreComing: true 2020-09-23 19:37:21.657638+0200 BeoplayRemoteGUI[75117:448128] didFind: Beoplay M3 wc, moreComing: true 2020-09-23 19:37:21.657808+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoVision Horizon-40, moreComing: true 2020-09-23 19:37:21.657940+0200 BeoplayRemoteGUI[75117:448128] didFind: BV 11-46, moreComing: true 2020-09-23 19:37:21.658114+0200 BeoplayRemoteGUI[75117:448128] didFind: BS7000 BLC, moreComing: true 2020-09-23 19:37:21.658217+0200 Beopla2020-09-23 19:37:21.720834+0200 BeoplayRemoteGUI[75117:447461] Hotkeys enabled yRemoteGUI[75117:448128] didFind: BS Essence - Bath, moreComing: true 2020-09-23 19:37:21.724182+0200 BeoplayRemoteGUI[75117:448128] didFind: BS Essence - Bed, moreComing: true 2020-09-23 19:37:21.724278+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoPlay A6, moreComing: true 2020-09-23 19:37:21.724404+0200 BeoplayRemoteGUI[75117:448128] didFind: BS9000 BLC, moreComing: true 2020-09-23 19:37:21.724554+0200 BeoplayRemoteGUI[75117:448128] didFind: BS3000 BLC, moreComing: true 2020-09-23 19:37:21.724791+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoSound 35, moreComing: true 2020-09-23 19:37:21.724870+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoSound Shape, moreComing: true 2020-09-23 19:37:21.725239+0200 BeoplayRemoteGUI[75117:448128] didFind: BeoVision Harmony, moreComing: false 2020-09-23 19:37:21.725756+0200 BeoplayRemoteGUI[75117:448128] pending updates: 14 2020-09-23 19:37:21.730597+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoPlay M3 garden 2020-09-23 19:37:21.731961+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoSound Moment 2020-09-23 19:37:21.734703+0200 BeoplayRemoteGUI[75117:447461] addDevice: Beoplay M3 wc 2020-09-23 19:37:21.736207+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoVision Horizon-40 2020-09-23 19:37:21.739839+0200 BeoplayRemoteGUI[75117:447461] addDevice: BV 11-46 2020-09-23 19:37:21.742602+0200 BeoplayRemoteGUI[75117:447461] addDevice: BS7000 BLC 2020-09-23 19:37:21.745316+0200 BeoplayRemoteGUI[75117:447461] addDevice: BS Essence - Bath 2020-09-23 19:37:21.747026+0200 BeoplayRemoteGUI[75117:447461] addDevice: BS Essence - Bed 2020-09-23 19:37:21.750347+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoPlay A6 2020-09-23 19:37:21.756650+0200 BeoplayRemoteGUI[75117:447461] addDevice: BS9000 BLC 2020-09-23 19:37:21.759259+0200 BeoplayRemoteGUI[75117:447461] addDevice: BS3000 BLC 2020-09-23 19:37:21.761701+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoSound 35 2020-09-23 19:37:21.763818+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoSound Shape 2020-09-23 19:37:21.766140+0200 BeoplayRemoteGUI[75117:447461] addDevice: BeoVision Harmony 2020-09-23 19:37:21.769257+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoPlay M3 garden -> http://Beoplay-M3-28727487.local.:8080 2020-09-23 19:37:21.769746+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoSound Moment -> http://BeoSound-Moment-27486665.local.:8080 2020-09-23 19:37:21.770083+0200 BeoplayRemoteGUI[75117:447461] resolved: Beoplay M3 wc -> http://Beoplay-M3-28888659.local.:8080 2020-09-23 19:37:21.770977+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoVision Horizon-40 -> http://Android.local.:8080 2020-09-23 19:37:21.771521+0200 BeoplayRemoteGUI[75117:447461] resolved: BV 11-46 -> http://BeoVision11-46-23702794.local.:8080 2020-09-23 19:37:21.774060+0200 BeoplayRemoteGUI[75117:447461] resolved: BS7000 BLC -> http://BLC-27233157.local.:8080 2020-09-23 19:37:21.781233+0200 BeoplayRemoteGUI[75117:447461] resolved: BS Essence - Bath -> http://BeoSound-Essence-25531390.local.:8080 2020-09-23 19:37:21.782026+0200 BeoplayRemoteGUI[75117:447461] resolved: BS Essence - Bed -> http://BeoSound-Essence-25214434.local.:8080 2020-09-23 19:37:21.783924+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoPlay A6 -> http://BeoPlay-A6-25512935.local.:8080 2020-09-23 19:37:21.786182+0200 BeoplayRemoteGUI[75117:447461] resolved: BS9000 BLC -> http://BLC-23852384.local.:8080 2020-09-23 19:37:21.788496+0200 BeoplayRemoteGUI[75117:447461] resolved: BS3000 BLC -> http://BLC-24015724.local.:8080 2020-09-23 19:37:21.790863+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoSound 35 -> http://BeoSound-35-26288072.local.:8080 2020-09-23 19:37:21.793301+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoSound Shape -> http://BeoSound-Shape-28143600.local.:8080 2020-09-23 19:37:21.796287+0200 BeoplayRemoteGUI[75117:447461] resolved: BeoVision Harmony -> http://Beovision-Harmony-32853352.local.:8080 2020-09-23 19:37:25.496493+0200 BeoplayRemoteGUI[75117:447461] Metal API Validation Enabled 2020-09-23 19:37:25.697403+0200 BeoplayRemoteGUI[75117:447461] Hotkeys disabled 2020-09-23 19:37:31.598190+0200 BeoplayRemoteGUI[75117:447461] deviceClicked 2020-09-23 19:37:31.598339+0200 BeoplayRemoteGUI[75117:447461] disconnect 2020-09-23 19:37:31.598701+0200 BeoplayRemoteGUI[75117:447461] connect: BS Essence - Bath -> http://BeoSound-Essence-25531390.local.:8080 2020-09-23 19:37:31.622128+0200 BeoplayRemoteGUI[75117:447461] load sources 2020-09-23 19:37:31.817766+0200 BeoplayRemoteGUI[75117:447461] Hotkeys enabled 2020-09-23 19:37:31.821055+0200 BeoplayRemoteGUI[75117:447461] connection state: connecting 2020-09-23 19:37:31.821182+0200 BeoplayRemoteGUI[75117:447461] Hotkeys disabled 2020-09-23 19:37:32.065504+0200 BeoplayRemoteGUI[75117:447461] source id: music:2870.1293026.25531390@products.bang-olufsen.com, source name: Music 2020-09-23 19:37:32.065657+0200 BeoplayRemoteGUI[75117:447461] source id: radio:2870.1293026.25531390@products.bang-olufsen.com, source name: TuneIn 2020-09-23 19:37:32.065815+0200 BeoplayRemoteGUI[75117:447461] source id: CD:1790.1179011.24015724@products.bang-olufsen.com, source name: CD3000 (BS3000 BLC) 2020-09-23 19:37:32.065947+0200 BeoplayRemoteGUI[75117:447461] source id: AUX_A:1790.1179011.24015724@products.bang-olufsen.com, source name: A.AUX3000 (BS3000 BLC) 2020-09-23 19:37:32.066085+0200 BeoplayRemoteGUI[75117:447461] load tuneIn favorites 2020-09-23 19:37:32.066168+0200 BeoplayRemoteGUI[75117:447461] tuneIn favorites from device 2020-09-23 19:37:32.434353+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s17523, station name: NPO Radio 1 2020-09-23 19:37:32.434471+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s9483, station name: NPO Radio 2 2020-09-23 19:37:32.434555+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s96203, station name: NPO 3FM Alternative 2020-09-23 19:37:32.434648+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s47311, station name: NPO Radio 2 Top 2000 - Not Supported 2020-09-23 19:37:32.434731+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s167179, station name: NPO Nieuws & Evenementen - Not Supported 2020-09-23 19:37:32.434816+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s6702, station name: Arrow Classic Rock 2020-09-23 19:37:32.434898+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s6707, station name: NPO 3FM 2020-09-23 19:37:32.435072+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s25548, station name: NPO Radio 4 2020-09-23 19:37:32.435168+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s100876, station name: NPO Radio 5 Nostalgia non-stop - Not Supported 2020-09-23 19:37:32.435253+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s50417, station name: AAFM 2020-09-23 19:37:32.435338+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s223220, station name: The Economist Radio - Not Supported 2020-09-23 19:37:32.435411+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s32503, station name: KERN 2020-09-23 19:37:32.435485+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s17947, station name: The Answer Chicago 2020-09-23 19:37:32.435558+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s165740, station name: Bloomberg Radio 2020-09-23 19:37:32.435640+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s26531, station name: La Mega 96.3 2020-09-23 19:37:32.438794+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s111443, station name: Panda Pop Radio 2020-09-23 19:37:32.438888+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s26135, station name: Talk Radio 1170 2020-09-23 19:37:32.439049+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s140131, station name: Pop Español - Not Supported 2020-09-23 19:37:32.439137+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s8295, station name: WDR4 2020-09-23 19:37:32.439217+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s76590, station name: 100 L 2020-09-23 19:37:32.439295+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s252020, station name: 538 Non Stop 2020-09-23 19:37:32.439372+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s244528, station name: 1000 Goldschlager - Not Supported 2020-09-23 19:37:32.439449+0200 BeoplayRemoteGUI[75117:447461] tuneIn station id: s6705, station name: NPO Soul & Jazz 2020-09-23 19:37:32.602285+0200 BeoplayRemoteGUI[75117:447461] connection state: online 2020-09-23 19:37:32.623459+0200 BeoplayRemoteGUI[75117:447461] source changed: 2020-09-23 19:37:32.624692+0200 BeoplayRemoteGUI[75117:447461] receive: 33 2020-09-23 19:37:45.346485+0200 BeoplayRemoteGUI[75117:447461] Hotkeys enabled 2020-09-23 19:40:29.957092+0200 BeoplayRemoteGUI[75117:454987] Task <0EFFB9B0-B601-4C5E-95E5-B6A7EB4A1C11>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x600000c80300 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0EFFB9B0-B601-4C5E-95E5-B6A7EB4A1C11>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <0EFFB9B0-B601-4C5E-95E5-B6A7EB4A1C11>.<1>" ), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=http://beosound-essence-25531390.local.:8080/BeoNotify/Notifications, NSErrorFailingURLKey=http://beosound-essence-25531390.local.:8080/BeoNotify/Notifications, _kCFStreamErrorDomainKey=4} 2020-09-23 19:40:30.480443+0200 BeoplayRemoteGUI[75117:447461] connection state: offline: The request timed out. 2020-09-23 19:40:30.480588+0200 BeoplayRemoteGUI[75117:447461] Hotkeys disabled 2020-09-23 19:40:30.481132+0200 BeoplayRemoteGUI[75117:447461] Hotkeys enabled 2020-09-23 19:40:30.961136+0200 BeoplayRemoteGUI[75117:447461] connection state: connecting 2020-09-23 19:40:31.283188+0200 BeoplayRemoteGUI[75117:447461] connection state: online 2020-09-23 19:40:31.283955+0200 BeoplayRemoteGUI[75117:447461] source changed: 2020-09-23 19:40:31.284404+0200 BeoplayRemoteGUI[75117:447461] receive: 33 2020-09-23 19:40:39.042948+0200 BeoplayRemoteGUI[75117:447461] Hotkeys disabled 2020-09-23 19:40:51.417585+0200 BeoplayRemoteGUI[75117:447461] deviceClicked 2020-09-23 19:40:51.417698+0200 BeoplayRemoteGUI[75117:447461] disconnect 2020-09-23 19:40:51.419126+0200 BeoplayRemoteGUI[75117:447461] connect: BeoSound Moment -> http://BeoSound-Moment-27486665.local.:8080 2020-09-23 19:40:51.420737+0200 BeoplayRemoteGUI[75117:447461] load sources 2020-09-23 19:40:51.498709+0200 BeoplayRemoteGUI[75117:447461] Hotkeys enabled 2020-09-23 19:40:51.500036+0200 BeoplayRemoteGUI[75117:447461] connection state: disconnecting 2020-09-23 19:40:51.500609+0200 BeoplayRemoteGUI[75117:447461] connection state: offline 2020-09-23 19:40:51.501201+0200 BeoplayRemoteGUI[75117:447461] connection state: connecting 2020-09-23 19:40:51.501296+0200 BeoplayRemoteGUI[75117:447461] Hotkeys disabled 2020-09-23 19:40:51.765253+0200 BeoplayRemoteGUI[75117:447461] connection state: online 2020-09-23 19:40:51.798417+0200 BeoplayRemoteGUI[75117:447461] source changed: music:2997.1290084.27486665@products.bang-olufsen.com 2020-09-23 19:40:51.799824+0200 BeoplayRemoteGUI[75117:447461] receive: 34 2020-09-23 19:41:00.425956+0200 BeoplayRemoteGUI[75117:447461] Hotkeys enabled 2020-09-23 19:41:19.785391+0200 BeoplayRemoteGUI[75117:447461] Hotkeys disabled 2020-09-23 19:41:24.045544+0200 BeoplayRemoteGUI[75117:447461] receive: 34 2020-09-23 19:41:25.445062+0200 BeoplayRemoteGUI[75117:447461] receive: 34 2020-09-23 19:41:37.157386+0200 BeoplayRemoteGUI[75117:447461] quitClicked

Carolpa commented 3 years ago

quit the app after the Moment possesed all memory

mbolo01 commented 3 years ago

If the project builds and runs in Xcode it should also be possible to open a terminal and run make clean install to compile the app and install it into /Applications. I find it easier than navigating the Xcode UI.

I guess we have to be in the project directory to run this command, correct ?

mbolo01 commented 3 years ago

@mbolo01 The app may pick up the "B&O" string from the app.title config value.

Would you be able to share a pcap or a screenshot of what data is passed over TCP/IP between the client and the Moment device? It would also be interesting to have a look at what is going over the wire when remote controlled by something that works (e.g. the iOS app).

I'll do a Wireshark capture.

In another issue report I wrote that the Moment listens to another port, maybe this is the one to navigate into sources and radio. Capturing that is more "complicated", but I maybe able to do it.

mbolo01 commented 3 years ago

@mbolo01 The app may pick up the "B&O" string from the app.title config value.

I guess this is because I ran the customization of app name in the menu bar for previous versions, as described in your app user guide?

mbolo01 commented 3 years ago

I captured the same sequence of actions against BS Moment (192.168.1.70) and BS Core (192.168.1.74). My Mac IP address, running the app, is 192.168.1.47 For both, the first packet is the response to MDNS query at application launch, other packets are just the result of selecting the product in the list. Immediately after selecting the BS Moment, the CPU jumps to 93/100%, the app output in the Xproj window does not show any particular activity.

Pcap files.zip

tlk commented 3 years ago

I guess we have to be in the project directory to run this command, correct ?

Exactly.

I guess this is because I ran the customization of app name in the menu bar for previous versions, as described in your app user guide?

Yes that could be the case. The configuration can be inspected like this:

bundleid=$(defaults read /Applications/BeoplayRemoteGUI.app/Contents/Info.plist CFBundleIdentifier)
echo $bundleid
defaults read $bundleid
tlk commented 3 years ago

I captured the same sequence of actions against BS Moment (192.168.1.70) and BS Core (192.168.1.74).

Excellent, thank you! I think I have been able to reproduce and checked in a bugfix.

mbolo01 commented 3 years ago

Well done!!!! You have fixed the CPU issue and now we can see the Sources and act on the TuneIn radio against the Moment too! Bravo bravi

tlk commented 3 years ago

Thanks :) Happy to hear that it works!