Opened 13 days ago

Last modified 12 days ago

#70689 reopened defect

MyPaint @2.0.1_1: Crashes on startup; after rebuilding from source, RuntimeError: Unknown install type; could not determine paths

Reported by: RobK88 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: elcapitan Cc: ryandesign (Ryan Carsten Schmidt), danchr (Dan Villiom Podlaski Christiansen)
Port: MyPaint py38-pyobjc

Description

The binary in the MyPaint package downloaded from Macports crashes on my Mac running El Capitan with a Segmentation Fault 11.

grinch$ myPaint
INFO: mypaint: Installation layout: conventional POSIX-like structure with prefix '/opt/local/Library/Frameworks/Python.framework/Versions/3.8'
WARNING: gui.userconfig: Failed to load settings file: /Users/grinch/.config/mypaint/settings.json
WARNING: gui.userconfig: Failed to load settings: using defaults
INFO: gui.main: No locale setting found, using system locale
Segmentation fault: 11

So I uninstalled MyPaint and built it from source:

sudo port -vs install mypaint

etc 
etc

--->  Cleaning MyPaint
--->  Removing work directory for MyPaint
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

It built just fine. But now I get a different runtime error:

grinch$ myPaint
CRITICAL: mypaint: Installation layout: unknown!
Traceback (most recent call last):
  File "/opt/local/bin/myPaint", line 293, in <module>
    = get_paths()
  File "/opt/local/bin/myPaint", line 210, in get_paths
    raise RuntimeError("Unknown install type; could not determine paths")
RuntimeError: Unknown install type; could not determine paths

Attachments (1)

crash_report.txt (66.9 KB) - added by RobK88 12 days ago.

Download all attachments as: .zip

Change History (8)

comment:1 in reply to:  description Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted
Summary: MyPaint - Crashes on StartupMyPaint @2.0.1_1: Crashes on startup; after rebuilding from source, RuntimeError: Unknown install type; could not determine paths

Replying to RobK88:

The binary in the MyPaint package downloaded from Macports crashes on my Mac running El Capitan with a Segmentation Fault 11.

grinch$ myPaint
INFO: mypaint: Installation layout: conventional POSIX-like structure with prefix '/opt/local/Library/Frameworks/Python.framework/Versions/3.8'
WARNING: gui.userconfig: Failed to load settings file: /Users/grinch/.config/mypaint/settings.json
WARNING: gui.userconfig: Failed to load settings: using defaults
INFO: gui.main: No locale setting found, using system locale
Segmentation fault: 11

I'm not sure why it crashed but macOS should have generated a crash log in ~/Library/Logs/DiagnosticReports; if you attach it, maybe it gives a clue about what the problem was.

So I uninstalled MyPaint and built it from source:

sudo port -vs install mypaint

etc 
etc

--->  Cleaning MyPaint
--->  Removing work directory for MyPaint
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

It built just fine. But now I get a different runtime error:

grinch$ myPaint
CRITICAL: mypaint: Installation layout: unknown!
Traceback (most recent call last):
  File "/opt/local/bin/myPaint", line 293, in <module>
    = get_paths()
  File "/opt/local/bin/myPaint", line 210, in get_paths
    raise RuntimeError("Unknown install type; could not determine paths")
RuntimeError: Unknown install type; could not determine paths

The binary of MyPaint that we produced for macOS 12 Monterey works fine on my system. I'm surprised to see from the port's file list for macOS 14 Sonoma at https://ports.macports.org/port/MyPaint/details/ that it installs 891 files while on earlier systems it installs 752 files. This shouldn't differ by OS version so something must have changed in MacPorts that causes it to generate a different set of files now (where "now" is January 19, 2024 when we made the Sonoma binary for arm64) than it did when we generated the macOS 13 Ventura arm64 binary (which was March 6, 2023). Indeed, after I rebuilt from source on Monterey, the port now installs 891 files and now I can reproduce your "Unknown install type" error.

So yes, something has broken MyPaint. One change that occurred between those dates that has broken many other Python ports is that python.pep517 is now yes ([3173d46b9a29bc9d79ddb6970e7f083ebe3f79c0/macports-ports]) whereas before it was no. Setting it back to no and rebuilding fixes the problem for me, so I'll commit that shortly.

Last edited 13 days ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

In 30b1e1ededbbc9be5937fdecb4b6c1cd4bef2494/macports-ports (master):

MyPaint: Don't use pep517

Fixes failure to launch.

Closess: #70689

comment:3 Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

comment:4 Changed 12 days ago by RobK88

@ryandesign -- I installed myPaint @2.0.1_2. MacPorts built it from source. But it still crashes on El Capitan... I will attach the crash report.

grinch$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G22010

grinch$ port installed mypaint
The following ports are currently installed:
  MyPaint @2.0.1_1
  MyPaint @2.0.1_2 (active) 
 
grinch$ MyPaint
INFO: mypaint: Installation layout: conventional POSIX-like structure with prefix '/opt/local/Library/Frameworks/Python.framework/Versions/3.8'
WARNING: gui.userconfig: Failed to load settings file: /Users/grinch/.config/mypaint/settings.json
WARNING: gui.userconfig: Failed to load settings: using defaults
INFO: gui.main: No locale setting found, using system locale
Segmentation fault: 11

Changed 12 days ago by RobK88

Attachment: crash_report.txt added

comment:5 Changed 12 days ago by RobK88

It looks like MyPaint is not creating the config file.

grinch$ cat /Users/grinch/.config/mypaint/settings.json
cat: /Users/grinch/.config/mypaint/settings.json: No such file or directory

grinch$ cd /Users/grinch/.config/mypaint/
-bash: cd: /Users/grinch/.config/mypaint/: No such file or directory

comment:6 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Ok, it's crashing in PyObjC_ffi_closure_alloc (presumably before it has had a chance to make config files). I don't know what to do about that crash. You could report it to the developers of MyPaint and see if they have any suggestions.

comment:7 Changed 12 days ago by jmroot (Joshua Root)

Cc: danchr added
Port: py38-pyobjc added
Note: See TracTickets for help on using tickets.