Launch Services problems on Panther (long)
Launch Services problems on Panther (long)
- Subject: Launch Services problems on Panther (long)
- From: Brian Bergstrand <email@hidden>
- Date: Thu, 8 Apr 2004 17:11:43 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a pretty standard Cocoa background application. It does the
work, while the part the user sees sets all of the prefs. When Panther
was released, some users started reporting that the background
application was failing to launch using the GUI. The GUI starts the bg
app by calling
[[NSWorkspace sharedWorkspace] launchApplication:path]
The path is obtained with: [[NSBundle mainBundle] pathForResource:
ofType:];
In the Console, these users will see the following error:
2004-04-07 15:08:36.030 ChangeDesktop[688] LSOpenFromURLSpec() returned
- - -10827 for application
/Applications/Utilities/ChangeDesktop.app/Contents/Resources/
ChangeDesktopDaemon.app path (null).
kLSNoExecutableErr = -10827, /* the executable is missing or
has an unusable format*/
This error seems to mean that the bundle's Info.plist is corrupt, or
something is wrong with the binary. But I can't see anything, and my
detective work doesn't seem to implicate those as problems.
When this problem was originally reported, only a very small subset of
users were having the problem, and we found out that using one of the
numerous "Cache Cleaner" utilities solved the problem temporarily. This
led me to think that the LaunchServices caches were corrupt.
Eventually, more users started reporting the problem (still a small
number overall though), and I had to come up with a more permanent
solution, so now if NSWorkspace fails, I now use NSTask to "manually"
launch the bg app and everything works fine. But, the error still
occurs for users who add the bg app to the "Startup Items" list for
their account. Instead of launching my app, loginwindow logs the same
error to the Console:
2004-04-08 15:24:37.533 loginwindow[256] LSOpenFromURLSpec return err =
- - -10827
Again, if the user removes the caches things start working and my bg
app is auto-launched, but after a while the problem returns. This
really seems to be a chronic problem of LS cache corruption.
On 10.2 and 10.1, this error never occurs. Either from my GUI app or
the system auto-launch.
Can someone from Apple tell me what causes LSOpenFromURLSpec() to
return this error? I disassembled the LS framework, but couldn't find
any instances of "10287" "or the hex equiv. "2a4b".
Here is my Info.plist for the bg app. I don't have a NSMainNibFile set
because the app doesn't have GUI. Could this be a problem (works fine
in 10.2 though).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>cdbgfind</string>
</array>
<key>CFBundleTypeName</key>
<string>CDBGFIND</string>
<key>CFBundleTypeRole</key>
<string>None</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>ChangeDesktopDaemon</string>
<key>CFBundleGetInfoString</key>
<string>ChangeDesktopDaemon 2.5 ,)2001-2004 Brian Bergstrand</string>
<key>CFBundleIconFile</key>
<string>ChangeDesktopDaemon.icns</string>
<key>CFBundleIdentifier</key>
<string>net.classicalguitar.brian.ChangeDesktopServer</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>ChangeDesktopDaemon</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.5 ,)2001-2004 Brian Bergstrand</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.5</string>
<key>LSBackgroundOnly</key>
<string>1</string>
<key>NSBGOnly</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string>CDApplication</string>
</dict>
</plist>
TIA for any help.
Brian Bergstrand <
http://www.bergstrand.org/brian/>, AIM: triryche206
PGP Key: <
http://www.bergstrand.org/brian/misc/public_key.txt>
If computers get too powerful, we can organize them into a committee --
that will do them in. - Bradley's Bromide
As of 05:10:23 PM, iTunes is playing "Soul To Squeeze" from "Greatest
Hits" by "Red Hot Chili Peppers"
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3
iQA/AwUBQHXAEXnR2Fu2x7aiEQKFJQCgvzi7HqCKya5mRaD6W0L8CcWM1loAn2qN
rMjO/SVwqN+RroNIieD/a2r8
=KFvB
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.