Cycling74 / miraweb

MIT License
139 stars 14 forks source link

[mira.frame] and m4l hangs #121

Open aumhaa opened 6 years ago

aumhaa commented 6 years ago

Difficulties arise when using Miraweb inside of m4l, especially when switching between the editor and Live. The symptoms are essentially the same sort of thing that were happening in my earlier reports (Max hangs when trying to instantiate [mira.frame], as it did in miraweb v1.23). It seems to be a port lock, perhaps the external instance with its bound port isn’t getting released when switching to editor, so isn't available to reset it when switching back to Live?

To reproduce, you can simply create an amxd with an [mira.frame.help] patcher in it and save it.

  1. Add the amxd to Live.

  2. Connect Mira or Miraweb to it.

  3. Open the amxd in the editor.

    (at this point, I can sometimes get Mira to connect to the editor version, but chances are good you won’t be able to control the [mira.frame] from the app)

  4. Close the editor.

It takes some time to get into a state where this will reproduce my reported symptoms, and a reboot of the machine running the server will alleviate the problems for a while. I'm trying to isolate further.

For me, this eventually causes Max (editor) to hang, and I have to force quit. Other strange things happen as well, like no connection via Miraweb or Mira, or if a connection is possible, [mira.frame] either doesn’t display in app/browser (or works improperly if it does).

At other times, Live itself will freeze when loading the patch after the editor has been opened and closed. The only way to semi-reliably get things working again is to close all instances of Live/Max/Mira on all connected devices, disconnect my machine from network, and start over again. I've tried this on multiple machines, multiple networks, Mira.app and Miraweb, situation seems the same regardless.

I've gone as far as generating the mira.frame via scripting after loading a patch, and deconstructing it before switching to the editor manually, but problems persist.

starakaj commented 5 years ago

I feel your pain here. This is probably an issue with something very core to Mira, though.

vatologic commented 5 years ago

Same issue here. Started a new (empty) Live project, added a fresh/empty "Max Audio Device", edit with Max via Live's usual button and as soon as I create a new "mira.frame" both Max and Live hang. No other VST/AU/Max devices present, no other patchers. Strange thing is, it doesn't do this all the time. Just most of the times. I've had it working through the iOS MIRA app and MIRA web on the current setup, so the system is able to function - there just seems to be a snag in creating an instance. Once it runs, if it does, then it runs fine.

Setup

What didn't fix it

aumhaa commented 5 years ago

FWIW, I’ve been observing this behavior for a long time, but haven’t been able to isolate a cause. I’ve found that sometimes restarting all network activity (disconnecting wifi, restarting Max/Live) has worked, but generally these days its too much trouble to use, so I’ve not been using Mira. I’d love to get to the bottom of things….

I’ve had this problem on my mobile machine more than desktop machine, so I suspect it’s related to my network config somehow….

Wish I could be more helpful :(

a

On Feb 1, 2019, at 10:15 PM, Björn Franken notifications@github.com wrote:

Same issue here. Started a new (empty) Live project, added a fresh/empty "Max Audio Device", edit with Max via Live's usual button and as soon as I create a new "mira.frame" both Max and Live hang. No other VST/AU/Max devices present, no other patchers. Strange thing is, it doesn't do this all the time. Just most of the times. I've had it working through the iOS MIRA app and MIRA web on the current setup, so the system is able to function - there just seems to be a snag in creating an instance. Once it runs, if it does, then it runs fine.

Setup

Ableton Live 10 suite (10.0.6 [build 2019-01-09_5d8b434734]) New empty project, no VST/AU loaded on channel and/or master, no return channels

Max 8 (8.0.2 [a3679a2]) 64-bit Clean/new "Max Audio Effect" with only plugin~ / plugout~ patchers present

MacOS High Sierra (10.13.6) MacPro4,1 (Early 2009) 2x3,46 Ghz 6-core Intel Xeon, 48 Gb DDR3, GeForceGTX970 4 Gb

What didn't fix it

Force quitting Live and Max, restarting both apps. Once the bug occurs, Live and Max will work fine after restarting the apps, yet they'll hang again as soon as an instance of "mira.frame" is added. So, it appears some background/server process is causing the crash, because once it does it once - it keeps on doing it. Reboot of MacOS. May lead to a working instance, may lead to a crash as stated above. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cycling74/miraweb/issues/121#issuecomment-459939517, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIw8lI5VaWpi1t5QtxyaBEnYJcghMzTks5vJSzwgaJpZM4QIXQt.

vatologic commented 5 years ago

While digging a little deeper into the processes running (Activity Monitor) and watching the Console Logs for any possible hints of what the server process name is (mira_ws_server, I think) - the 'hanged' Max application suddenly responded and the "mira.frame" instance loaded. It appears the server instance has some trouble initiating. If I find anything useful in the logs, I'll update this thread.

vatologic commented 5 years ago

Has anybody got a clue what the actual process / socket / connector is on MacOS? I might be able to track it for a while longer and gather more intel for a more detailed report on the bug.