Audacity_Bridge_for_Blender icon indicating copy to clipboard operation
Audacity_Bridge_for_Blender copied to clipboard

By running the program without pre-opening the audacity

Open b4zz4 opened this issue 3 years ago • 15 comments

Blender waiting, and he doesn't start. Command line show:

Audacity Tools --- Looking for Audacity pipe

But if the audacity is open, this works perfectly.

b4zz4 avatar Jun 17 '21 17:06 b4zz4

Try to open Audacity manually, and check if there are any pop-ups, if there are switch them off.

tin2tin avatar Jun 17 '21 19:06 tin2tin

I have the same problem. blender freezes attempting to start, if launched via terminal you can see the status Audacity Tools --- Looking for Audacity Pipe blender never finishes loading, screen is black and unresponsive. cannot even close it. if I CTRL-C in the terminal I get Audacity Tools --- Properties reset and blender finishes loading instantly. if launching without the terminal window however there is no way to do this. if Audacity is open prior to launching blender it will load fine. when loading Audacity manually there are no message or anything that come up by default. blender 2.93.1, audacity 3.0.2 on Ubuntu 18.04. This is an amazing addon! this little glitch makes it very cumbersome to work with though.

kodiakcreativity avatar Jun 29 '21 17:06 kodiakcreativity

@samytichadou Are you on Ubuntu?

tin2tin avatar Jun 29 '21 18:06 tin2tin

I use Arch linux

b4zz4 avatar Jun 29 '21 18:06 b4zz4

if I comment out this line check_set_pipe(False) line number 10 in startup_handler.py it solves the blender startup hang, if I go to the audacity tools menu in blender it indicates the pipe is not available as expected. but if I start audacity at this point then click the refresh button next to the pipe status the terminal shows the Looking for pipe message again, but it once again hangs here with blender frozen and never recovers. There should probably be a timeout, but aside from that it doesn't seem able to see or interact with audacity unless it was launched prior to blender.

with that line still commented if I close blender, open audacity then open blender with audacity already running I can go to the Audacity tools menu and click the refresh next at the top of that menu, and it instantly says pipe available and gives me a checkbox. this is at least a work around that makes it possible to use the addon, I just have to remember to start audacity first and to not click that button unless I do. I hope this investigation helps some with finding the problem. I've never done any python coding with blender or not, is there a way to debug the code to see exactly what line its hanging on?

kodiakcreativity avatar Jun 29 '21 19:06 kodiakcreativity

Audacity seems to fail to launch for now (updated audacity?), it starts an infinite loop waiting for it. Which version of it (audacity) are you using? I ll try to take a look on the weekend! Does it works correctly if audacity is launched before using a pipe command? (sending receiving...)

samytichadou avatar Jun 29 '21 21:06 samytichadou

@samytichadou is that what it is? does this extension attempt to start audacity on its own and its just waiting forever for it to start? It would be better for it not to do this honestly, I use blender as much for 3d modeling as I do the VSE, and having audacity pop up would be annoying. but that's a small detail.

I'm using Audacity 3.0.2, I had to use a very new version because the pipe plug in for audacity didn't become a standard part of the package on Linux until more recently. Windows and Mac had it earlier. I am on Ubuntu 18.04

if I launch audacity on its own, then start blender everything is fine. if I do not launch audacity first, blender freezes permanently when it tries to start, window is black, you have to kill the process. if doing the above starting blender on the terminal when it gets to that line where it displays Audacity Tools --- Looking for Audacity pipe I can do CTRL-C and it seems to terminate the addon only, blender then loads right away. if I comment out that one line: check_set_pipe(False) line number 10 in startup_handler.py blender will start properly without audacity. however, either way you do it, if audacity was not started first, blender can never get the pipe. if you click the refresh button on the Audacity Tools page in the VSE, blender then locks up, you have to kill the process.

with that line removed I have a not so great, but usable workaround. I can start blender on its own and its ok, I just have to remember never to try to use Audacity tools. (no issue if I'm just doing modeling or animation work with that session) if I do need Audacity tools, I must close blender, start audacity, then start blender again. with the line commented out it will not get the pipe, but as long as audacity was started first, you can click the refresh button in the Audacity tools panel and the pipe will then become available and you can use audacity tools.

I hope these details help!

kodiakcreativity avatar Jun 29 '21 21:06 kodiakcreativity

Hi i'm investigating a little into this bug, for now i can't reproduce it, i'm on windows 10, blender 2.93.1 and audacity 3.0.2. Which blender version are you using @b4zz4 @kodiakcreativity ? Did you set the audacity executable path in the addon preferences ? Cheers

samytichadou avatar Jul 13 '21 10:07 samytichadou

Arch Linux Blender 2.93.1 Audacity 3.0.2

I put the path in the addon.

b4zz4 avatar Jul 13 '21 15:07 b4zz4

Ubuntu 18.04 and Mint 21 (experience with the addon is on Ubuntu) Blender 2.93.1 Audacity 3.0.2

I did just realize something else that is different from previous experiences. I just extracted Blender 2.93.1, I was actually using 2.93.0 previously. now with my modified version of the addon which removes the establishment of the pipe on Blender startup I can now get the pipe created with Audacity regardless of which was started first. when I posted originally I was seeing Blender hard freeze (need to terminate the process, even the window close button doesn't work) when trying to click the refresh pipe button unless Audacity was started before Blender. now after extracting 2.93.1 I don't need to start Audacity first, I can start Blender first, then Audacity and click the refresh button and the pipe gets established. I won't know why that changed, but its at least a little better. Blender still hard freezes if you click that button when Audacity isn't running at all though.

I did not have the audacity path specified however (experienced the above with the path to audacity field blank) I will add the path and see if that makes any difference also.

kodiakcreativity avatar Jul 13 '21 16:07 kodiakcreativity

Here they solve the problem.

https://github.com/audacity/audacity/blob/master/scripts/piped-work/pipeclient.py

Being fifo type files, although the program is not open is waiting for a new message. But it's more complex than the condition with an open

b4zz4 avatar Aug 14 '21 01:08 b4zz4

@b4zz4 I do not understand what you mean. Could you explain in more detail exactly what solves the problem and why?

tin2tin avatar Aug 14 '21 04:08 tin2tin

What happens is that blender does not start after audacity closes. The display is left in gray. This is because in GNU/Linux creates FIFO files these leave blender waiting for a message.

https://cdn.masto.host/mographsocial/media_attachments/files/106/757/047/605/262/820/original/4187f5a797c208f1.mp4

b4zz4 avatar Aug 14 '21 23:08 b4zz4

@b4zz4 I'm not on Linux. Can you submit a patch that does what you need on Linux? Is this it? https://github.com/b4zz4/audacity_tools_for_blender/commit/94e9b9b84441ceff51e28dd6d72a387fc338f1af

Maybe @kodiakcreativity test it first?

I see the function will only be executed if not on win32, what will happen on macos?

tin2tin avatar Aug 16 '21 11:08 tin2tin

I did that patch, but it doesn't solve the problem at all, I need some more time to see it.

I document it to see if someone else wants to change it.

In macos it is most likely that it will happen the same as in gnu/linux

El lunes, 16 de agosto de 2021 08:33:34 ART, tin2tin @.***> escribió:

@b4zz4 I'm not on Linux. Can you submit a patch that does what you need on Linux? Is this it? @.***

Maybe @kodiakcreativity test it first?

I see the function will only be executed if not on win32, what will happen on macos?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

b4zz4 avatar Aug 16 '21 15:08 b4zz4