Skip to content

Monobjc 6.0.2710.0 crashes on OS X versions prior to Mavericks #432

@lemonmojo

Description

@lemonmojo

Since upgrading to Monobjc 6.0.2710.0 any Monobjc application crashes instantly upon launch when running on any OS X version prior to Mavericks.

Here's the console output from a new application created with the Xamarin Studio Monobjc Console App Template:

MonobjcPreMountainLionTest[265:707] -[NSProcessInfo operatingSystemVersion]: unrecognized selector sent to instance 0x7b32f6e0

Unhandled Exception:
Monobjc.ObjectiveCException: -[NSProcessInfo operatingSystemVersion]: unrecognized selector sent to instance 0x7b32f6e0
  at (wrapper managed-to-native) Monobjc.ObjectiveCRuntime:BootstrapInternal (string)
  at Monobjc.ObjectiveCRuntime.Bootstrap (System.String domainToken) [0x00000] in <filename unknown>:0 
  at Monobjc.ObjectiveCRuntime.Initialize (System.String domainToken) [0x00000] in <filename unknown>:0 
  at MonobjcPreMountainLionTest.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: Monobjc.ObjectiveCException: -[NSProcessInfo operatingSystemVersion]: unrecognized selector sent to instance 0x7b32f6e0
  at (wrapper managed-to-native) Monobjc.ObjectiveCRuntime:BootstrapInternal (string)
  at Monobjc.ObjectiveCRuntime.Bootstrap (System.String domainToken) [0x00000] in <filename unknown>:0 
  at Monobjc.ObjectiveCRuntime.Initialize (System.String domainToken) [0x00000] in <filename unknown>:0 
  at MonobjcPreMountainLionTest.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

To me it looks like 3d42143 is the culprit. Since -[NSProcessInfo operatingSystemVersion] is only available since Yosemite it can't be used on older versions. Interestingly it works just fine on a fully patched Mavericks machine. But anything below that, exhibits the crash mentioned above. My guess is that one of the recent Mavericks patches brought support for the property but it probably won't be available on a vanilla installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions