ossia / libossia

A modern C++, cross-environment distributed object model for creative coding and interaction scoring
https://ossia.io
GNU Lesser General Public License v3.0
206 stars 33 forks source link

[ossia-max] exposing a device via oscquery causes Max to hang for ~20 seconds #765

Closed evanmtp closed 2 years ago

evanmtp commented 2 years ago

On sending the message "expose oscquery" to [ossia.device], Max hangs for a significant amount of time - on my machine, about 20 seconds.

Please see attached patches: oscquery_test.zip

Steps to reproduce:

  1. Open ossia_oscquery_test_client.maxpat and ossia_oscquery_test_server.maxpat .

  2. In ossia_oscquery_test_server.maxpat , click the "expose oscquery" message box.

Tested on Windows 10 Pro, ver. 20H2, running on a 5950X with 32GB RAM.

jcelerier commented 2 years ago

here it hangs for definitely less than a second. I'm thinking that this may be a network issue similar to the one you're getting with the other case: can you try for instance disabling the firewall ? I'll also send you a small test app if you can check

jcelerier commented 2 years ago

So that I can try to find where things go wrong: can you, on windows:

1/ Install WinDbg: https://www.microsoft.com/fr-fr/p/windbg/9pgjgd53tn86?rtc=1&activetab=pivot:overviewtab 2/ Replace ossia-max with this one: ossia-max-debug.zip 3/ In WinDbg: File > Launch Executable > C:\Program Files\Cycling '74\Max 8\Max.exe 4/ It may stop a few times on startup, keep pressing the green button "Go" at top left until you can load the patches 5/ When the patch is loaded, do the action that triggers the wait, and then when it's blocked, hit the Pause button on windbg 6/ Take me a screenshot of windbg, by making the window as large as possible so that all the thread are visible, like this:

DbgX Shell_o6ebuQJraZ

evanmtp commented 2 years ago

Here's the screenshot:

ossia_network_hang_02

As I mentioned in #776, this line appears in the windbg Command pane during the hang:

dnssd_clientstub ConnectToServer: connect()-> No of tries: 1dnssd_clientstub ConnectToServer: connect()-> No of tries: 2dnssd_clientstub ConnectToServer: connect()-> No of tries: 3dnssd_clientstub ConnectToServer: connect()-> No of tries: 1dnssd_clientstub ConnectToServer: connect()-> No of tries: 2dnssd_clientstub ConnectToServer: connect()-> No of tries: 3

I tried disconnecting ethernet and wifi, putting the machine in airplane mode, and disabling Windows Defender Firewall - still getting the hang.