Help! Crash in Sierra when using setUsesInspectorBar

Does someone have an idea why this, when using in an Open event of a TextArea, crashes on Sierra with an “overreleased” error?

declare function documentView lib CocoaLib selector "documentView" (obj_id as Integer) as Ptr declare sub setUsesInspectorBar lib CocoaLib selector "setUsesInspectorBar:" (obj_id as Ptr, value as Boolean) setUsesInspectorBar (documentView(me.Handle), true)

This code is used in macoslib, see https://github.com/macoslib/macoslib/issues/203

Happens with 2016r3 as well as with 2012r2.1

maybe this http://stackoverflow.com/questions/39629362/nstextview-inspector-bar-crash-on-sierra-10-12

Looks like you may have found a bug in Sierra.

The TextEdit app works OK with the inspector bar so maybe not Sierra??

I tried it with NSTextViewMBS.usesInspectorBar = true

This also causes the same crash.

The TextEdit app is probably 64 bit. The error seems to be related to 32 bit builds.

However, my Xcode-made test app doesn’t crash in 32 bit, either, which would still suggest that this could be a bug in Xojo’s framework until proven otherwise.

Curiously, the crash does not occur when building my test app in 64 bit mode with Xojo.

So, it’s limited to 32 bit apps.

FWIW, here’s text projects for Xojo and Xcode. If someone can make the Xcode version crash, I’ll accept that it’s an Apple bug. Until then, it may be a Xojo bug.

http://files.tempel.org/tmp/TextArea-Crash.zip

The Xojo version crashes hard. The XCode version doesn’t.

Okay - I’ve just updated the Xcode project by adding a checkbox to toggle the property easily. The Xcode version DOES crash if you toggle it on twice.

Conclusion: A clear bug in Sierra, not in Xojo.
Work-around: Use a 64 bit build. No other work-arounds known at this time.

I’ve reported this to Apple now: http://www.openradar.me/radar?id=5005564551626752

After months of tracking down some Core Image issues in 32-bit, I finally had an engineer tell me that unofficially anything other than 64-bit Cocoa is deprecated, basically tell me that my bug will not be investigated or fixed.

Moving to 64-Bit and I found another bug in Core Image, but thankfully I also found a workaround for that bug.

If you’re not already considering it, now might be the right time to consider migrating to 64-Bit.

What irks me the most; if they don’t want to support 32-Bit anymore that’s fine, just stop breaking it!