Archive for December 5, 2014

Friday, December 5, 2014

Five Fixes for OS X 10.10 Yosemite

TidBITS:

It’s common advice to wait for the X.Y.1 release of a new version of OS X before upgrading, since Apple often fixes bugs that crop up at launch quickly. OS X 10.10.1 Yosemite has been out for a bit now, though, and while it is working fine for many people, there are still a variety of complaints making the rounds on the Internet. Here then is a collection of five problems and solutions (or at least workarounds) that we’ve either experienced or had reported to us.

Probably the most annoying bugs for me are crashes (mainly Mail, Safari, Spotlight, the Dropbox extension, and codesign), Notification Center not remembering hidden applications, and my DYMO label printer not working reliably.

Objective-C Debugging Cheat Sheet

Tim Ekl:

After some nudging from coworkers, I took some time and scraped together all the various private methods I could find (as well as a few suggested on Twitter) and combined them into one debugging cheat sheet, which I’m making available right here. Download it today, and suggest more!

Core Graphics Logging Input Data to /tmp Directory

Mozilla (via Jacob Garbe):

Security researcher Kent Howard reported an Apple issue present in OS X 10.10 (Yosemite) where log files are created by the CoreGraphics framework of OS X in the /tmp local directory. These log files contain a record of all inputs into Mozilla programs during their operation. In versions of OS X from versions 10.6 through 10.9, the CoreGraphics had this logging ability but it was turned off by default. In OS X 10.10, this logging was turned on by default for some applications that use a custom memory allocator, such as jemalloc, because of an initialization bug in the framework. This issue has been addressed in Mozilla products by explicitly turning off the framework's logging of input events. On vulnerable systems, this issue can result in private data such as usernames, passwords, and other inputed data being saved to a log file on the local system.

I have been using Firefox 33.1 and did not see any CGLog_ files on my Mac.

Xcode Consolation

Daniel Jalkut:

Those are the basics, but another trick, I believe it was called ret in Gdb, comes in handy often:

  • thread return – return immediately from the current stack frame

You could use this if you are stuck in some function that is crashed, for example, but you know that returning to the caller would allow the process to continue running as normal. Or, you could use it to completely circumvent a path of code by breaking on a function and bolting right out, optionally overriding the return value.

[…]

In fact, mucking about with system symbols is one of the great tricks of the console, and lldb’s built-in “breakpoint” command brings with it superpowers that can’t be touched by Xcode’s dumbed down GUI-based controls. For example, what if we wanted to set a breakpoint that would catch not only +controlTextColor, but any similar variation? Using lldb’s support for regular expression breakpoints, it’s a snap[…]

I fall into Group 4: appreciate the console for occasional tricks but mostly avoid the debugger entirely, in favor of logging and assertions added directly to my code. I am usually more concerned with figuring out what’s happening on a customer’s Mac than my own. So an interactive debugging session is usually not an option.

Mail to Self Share Extension

Dan Frakes:

A couple months back, I tweeted that the iOS 8 share-sheet extension I really wanted was one that would let me send myself an email—in other words, to share the current thing via email, but to have the resulting email message pre-addressed to me.

[…]

I’ve long wanted that, too. He found one called Mail to Self (App Store).

Unfortunately:

This may be a quirk with iOS 8’s share sheets, which are still quite buggy, but I’ve found that Mail To Self doesn’t show up as an option in some apps or contexts. For example, it doesn’t appear as an option in the Photos share sheet. I also don’t like that the extension sends your messages through its own mail server, instead of just using Mail on your device. (Maybe this is a limitation of extensions—I don’t know.)

It’s also worth noting that this is not a shortcut for e-mailing yourself through the iOS Mail app and your mail server. Rather, the e-mails are sent via Mandrill’s server.

Update (2014-12-05): From Frakes’ update, my guess is that the Photos limitation is due to the extension not yet declaring support for that media type.

Update (2014-12-27): Another problem I found is that the extension doesn’t work (or even report an error) when my iPhone doesn’t have a network connection, whereas if I use Mail it will queue the message and send it when a connection becomes available.