[Openmcl-devel] CCL Issue with Lion

Gary Byers gb at clozure.com
Thu May 2 17:19:38 PDT 2013

The behavior that you describe seems similar to that described in:


where the problem apparently had to do with (lack of proper) 
"entitlements".  (The owner of the
appliance - quaintly referred to as the "user" in some documents - might 
try to access the filesystem
on their "computer" otherwise.)

I have no idea why this would work on some systems that support 
sandboxing and not on others,
but I confess that I had some difficulty parsing your message. (There's 
more reason to think that
this is a Lion problem than that it's a Mountain Lion problem, but I 
don't know how anyone would
know for sure.)

There's no reason to think that this is not a CCL problem. There's no 
reason to think that it is a
CCL problem, either.  If a sandboxed ObjC program with exactly the same 
entitlements behaved
differently, then there'd at least be some reason to wonder why Cocoa 
methods called from CCL behave
differently than they do when called by that ObjC program.  My model of 
things is that those Cocoa methods
don't know or care what programming language their callers were compiled 
in, and I don't know of any
reason to think of that model as being incorrect.

Googling for "sandbox NSOpenPanel" indicates that many people have found 
that these things don't
interact as people expect them to and as the documentation suggests that 
they should, and that this
is often due to bugs in the underlying technology.   Some messages that 
one can easily find via that
Google search suggest that the forums on Apple's developer site offer a 
better explanation of what works
and what doesn't than one can easily find elsewhere.

On 5/2/13 3:32 PM, Michael Minerva wrote:
> We are experiencing another strange issue, this time it is related to 
> Lion and Sandboxing.  We initially noticed the issue when we tried to 
> test a sandboxed version of our app on Lion. Every time we would try 
> and launch an NSOpenPanel, it would stall for about 10 seconds, 
> nothing would come up and then the program would resume. The call to 
> runModal returns without ever bringing up the window and there is no 
> error in the console. In order to try and dissect this problem a 
> little further, we downloaded a fresh copy of the release version of 
> CCL and sandboxed both the 32bit and 64bit versions of CCL, when we 
> fired up these apps on Lion and simply tried to open a file (command O 
> or open... from the File menu) the same behavior we saw in our app 
> occurs in the sandboxed CCL I.E. the File menu is highlighted and 
> stalled for 10 seconds, no file chooser comes up and then it returns 
> without ever showing the chooser.  We have also tried this same 
> experiment with the most recent trunk of CCL and it exhibits the same 
> behavior.
> A few Notes:
> . This occurs only on Mountain Lion we have tested versions 10.7.2 
>  and 10.7.5 and it occurs on both
> . We have tested on Mountain Lion and Snow Leopard and this problem 
> does not occur (even with the sandboxed versions)
> . We have tried sandboxing with a valid certificate like this: 
> codesign -s "Developer ID Application: AgentSheets, Inc."   -f 
> --entitlements /Users/Mike/Desktop/AgentCubes\ 
> 1.02-Lite/AgentCubes32bit.app/Contents/AgentCubes.entitlements 
> /Users/Mike/ccldev15801/Clozure\ CL32.app
> . We have also tried sandboxing with no certificate like:  codesign -s 
>  - -f --entitlements /Users/Mike/Desktop/AgentCubes\ 
> 1.02-Lite/AgentCubes32bit.app/Contents/AgentCubes.entitlements 
> /Users/Mike/ccldev15801/Clozure\ CL64.app
> . Both the code signed and non code signed sandboxed apps exhibit the 
> issue
> . We have examined the code signed app with spctl to verify that it is 
> code signed with a valid certificate
> Here is a link to a sandboxed version of CCL 1.9 release:
> SandboxedCCL1.9-Release.zip 
> <http://www.cs.colorado.edu/%7Eralex/temp/SandboxedCCL1.9-Release.zip>
> When we open this version in Lion and goto File-> Open it exhibits the 
> issue (no file chooser comes up and the File menu stalls blue for ~10 
> seconds).  Could anyone else running Lion verify that they see the 
> same issue?  Anyone have any clues about what could be going on here?
> --Mike
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130502/cfe0bf1d/attachment.htm>

More information about the Openmcl-devel mailing list