SkiaSharp: [BUG] Crashing on OS X 10.7 (dyld errors)

Description

Apps that use SkiaSharp cannot be run on OS X 10.7. They crash when loading the library:

Process:         iCircuit [172]
Path:            /Users/USER/Desktop/iCircuit.app/Contents/MacOS/iCircuit
Identifier:      com.kruegersystems.circuitmac
Version:         1.10 (110001)
Code Type:       X86-64 (Native)
Parent Process:  launchd [100]

Date/Time:       2019-02-01 14:22:38.871 -0800
OS Version:      Mac OS X 10.7 (11A511)
Report Version:  9

Interval Since Last Report:          178 sec
Crashes Since Last Report:           1
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      CDA1250A-D272-4A3C-AEFB-738C8BC101E3

Crashed Thread:  0

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
  Referenced from: /Users/USER/Desktop/iCircuit.app/Contents/MacOS/../MonoBundle/libSkiaSharp.dylib
  Reason: image not found

Code

Any code that uses SkiaSharp.

Expected Behavior

The library works.

Actual Behavior

It crashes with the above error.

Basic Information

  • Version with issue: 1.68.0
  • IDE: Visual Studio for Mac
  • Platform Target Frameworks:
    • macOS:

VS bug #795469

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

If I drop the version to 10.7, will it still work on 10.8+? IS there some redirection to let the new platforms know that the framework has moved?

Yes, when targeting 10.7, libSkiaSharp.dylib will load /System/Library/Frameworks/ApplicationServices.framework/Versions/Current/ApplicationServices and on 10.8 and later, ApplicationServices will automatically load CoreGraphics:

$ otool -L /System/Library/Frameworks/ApplicationServices.framework/Versions/Current/ApplicationServices | grep CoreGraphics
	/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1070.22.1)