[Openmcl-devel] Strange delayed crashes after loading storekit

Michael Minerva minerva at agentsheets.com
Mon Jun 24 12:55:07 PDT 2013


Hey Paul,

Thanks for your response.

I tried your suggestion of commenting out all of the release (there were only a few) but it still crashes the same way in the new application.

I have also included my StoreKit.lisp file, if you want to take a look I would of course appreciate any ideas you have. The objc method "loadStore" gets called from applicationDidFinishLaunching in the app I sent out. Also, the callbacks requestDidFinish: and productsRequest:didReceiveResponse:  get called by the appStore as a result of the start in requestProductData. None of the other methods get called in my test app because we are not actually initiating a purchase (by calling purchase-upgrade). 

Thanks again for taking a look,

--Mike

On Jun 24, 2013, at 12:19 PM, Paul Krueger <plkrueger at comcast.net> wrote:

> Michael,
> 
> I downloaded the app and ran it several times with different problems each time. The third time I couldn't get it to fail at all!
> 
> From my own experience this variability of results screams of a memory management issue somewhere. If it only happens after you have used an SKProductsRequest object, then I'd certainly look there. I think it's highly likely that you either failed to retain something that you should have, prematurely released something, or released something multiple times (perhaps something like one explicit release and another autorelease or something funky like that). Start by removing all release and autorelease calls in the SKProductsRequest code (allowing memory leaks for now) and see if you can make the problem disappear that way. If that works, gradually add them back until you have identified the culprit.
> 
> If you want to send the code relating to the SKProductsRequest use to me just to have a second pair of eyes look at, feel free to do so.
> 
> Paul
> 
> On Jun 24, 2013, at 11:53 AM, Michael Minerva <minerva at agentsheets.com> wrote:
> 
>> Great news! AgentCubes, our tool for the teaching and learning of
>> computer science built with CCL, has been approved for sale on the Mac
>> app store.
>> 
>> Sadly, an important point of integration between our App and the store
>> is troubled. We're attempting to integrate with the StoreKit framework
>> to set up an in-app purchase, and we're experiencing some very strange
>> crashes.
>> 
>> In the StoreKit framework, there is an objc object called
>> SKProductsRequest which is an asynchronous mechanism for getting Mac
>> app store product information. We have to use this object to set up
>> and perform in-app purchases. (get money)
>> 
>> We are able to alloc, init, and make use of this object seemingly
>> without problems. However, some time later (between 5 and 60 seconds)
>> the app becomes very unstable and will crash seemingly randomly. The
>> crashes are all related to either heavily threaded portions of the app
>> or mouse events.
>> 
>> We have spent a few days investigating these crashes, but they remain
>> scrutable to us, and we need your help.
>> 
>> We have built a test application which exhibits the crash. Could you
>> experience the crash for yourself, and potentially help us figure out
>> what's going on? 
>> 
>> It's easy to reproduce:
>> 1) Unzip and start the app (it will only run on Lion and Mountain Lion)
>> - Download from: http://agentsheets.com/temp/AgentCubes.zip
>> 2) Enter the credentials for the app store:
>> - CCLSandboxTest at gmail.com
>> - CCLs4ndbox
>> 3) When the app starts, you will see a simple scrolling view
>> 4) hover over the scrolling view, and scroll your scroll wheel
>> - After a while (5 to 60 seconds of scrolling) the app will hang
>> 5) Look in the OSX console
>> - Often times there are stack traces printed, when the app crashes in
>> a mouse event handler or other threaded error handler
>> - Sometimes nothing is printed in the console.
>> 
>> Thanks again for all your help. We're really looking forward to being
>> able to leverage the Mac app store to spread our tool. CCL has been an
>> absolutely great and expressive environment for us to build AgentCubes
>> in.
>> 
>> 
>> 
>> _______________________________________________
>> 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/20130624/de833a31/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StoreKit.lisp
Type: application/octet-stream
Size: 8220 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130624/de833a31/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130624/de833a31/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2559 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130624/de833a31/attachment.bin>


More information about the Openmcl-devel mailing list