Re: How to debug and test a quick look generator?
Re: How to debug and test a quick look generator?
- Subject: Re: How to debug and test a quick look generator?
- From: John Brownie <email@hidden>
- Date: Thu, 12 Mar 2015 12:29:57 +1000
On Thu Mar 12 2015 00:55:25 GMT+1000 (PGT) Steve Mills wrote:
On Mar 11, 2015, at 02:34:38, John Brownie <email@hidden> wrote:
Thank you, that gets me to the next step. Unfortunately, I don't get much further, getting these errors:
2015-03-11 17:31:43.436 qlmanage[36975:3297242] Cannot find function pointer QuickLookGeneratorPluginFactory for factory 5CCEA6DE-84B7-47FC-A694-E8EA6449EB85 in CFBundle/CFPlugIn 0x7f8eb8553ac0 </Users/john/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug/xxx.qlgenerator> (bundle, loaded)
That sounds like you haven't completely set up your project correctly. Or not - QuickLook debugging can be flaky at times. What happens if you run it similarly from Terminal? Put some printfs or NSBeeps or something to signal that it has run in your plugin's functions. Look for printfs and other messages in Console.
Yes, I get similar messages when I run it from terminal:
Testing Quick Look preview with files:
<test file>
Got xpc error message: Connection invalid
2015-03-12 12:23:55.130 qlmanage[41172:3680294] *** CFMessagePort:
bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port =
0xaa43, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2015-03-12 12:23:55.132 qlmanage[41172:3680294] *** CFMessagePort:
bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port =
0x440f, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2015-03-12 12:23:55.132 qlmanage[41172:3680294] Failed to allocate
communication port for com.apple.CFPasteboardClient; this is likely due
to sandbox restrictions
2015-03-12 12:23:55.137 qlmanage[41172:3680294] *** CFMessagePort:
bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port =
0xad67, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
I get this in the console:
12/03/2015 12:23:55.077 com.apple.xpc.launchd[1]:
(com.apple.xpc.launchd.user.501.100040.Aqua) Caller not allowed to
perform action: qlmanage.41172, action = pid-local registration, code =
1: Operation not permitted, uid = 501, euid = 501, gid = 20, egid = 20,
asid = 100040
12/03/2015 12:23:55.128 com.apple.xpc.launchd[1]:
(com.apple.xpc.launchd.user.501.100040.Aqua) Caller not allowed to
perform action: qlmanage.41172, action = pid-local registration, code =
1: Operation not permitted, uid = 501, euid = 501, gid = 20, egid = 20,
asid = 100040
12/03/2015 12:23:55.131 com.apple.xpc.launchd[1]:
(com.apple.xpc.launchd.user.501.100040.Aqua) Caller not allowed to
perform action: qlmanage.41172, action = pid-local registration, code =
1: Operation not permitted, uid = 501, euid = 501, gid = 20, egid = 20,
asid = 100040
12/03/2015 12:23:55.132 qlmanage[41172]: Failed to allocate
communication port for com.apple.CFPasteboardClient; this is likely due
to sandbox restrictions
12/03/2015 12:23:55.135 com.apple.xpc.launchd[1]:
(com.apple.xpc.launchd.user.501.100040.Aqua) Caller not allowed to
perform action: qlmanage.41172, action = pid-local registration, code =
1: Operation not permitted, uid = 501, euid = 501, gid = 20, egid = 20,
asid = 100040
12/03/2015 12:23:55.188 sandboxd[332]: ([41172]) qlmanage(41172) deny
mach-register com.apple.axserver (per-pid)
12/03/2015 12:23:55.197 sandboxd[332]: ([41172]) qlmanage(41172) deny
mach-register com.apple.tsm.portname (per-pid)
12/03/2015 12:23:55.205 sandboxd[332]: ([41172]) qlmanage(41172) deny
mach-register com.apple.CFPasteboardClient (per-pid)
12/03/2015 12:23:55.213 sandboxd[332]: ([41172]) qlmanage(41172) deny
mach-register com.apple.coredrag (per-pid)
12/03/2015 12:23:57.027 CoreServicesUIAgent[38944]: unexpected message
<OS_xpc_error: <error: 0x7fff792c3c60> { count = 1, contents =
"XPCErrorDescription" => <string: 0x7fff792c3f70> { length = 18,
contents = "Connection invalid" }
}>
I put a printf in every routine in main.c, and none appear, so it's just
never getting called. If I run nm on the executable and search for
Quick, I get:
000000000011dbe0 t _AllocQuickLookGeneratorPluginType
000000000011dcb0 t _DeallocQuickLookGeneratorPluginType
000000000011df60 t _QuickLookGeneratorPluginAddRef
000000000011e010 t _QuickLookGeneratorPluginFactory
000000000011dfa0 t _QuickLookGeneratorPluginRelease
000000000011dd20 t _QuickLookGeneratorQueryInterface
So it appears to be there. I can't see what else to change in the plist.
I tried qlmanage -r to reset the system, but it didn't help.
John
--
John Brownie, email@hidden or email@hidden
Summer Institute of Linguistics | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden