kylergib / WaveLinkPluginTouchPortal

GNU General Public License v3.0
4 stars 1 forks source link

Plugin crashing touchportal and interfering with peripheral lighting #18

Closed Cam9731 closed 10 months ago

Cam9731 commented 10 months ago

Hello again, this might sound a little bizarre, but hear me out haha:

So after going to the version you updated yesterday, the plugin will occasionally cause all of my peripheral and PC lighting to revert to rainbow/black for roughly 30 seconds. Within this time, if I make any changes within the WaveLink screen on TP, it crashes the TouchPortal app (on the ipad) entirely.

I've grabbed some log messages to hopefully help figure out what's going on:

This log message occurs when my peripherals get all wonky. 21:33:46.188 - [LOG] (Plugin Instance) [WARNING] WaveLinkPlugin.onAppClosed Wave Link closed 21:33:46.189 - [LOG] (Plugin Instance) [INFO ] WaveLinkClient.onClose WebSocket connection closed:

At this time, I attempted to execute an action using another plugin to ensure that TouchPortal as a whole was still functioning. This command worked as expected 21:33:57.433 - [LOG] (Action Flow) Button Pressed at (10, 0) on Page: \Everything.tml 21:33:57.434 - [LOG] (Action Flow) - Doing action: [ IF STATEMENT ] IF This button state is ON 21:33:57.443 - [LOG] (Action Flow) - Doing action: [ELSE] 21:33:57.455 - [LOG] (Action Flow) - Doing action: [Turn lights in Room] My Room On

At this point, I went into my "WaveLink" page and attempted to mute a source. The following log message resulted: 21:34:00.742 - [LOG] (Action Flow) Button Pressed at (7, 1) on Page: \Wave Link.tml 21:34:00.743 - [LOG] (Action Flow) - Doing action: [Mute/Unmute Input] com.kylergib.wavelinktp.WaveLinkPlugin.WaveLinkInputs.state.inputList -> Game | com.kylergib.wavelinktp.WaveLinkPlugin.WaveLinkInputs.action.actionSetInputMute.data.value -> toggle | com.kylergib.wavelinktp.WaveLinkPlugin.WaveLinkInputs.action.actionSetInputMute.data.mixerId -> Local | 21:34:00.751 - [LOG] (Plugin Instance) Preparing plugin data for com.kylergib.wavelinktp.WaveLinkPlugin 21:34:00.762 - [LOG] (Plugin Instance) This is TPDiscord and received message for com.kylergib.wavelinktp.WaveLinkPlugin 21:34:00.770 - [LOG] (Plugin Instance) This is TPOpenHardwareMonitor and received message for com.kylergib.wavelinktp.WaveLinkPlugin 21:34:00.780 - [LOG] (Plugin Instance) This is com.kylergib.wavelinktp.WaveLinkPlugin and received message for com.kylergib.wavelinktp.WaveLinkPlugin 21:34:00.790 - [LOG] (Plugin Instance) [INFO ] WaveLinkPlugin.actionSetInputMute Action actionSetInputMute received: toggle - Game - Local 21:34:00.788 - [LOG] (Plugin Instance) Message send: {"data":[{"id":"com.kylergib.wavelinktp.WaveLinkPlugin.WaveLinkInputs.state.inputList","value":"Game"},{"id":"com.kylergib.wavelinktp.WaveLinkPlugin.WaveLinkInputs.action.actionSetInputMute.data.value","value":"toggle"},{"id 21:34:00.798 - [LOG] (Plugin Instance) This is com.github.ChristopheCVB.TouchPortal.Spotify.TouchPortalSpotifyPlugin and received message for com.kylergib.wavelinktp.WaveLinkPlugin 21:34:00.797 - [LOG] (Plugin Instance) [SEVERE ] TouchPortalPlugin.lambda$onActionReceived$5 Action method could not be invoked Also a note, I did try disabling all other plugins, the issue was still present so I reenabled them.

After this point, it seems inconsistent whether TouchPortal becomes responsive again or not. Restarting the app on my ipad and TP on my computer does solve it temporarily, but the issue does occur consistently every 10 minutes or so.

Some connectivity issues can be expected with TouchPortal as I'm sure any avid user has experienced, but I'm hoping specifically that It's possible to resolve the issue with my peripherals as it is quite distracting to have all the lights in my Keyboard, Mouse, and PC pop off and on every 10 minutes or so.

I've attached the full log if needed. Let me know if there's anything I can do to help, as I expressed yesterday with the slider fix this is something I've been wanting for a long time, and am more than happy to be a test dummy for you!

TP_WaveLink_Crash_Log .txt

kylergib commented 10 months ago

that is very weird. im going to try to look into a little tonight if possible. but i agree that preferably id like to resolve this as well. i will let you know if i have any follow up questions once i am able to look into this in a bit.

kylergib commented 10 months ago

alright, so i looked into this and im not sure what could be causing this. so i have some questions to attempt to narrow it down.

if possible answer the following:

windows version: any rgb software installed: peripherals affected: does this happen with all actions in wave link or a specific one:

Cam9731 commented 10 months ago

Unfortunately I can't pull the windows version right now as I'm away from my PC, but I'm on one of the newer windows insider dev builds.

As for peripherals effected, most of my gear is Corsair and all of that goes out, along with my Asus mobo lighting.

I use an RGB program called SignalRGB. I think I tried fully closing that program and the issue still occured even with no RGB program running, I'd have to test that again to be sure though. I'll comment again once I get the chance on that.

Funnily enough, within signal it looks as if all of the devices just disappear for 30ish seconds, then pop right back in.

This happens completely unprompted in WaveLink/TouchPortal , I could be sitting completely idle at my PC and it still occured.

Cam9731 commented 10 months ago

I was able to check without signalRGB running and that seemed to fix it, Signal and your plugin seem to be conflicting in some way. Interestingly enough in the signal logs, this is what shows up at the time of the rgb going haywire:

23:02:36:390 @ [0x531c] - USB - Detected Disconnection of device: [USB\VID_0424&PID_2740\8&9CEC91C&0&5] 23:02:36:390 @ [0x531c] - USB - USB - Detected Device Removal: 23:02:36:390 @ [0x531c] - USB - Path: [USB\VID_0424&PID_2740\8&9CEC91C&0&5] 23:02:36:390 @ [0x531c] - USB - Manufacturer: [UNKNOWN] 23:02:36:390 @ [0x531c] - USB - Product: [Hub Controller] 23:02:36:390 @ [0x531c] - USB - Uid: [0424:2740:8-9CEC91C-0-5], Legacy Uid: [0424:2740:3:5]

I also did try a fresh install of SignalRGB but that didn't seem to help. Ideally I'd like to run both programs as I have in the past. Let me know if you have any ideas, and thanks again for the help!

kylergib commented 10 months ago

so i mainly use mac with wave link, but i hooked up my wave link mic to my windows computer and installed signalRGB to attempt to reproduce the issue. i have it running for about 30 minutes and it is not doing what yours is. so i wonder if it is a specific issue with the device. are you able to go into signalRGB and settings -> device information and fine the device that is vendor ID: 0x0424 and product ID: 0x2740 and let me know what that is and see if i can find something out about that device?

kylergib commented 10 months ago

actually disregard that, i read it wrong and thought you said it was still happening if signal was closed. but i am still curious about which device that is? also does it happen if you disable that specific device in signalRGB?

Cam9731 commented 10 months ago

It's not just that device, there are a bunch of them I just copied an excerpt of the log. That specific device isn't even a lighting device I think it's just a USB hub on my motherboard that is being detected for some reason.

I took a cursory look at your code and judging by the messages I'm seeing, it's interesting that your onAppClosed method is being triggered since WaveLink is running the whole time on my PC.

I wonder why the isAppRunningWin method stops detecting the process only when Signal is running.

ACTUALLY WAIT

I wonder if your process logic is interfering with Signal sniffing around all my USB devices. Because this is one of the lines in the signal log.

00:37:18:562 @ [0x94a8] - USB - Detected Disconnection of device: [USB\VID_0FD9&PID_0070\BS43J1A10050] 00:37:18:562 @ [0x94a8] - USB - USB - Detected Device Removal: 00:37:18:562 @ [0x94a8] - USB - Path: [USB\VID_0FD9&PID_0070\BS43J1A10050] 00:37:18:562 @ [0x94a8] - USB - Manufacturer: [UNKNOWN] 00:37:18:562 @ [0x94a8] - USB - Product: [Elgato Wave:3] 00:37:18:562 @ [0x94a8] - USB - Uid: [0fd9:0070:BS43J1A10050], Legacy Uid: [0fd9:0070:3:1]

AFAIK there isn't an easy way to just prevent signal from worrying about that USB device at all... hmmm...

kylergib commented 10 months ago

ummm. weird. if all devices disconnect then i wonder if that is technically causing wave link to kind of close for a split second or something, or lose the connection. i updated my code to attempt to disable monitoring and it seems to disable successfully. you can download it here if you would like to try that. once that is added you can set the monitor wave link app to 0 in TP plugin settings.

https://github.com/kylergib/WaveLinkPluginTouchPortal/releases/tag/disable-monitoring

kylergib commented 10 months ago

the only other thing i can think of is to contact signalRGB support to see if they can read the crash dumps and find out exactly what is causing it.

kylergib commented 10 months ago

so i went through signalRGB forums and then joined their discord and apparently they have a known issue with some corsair devices disconnecting randomly. unsure if this is what is causing yours or not though. i posted a screenshot of their discord and a link to their forum when someone is asking about a corsair product

https://forum.signalrgb.com/t/corsair-h150i-pro-xt-cooler-bugs-out/755/3

Screenshot 2023-08-15 at 3 02 36 AM

kylergib commented 10 months ago

also from their discord i then found a issue on corsairs website about disconnects. and it dates back to 2021, but idk if your issue is related. i am just trying to help lol a guy posted from august 5 about forcing windows to not disconnect usbs on page 8. again unsure if any of this is related, but it is weird that it only happens when running the plugin.

https://forum.corsair.com/forums/topic/168270-usb-connectivity-issues-related-to-amd-500-series-chipsets-megathread/page/8/

Cam9731 commented 10 months ago

I'm not sure what exactly seemed to solve it;, but when using the updated plugin file you gave me as well as making that USB power change, I haven't seen it occur in a while. I tried reverting to the old version and it came right back though. Back on the new plugin version and all seems to work once again. I'll keep an eye on it and let you know if I discover anything else in my experimentation.

Thanks again for being so responsive and receptive!