Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By running the program without pre-opening the audacity #21

Open
b4zz4 opened this issue Jun 17, 2021 · 15 comments
Open

By running the program without pre-opening the audacity #21

b4zz4 opened this issue Jun 17, 2021 · 15 comments

Comments

@b4zz4
Copy link

b4zz4 commented Jun 17, 2021

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.

@tin2tin
Copy link
Owner

tin2tin commented Jun 17, 2021

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

@kodiakcreativity
Copy link

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.

@tin2tin
Copy link
Owner

tin2tin commented Jun 29, 2021

@samytichadou Are you on Ubuntu?

@b4zz4
Copy link
Author

b4zz4 commented Jun 29, 2021

I use Arch linux

@kodiakcreativity
Copy link

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?

@samytichadou
Copy link
Contributor

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...)

@kodiakcreativity
Copy link

@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!

@samytichadou
Copy link
Contributor

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

@b4zz4
Copy link
Author

b4zz4 commented Jul 13, 2021

Arch Linux
Blender 2.93.1
Audacity 3.0.2

I put the path in the addon.

@kodiakcreativity
Copy link

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.

@b4zz4
Copy link
Author

b4zz4 commented Aug 14, 2021

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

@tin2tin
Copy link
Owner

tin2tin commented Aug 14, 2021

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

@b4zz4
Copy link
Author

b4zz4 commented Aug 14, 2021

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

@tin2tin
Copy link
Owner

tin2tin commented Aug 16, 2021

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

Maybe @kodiakcreativity test it first?

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

@b4zz4
Copy link
Author

b4zz4 commented Aug 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants