SteffeyDev / atemOSC

Control ATEM video switchers over the network with OSC messages
http://www.atemosc.com
202 stars 32 forks source link

Intermittent loss of OSC communication, persisting after relaunch #94

Closed jeffmann closed 3 years ago

jeffmann commented 6 years ago

I had a problem where atemOSC became unresponsive over OSC. It was running, showed the green light and switcher name, but had stopped responding to (or perhaps receiving) OSC messages. I don't know what triggered the condition. It has happened a couple of times before, but not often enough that I can do much testing.

I tried quitting and restarting atemOSC several times, but the problem persisted, no OSC communication. The log was empty. I trashed the preferences file, though that didn't seem to have any effect, the IP and port numbers were still there. Eventually I tried entering a different IP number for the switcher. It asked if I was sure I wanted to disconnect and change switchers, and I answered "no". Then it immediately started working again.

I wasn't able to test whether restarting the computer would clear the problem.

The switcher will go into an art gallery installation this weekend, and needs to run mostly unattended. Would be great if anyone has an idea about it!

SteffeyDev commented 6 years ago

For starters, if it was an issue with the preferences file, then trashing it doesn't actually help, because its stored in memory. To actually get rid of the preferences, you have to run defaults delete cc.buechele.atemOSC in the terminal. That may have fixed the issue sooner, but certainly isn't a solution to the initial problem.

As for the disconnect prompt, I am fairly certain that pressing "No" did not actually solve the problem, because that button simply sets the text field back to the value in the preferences file, and doesn't touch anything except UI. That being said, it maybe something in the app itself, outside of our control, was locked up, and updating the UI unblocked it somehow. Or it was just a coincidence.

Unfortunately, without anything else to go off of, that's all I got. Unless there is an actual bug in atemOSC, deleting the preferences and restarting the app should fix most problems, and a computer restart should fix everything else.

jeffmann commented 6 years ago

Thanks. There was definitely no OSC communication despite restarting atemOSC several times. I could be misremembering, but I'm fairly certain that as soon as I changed the switcher IP but then cancelled the change, I instantly started receiving messages in my Max patch, which was still open. That wouldn't have triggered a reload or rewrite of the preferences? I know that I tried doing that - changing the IP - because that's what I had done last time it happened. I may have changed the OSC out IP address last time.

Well, hopefully it won't happen again - or it will happen more often, so I can try different steps...

jeffmann commented 6 years ago

Had the problem again today, it was connected to the switcher but neither sending nor responding to OSC, despite relaunching. Emtpy log window. Rebooting the computer cleared it.

SteffeyDev commented 6 years ago

Hm, what OS is the computer running?

SteffeyDev commented 6 years ago

Next time it happens, you should run wire shark or tcpdump to see if the packets are even getting to the computer. If you don’t see the OSC packets in those, then it’s a computer issue, otherwise it might be an atemOSC issue

jeffmann commented 6 years ago

It's Sierra, 10.12.6. My application is running on the same computer as atemOSC, along with ATEM Software Control which is working. But if I change something in ATEM Software Control, atemOSC doesn't send anything (when it's experiencing the issue). My application keeps working, I can quit atemOSC and send/receive OSC on the 3333/4444 ports. I made a little simulator that just responds to /atem/send-status on the same ports, and it works. So I guess that it's a problem with atemOSC.

SteffeyDev commented 6 years ago

Ok, the next step for me would be to run it from Xcode and turn on some additional logging, do you know any Xcode/Obj-C?

jeffmann commented 6 years ago

No, not really. I've done some C programming and have a general understanding of compilers but no experience with Xcode or Objective C. I downloaded the zip of the git master and tried to compile it in Xcode. I did manage to get an app, with version 2.5.2 in a "debug" folder deep within my Library folder. I didn't go any further than that.

SteffeyDev commented 6 years ago

Ok, sorry its been a busy week. I think I need to turn on more logging to the panel by default so that you can see any errors or anything that would cause it to not work

OpenUpTech commented 5 years ago

I have the same problem.

AtemOSC is running, shows the green light and switcher name, but has stopped responding to OSC messages. It happens every time we startup the computer.

I tried entering a different IP number for the switcher. It asked if I was sure I wanted to disconnect and change switchers, and I answered "no". Then it immediately started working again.

SteffeyDev commented 5 years ago

So with some code analysis, I can see that any answer in that dialog causes a reload of the ports... @OpenUpTech @jeffmann are you guys using default ports or custom? (Default 3333, 4444)

jeffmann commented 5 years ago

I'm using "OSC incoming port: 3333 outgoing: 4444".

For me the problem was rare, it only happened a few times, not every time the computer started up. The installation ran for about a month. It isn't running anymore, and I don't have access to the switcher at the moment to test...

OpenUpTech commented 5 years ago

We use the default ports. 3333 and 4444