ggarra13/mrv2

MacOS [v1.1.3] - `png` framework missing

p2or opened this issue · 27 comments

p2or commented

Hi @ggarra13,

I just downloaded v1.1.3 and unfortunately it crashes immediately on startup:

Process:               mrv2 [17637]
Path:                  /Applications/mrv2.app/Contents/MacOS/mrv2
Identifier:            mrv2
Version:               ???
Code Type:             X86-64 (Translated)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-04-21 08:38:56.8834 +0200
OS Version:            macOS 14.4.1 (23E224)
Report Version:        12
Anonymous UUID:        FA1F6862-B7C0-81AE-345F-E7B6CE90233E

Sleep/Wake UUID:       89A6A418-D693-4FB8-8B7E-9D5027EF9D58

Time Awake Since Boot: 89000 seconds
Time Since Wake:       615 seconds

System Integrity Protection: enabled

Notes:
PC register does not match crashing frame (0x0 vs 0x203803A78)

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace DYLD, Code 1 Library missing
Library not loaded: @rpath/png.framework/Versions/1.6.43/png
Referenced from: <5EAC5D75-3C77-353F-BED6-F624D6E4E11D> /Applications/mrv2.app/Contents/Resources/bin/mrv2
Reason: tried: '/Applications/mrv2.app/Contents/Resources//lib/png.framework/Versions/1.6.43/png' (no such file), '/Users/gga/code/applications/mrv2/BUILD-Darwin-amd64/Release/install/lib/png.framework/Versions/1.6.43/png' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/gga/code/applications/mrv2/BUILD-Darwin-amd64/Release/install/lib/png.framework/Versions/1.6.43/png' (no such file), '/usr/local/lib/png.framework/Versions/1.6.43/png' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/png.framework/Versions/1.6.43/png' (no such file), '/Users/gga/code/applications/mrv2/BUILD-Darwin-amd64/Release/install/lib/png.framework/Versions/1.6.43/png' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/gga/code/applications/mrv2/BUILD-Darwin-amd64/Release/install/lib/png.framework/Versions/1.6.43/png' (no such fi
(terminated at launch; ignore backtrace)

...

Good news is that version 1.1.2 works however. If you need more information on this, please let me know.

Cheers,
Christian

SIgh. By trying to fix a Linux bug I messed up the macOS builds. Here's.a new version of v1.1.3 that I hope should work:

https://mega.nz/file/iWgmFAZL#yy2UF6uZ90cqMHZK6a_sHJj9c1_2Bo3q0Juslt1VmOc

Let me know asap if it works for you so I update the release.

p2or commented

Hi @ggarra13,

yeah! No more crash on startup, but the Python console pops up immediately and there are now errors:

ERROR:root:code for hash blake2b was not found.
Traceback (most recent call last):
  File "/Applications/mrv2.app/Contents/Resources/lib/python3.11/hashlib.py", line 307, in <module>
    globals()[__func_name] = __get_hash(__func_name)
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/mrv2.app/Contents/Resources/lib/python3.11/hashlib.py", line 129, in __get_openssl_constructor
    return __get_builtin_constructor(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/mrv2.app/Contents/Resources/lib/python3.11/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type blake2b
ERROR:root:code for hash blake2s was not found.
Traceback (most recent call last):
  File "/Applications/mrv2.app/Contents/Resources/lib/python3.11/hashlib.py", line 307, in <module>
    globals()[__func_name] = __get_hash(__func_name)
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/mrv2.app/Contents/Resources/lib/python3.11/hashlib.py", line 129, in __get_openssl_constructor
    return __get_builtin_constructor(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Applications/mrv2.app/Contents/Resources/lib/python3.11/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type blake2s
Screenshot 2024-04-22 at 08 27 23

New issue on this?

Cheers,
Christian

I am not getting that. I'll check again with a clean install.

On the meantime, can you send me the full output of the stack trace (as the actual error is at the bottom of the printout)? You should be able to select the stack trace and copy and paste it to a text editor by doing CMD + 'c' in the selected python output window and CMD + 'v' in your github response to this message.

p2or commented

Hi @ggarra13! Sure, I updated the old comment with the full stack trace. If you need more information on this, please let me know. Cheers, Christian

Ok. I still have been unable to reproduce it, but I can guess what's causing it.

With the finder or using the terminal go to:

/Applications/mrv2.app/Contents/Resources/python/plug-ins/

remove or move the update-mrv2.py script to a directory that is not the plug-ins directory.

That should fix the start up issues for the time being.

I've updated the macOS amd64 release of v1.1.3 on github and sourceforge. Give it a go and let me know if you still get the python error.

p2or commented

Hi @ggarra13,

great! If I remove update-mrv2.py, the blake2b error message no longer appears. I would leave it up to you closing the issue, otherwise just let me know.

Cheers,
Christian

Can you try downloading again v1.1.3 from github or sourceforge and try it again (without removing update-mrv2.py)? I found an inconsistency which might have been the real cause of the problem. If it doesn't fix it, just remove the update-mrv2.py why I take a week or two investigate further.

p2or commented

Already tested with your updated release from 7 hours ago and still getting the blake2b error message...

Can you test this update-mrv2.py file for me? Place it in the python/plug-ins directory. It will not barf at start up. Then run Help->Update mrv2. It may print the same errors on the python output, but... if it opens a window for updating mrv2, we can close this issue.
update-mrv2.zip

p2or commented

Sure, with pleasure. When I replace the file, the error is gone at startup, but when I go to Help > Update, the python console pops up and it is there again. Does this help?

On a fresh mrv2, Can you open the python panel and run each one of these commands one at a time:

import _blake2
import hashlib
import requests

If an error appears, tell me after which import did it appear and paste it here?

p2or commented

No problem. When I run import _blake2 in the console, I immediately get:

ImportError: dlopen(/Applications/mrv2.app/Contents/Resources/lib/python3.11/lib-dynload/_blake2.cpython-311-darwin.so, 0x0002): Library not loaded: /usr/local/opt/libb2/lib/libb2.1.dylib
  Referenced from: <32112436-2AA4-33DC-9833-A2DDDF05821D> /Applications/mrv2.app/Contents/Resources/lib/python3.11/lib-dynload/_blake2.cpython-311-darwin.so
  Reason: tried: '/Applications/mrv2.app/Contents/Resources//lib/libb2.1.dylib' (no such file), '/libb2.1.dylib' (no such file), '/usr/local/opt/libb2/lib/libb2.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libb2/lib/libb2.1.dylib' (no such file), '/usr/local/opt/libb2/lib/libb2.1.dylib' (no such file), '/Applications/mrv2.app/Contents/Resources//lib/libb2.1.dylib' (no such file)

At:
  <string>(3): <module>

No errors when importing the other modules though. Does this help?

Yes. It helps a lot! On a terminal, do:

brew install libb2

Then run Help->Update mrv2. It should open a requester (cancel it). We found it! I know now what I have to fix.

p2or commented

Yeah! Not sure whether this is good news, butlibb2 was already installed on my machine.

% brew install libb2
% libb2 0.98.1 is already installed and up-to-date.

Does this perhaps lead to potential conflicts?

No. You have the same version I have. Try:

brew link libb2

No, you are right. _blake2 is looking for libb2.1.dylib not libb2 0.98.1. I have to check....

I have both libraries. When I compiled python it picked up libb2.1.dylib instead of libb2 0.98.1.

Sorry. I just checked. libb2 0.98.1 actually points to libb2.1.dylib,so you should be safe. run

brew link libb2

I think someone at Apple made a mess in brew. I'll fix it in the release.

This is what I have in;

$ ls /usr/local/Cellar/libb2/0.98.1/lib/
libb2.1.dylib	libb2.a		libb2.dylib	pkgconfig/

And in:

$ ls /usr/local/opt/libb2/lib 
libb2.1.dylib	libb2.a		libb2.dylib	pkgconfig/

Do you have the same?

Fixed in GitHub and Sourceforge v1.1.3.

p2or commented

Do you have the same?

Unfortunately not, my Cellar folder is under /opt/homebrew/Cellar/libb2/0.98.1/lib

ls /opt/homebrew/Cellar/libb2/0.98.1/lib 
libb2.1.dylib	libb2.a		libb2.dylib	pkgconfig

% ls /usr/local/opt/libb2/lib 
% ls: /usr/local/opt/libb2/lib: No such file or directory

% ls /usr/local/Cellar/libb2/0.98.1/lib/
% ls: /usr/local/Cellar/libb2/0.98.1/lib/: No such file or directory

The issue should be fixed in GitHub and Sourceforge's new update of v1.1.3.

p2or commented

Can confirm, no errors in the latest and greatest. Thanks for your quick fix, cheers!