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

CoreGraphics error prevents startup - OSX 10.7 #437

Closed
SuperiorMonkey opened this issue Nov 17, 2015 · 4 comments
Closed

CoreGraphics error prevents startup - OSX 10.7 #437

SuperiorMonkey opened this issue Nov 17, 2015 · 4 comments
Labels
bug Confirmed to be a bug macOS Mac-specific issue

Comments

@SuperiorMonkey
Copy link

v1.16.2 / OSX 10.7.5

Same problem as seen on a previous Parallax version.

Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]: Traceback (most recent call last):
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "/Applications/pyfa.app/Contents/Resources/__boot__.py", line 355, in <module>
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:     _run()
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "/Applications/pyfa.app/Contents/Resources/__boot__.py", line 336, in _run
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:     exec(compile(source, path, 'exec'), globals(), globals())
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "/Applications/pyfa.app/Contents/Resources/pyfa.py", line 99, in <module>
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:     import wx
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "wx/__init__.pyc", line 45, in <module>
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "wx/_core.pyc", line 4, in <module>
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "wx/_core_.pyc", line 14, in <module>
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   File "wx/_core_.pyc", line 10, in __load
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]: ImportError: dlopen(/Applications/pyfa.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so, 2): Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   Referenced from: /Applications/pyfa.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so
Nov 17 20:48:18 TheOctoBeast [0x0-0x2e82e8].org.evefit.pya[22432]:   Reason: image not found
Nov 17 20:48:18 TheOctoBeast pyfa[22432]: pyfa Error
Nov 17 20:48:20 TheOctoBeast com.apple.launchd.peruser.502[183] ([0x0-0x2e82e8].org.evefit.pya[22432]): Exited with code: 255

The problem here is fairly simple to figure out. /System/Library/Frameworks/CoreGraphics.framework does not exist in 10.7.5. Several things there as Core*, but no Graphics.

A quick googling explains the problem. In 10.7, CoreGraphics is inside the ApplicationSupport framework. Precise path is:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/
I don't know how hard it is to get python to check that location if the standard one fails, but I can assure you that upgrading past 10.7.5 isn't an option for me. Incompatible BIOS, the only workaround I found involved hacking kernel files. 💥

@blitzmann blitzmann added the macOS Mac-specific issue label Nov 17, 2015
@blitzmann
Copy link
Collaborator

I was able to get 10.7.3 on a VM, and can definitely reproduce this problem.

I am unfortunately not versed well enough with how mac works internally (such as their concept of Frameworks etc) or how these options differ from version to version to come to a good conclusion at the moment. Conversly, I'm also not well versed how libraries are linked when the binaries are built (and again, how these might differ between versions)

Please subscribe to #289 if you haven't already - I will be posting progress and calls for testing new mac builds on that issue.

@blitzmann blitzmann added the bug Confirmed to be a bug label Nov 20, 2015
@blitzmann blitzmann mentioned this issue Nov 22, 2015
@blitzmann
Copy link
Collaborator

Please check here and report #289 (comment)

@SuperiorMonkey
Copy link
Author

I was doing some research earlier, and it appears that the problem is with your compiler. To explain: Frameworks are just dynamic libraries with some nifty features added, like the ability to package header and nib files with the libraries, and the fact that multiple apps can use a single instance of the framework loaded into active memory.

Paths to frameworks are supposed to be done automatically by the compiler, and I found a reference that said that python is capable of using multiple framework locations for backwards compatibility. However, as the Apple dev docs state, "When you build an application or other executable, the compiler looks for frameworks in/System/Library/Frameworks as well as any other location specified to the compiler." Which sounds like you should be able to make a 10.10 compile that's backwards compatible with 10.7 and its different location, but the compiler will need some manner of flag informing it to look in two places for CoreGraphics.

I will continue this in the 289 thread, as there appear to be people there who know rather more than I do about this. :)

@blitzmann blitzmann changed the title OSX Parallax version wx3 does not start up - 10.7.5 CoreGraphics error prevents startup - OSX 10.7 Nov 23, 2015
@blitzmann
Copy link
Collaborator

I'm closing this issue as we now have mac binaries that seem to work well. If problem persists wi the next release, please reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed to be a bug macOS Mac-specific issue
Projects
None yet
Development

No branches or pull requests

2 participants