dustinrue/ControlPlane — Issue #111: Screensaver actions cause loginwindow crashes
Author: djbe
Created: 2012-01-05 00:48:48+00:00
State: open
Labels: Action, Bug

Mentioned in issue #110 by __solefald__

> Also (not sure if ControlPlane related), I have an action to enable/disable screensaver password, and change screensaver time between Home and Work contexts. When I bring the laptop home, first thing that happens is a loginwindow crash as soon as the laptop wakes up. I get a blank screen with backlight and a mouse pointer, so i have to ssh in from my iPad or another computer and restart loginwindow. Sometimes I see a blue background for a few seconds and then loginwindow crashes. If i disable screensaver actions, this does not happen. Funny thing though, this only happens at home. I only had it happen once at work. Perhaps my thunderbolt display has something to do with it....

The bug might be because of the following lines of code:

CFMessagePortRef port = CFMessagePortCreateRemote(NULL, CFSTR("com.apple.loginwindow.notify"));
success = (CFMessagePortSendRequest(port, 500, 0, 0, 0, 0, 0) == kCFMessagePortSuccess);

Possible solutions:

1. Find out what this code does (we don't know for now)
2. Find an alternative to this code