ggarra13 / mrv2

Professional player and review tool for vfx, animation and computer graphics.
https://mrv2.sourceforge.io
BSD 3-Clause "New" or "Revised" License
210 stars 14 forks source link

ERROR: Net Exception in latest beta #274

Closed SteffenDuenner closed 2 months ago

SteffenDuenner commented 2 months ago

Describe the bug I compiled latest beta ( d65ada80a6c3ebd00f533bdf5b62a2e4b95eef2d ) under Linux Mint 21.3 and now when trying to run mrv2 I get this:

[app] mrv2 v1.2.2 - Built Jul 22 2024 07:14:01 [app] Running on: Linux Mint 21.3 Release [app] Desktop: cinnamon [app] Running from /home/steffen/mrv2/BUILD-Linux-amd64/Release/install [app] Set Language to en_US.UTF-8, Numbers to C [prefs] Reading preferences from "/home/steffen/.filmaura/mrv2.prefs". [prefs] Loaded color themes from "/home/steffen/mrv2/BUILD-Linux-amd64/Release/install/colors/mrv2.colors". [ocio] Loaded 0 ocio presets from "/home/steffen/.filmaura/mrv2.ocio.json". [ocio] Setting OCIO config from preferences. [ocio] OCIO config is now: [ocio] /home/steffen/blender-git/build_linux_full/bin/4.3/datafiles/colormanagement/config.ocio [prefs] Path mappings have been loaded from "/home/steffen/.filmaura/mrv2.paths.prefs". [prefs] Loading hotkeys from "/home/steffen/.filmaura/mrv2.keys.prefs". ERROR: Net Exception

Desktop (please complete the following information):

ggarra13 commented 2 months ago

Thanks for the report. The beta branch is still unstable, so you are compiling it at your own risk, as I am currently experimenting with some things. Try compiling:

$ git checkout 106be264bd086069ba677aaa48becec39b01e0d2

and see if the problem goes away.

SteffenDuenner commented 2 months ago

Thanks for your reply. I know about the possible stability issues with beta releases. I went back to the commit you mentioned, to no avail. I then went back a few more. Failed as well. For now I'm back to main.

ggarra13 commented 2 months ago

That's weird. There are only two new commits to the beta branch:

9f1938fe3337036df0cbfe33c99f3c57e7dd0a19 - a new commit I just added to revert d65ada8 d65ada80a6c3ebd00f533bdf5b62a2e4b95eef2d - which is indeed broken 106be264bd086069ba677aaa48becec39b01e0d2 - which does not add any network stuff a14fa466ad47da042d5dd5bd186cf77875e8d618 - origin/main (which is working for you)

SteffenDuenner commented 2 months ago

I just recompiled main from scratch (using ./runme.sh -gpl clean) and bizarrely I still get this output:

[app] mrv2 v1.2.2 - Built Jul 22 2024 10:59:22 [app] Running on: Linux Mint 21.3 Release [app] Desktop: cinnamon [app] Running from /home/steffen/mrv2/BUILD-Linux-amd64/Release/install [app] Set Language to en_US.UTF-8, Numbers to C [prefs] Reading preferences from "/home/steffen/.filmaura/mrv2.prefs". [prefs] Loaded color themes from "/home/steffen/mrv2/BUILD-Linux-amd64/Release/install/colors/mrv2.colors". [ocio] Loaded 0 ocio presets from "/home/steffen/.filmaura/mrv2.ocio.json". [ocio] Setting OCIO config from preferences. [ocio] OCIO config is now: [ocio] /home/steffen/blender-git/build_linux_full/bin/4.3/datafiles/colormanagement/config.ocio [prefs] Path mappings have been loaded from "/home/steffen/.filmaura/mrv2.paths.prefs". [prefs] Loading hotkeys from "/home/steffen/.filmaura/mrv2.keys.prefs". ERROR: Net Exception ...which still displays 1.2.2 instead of 1.2.1 which should be main, right?

I then renamed the ~/.filmaura folder and it opened successfully.

After that I found that deleting only the "mrv2.ocio.json" file is sufficient.

SteffenDuenner commented 2 months ago

...and now after recompiling latest beta, it also works. So it seems the mrv2.ocio.json file contained some bogus info?!

ggarra13 commented 2 months ago

The version in main is correct, as I was preparing a release for this week.

However, the other thing is odd. The error you were getting was a network exception, as I started testing with (I'll come clean) adding support, yet unsuccessfully, for ComfyUI previews within mrv2.

The mrv2.ocio.json file has nothing to do with it, as it just stores OCIO presets.

SteffenDuenner commented 2 months ago

ComfyUI previews sounds intriguing ;)

I found some more strange things: If I open mrv2, open the Preferences, untick e.g. "Tool Dock" in "UI Elements" and click OK -> all is fine. Next time I start mrv2 the Tool Dock is gone.

But if I open the Preferences and tick "Single Instance" and press OK, mrv2 instantly closes down with the infamous "ERROR: Net Exception" and doesn't save the prefs.

ggarra13 commented 2 months ago

Ah!!!! Now it all makes sense!!! Single Instance ALSO opens a network port so that when you fire a new mrv2 it re-directs the image to the first opened mrv2 through a socket connection. For it to work, you need port 55120 open. In principle, on Linux, ports on the same machine (ie localhost or 127.0.0.1) should not need to set a hole in the firewall, but I am not sure how Linux Mint handles connections. If you are willing to work with me, we can probably try to debug it.

SteffenDuenner commented 2 months ago

Cool! I'll be glad to assist you with this :)

ggarra13 commented 2 months ago

Cool! I'll be glad to assist you with this :)

Excellent. Pull the latest beta and do:

runmeq.sh

Open Window->Preferences->UI and set the Single Instance switch. It should not exit this time, but hopefully it will print a more useful message.

From then on, we can check your machine's firewall to see if that's the issue.

SteffenDuenner commented 2 months ago

OK... it still exited but printed this:

ERROR: [listen] Connection refused: 127.0.0.1:55120
ERROR: Net Exception
SteffenDuenner commented 2 months ago

BTW my firewall is disabled:

sudo ufw status 
Status: inactive
ggarra13 commented 2 months ago

Okay. I tried it myself and was able to reproduce the error on my Ubuntu 24.04.4 LTS machine. I am not a network guy, so I'll have to do some digging and ask around.

ggarra13 commented 2 months ago

Do a git pull and try compiling:

runmeq.sh

and try again with the Single Instance setting. I think I fixed it now.

SteffenDuenner commented 2 months ago

Just gave it a try. Sadly same error

ERROR: Net Exception

ggarra13 commented 2 months ago

Okay, we are back to where we were. Now I have it working fine on my machine but not on yours. Again, do a git pull and runmeq.sh to see if we get some more info. I still don't understand where it is crashing.

SteffenDuenner commented 2 months ago

Sorry for the delay. I recompiled and now it's no longer quitting, only this error message:

ERROR: [app] Net Exception: Address already in use: 0.0.0.0:55120

...while I'm pretty sure there's nothing using this port already

ggarra13 commented 2 months ago

Maybe a zombie mrv2 is using the port (as it was crashing on you). Try running:

sudo netstat -tuln | grep 55120

or:

sudo ss -tuln | grep 55120

to see if the port is in use. And if so, then do:

sudo lsof -i :55120
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mrv2    12055  gga   42u  IPv4  55472      0t0  TCP *:55120 (LISTEN)
SteffenDuenner commented 2 months ago

Sorry but I had to leave early yesterday.

But there's a good chance that a zombie was still lurking. Now when I use the "Single Instance" option everything works fine and the console shows:

[listen] Server listening on port 55120

Thanks a lot