[MonoTouch] SDK 5 issue

Sergio Fadda sergio.fadda at logobject.ch
Wed Oct 19 12:03:15 EDT 2011


Oh, I've just added a simpler test-case in bugzilla... it is not 
necessary that background operation does anything... that is, the 'Main' 
method of NSOperation can be empty!

The strange thing is that, compiled with SDK 5.0, the application works 
under iOS 4.3 but not under iOS 5.0! I mean: I understand that the new 
GC is more aggressive, but the execution of the same application differs 
from one OS to the other!!

However, I've tried to create the same application in pure Objective-C 
(I even thought that was a iOS bug), but it works! Only a thing it is 
different from the managed application: to simplify the implementation 
I've used NSInvocationOperation instead of NSOperation.

In any case, thank you for the support!

Sergio

Il 19/10/2011 17:51, Jeff Stedfast ha scritto:
> On Wed, Oct 19, 2011 at 3:22 AM, Sergio Fadda<sergio.fadda at logobject.ch>  wrote:
>> Hi Jeff,
>>
>> thanks for the reply.
>>
>> Unfortunately the issue is present even if I click the button once; I said
>> "variable number of times" because sometimes it is needed one click, and
>> sometimes more clicks to replicate the issue.
> Ah! I'm sorry, I had misunderstood...
>
>> However, doesn't NSOperationQueue mantain a... queue? If so, every instance
>> of NSOperation should be referenced during the execution and removed from
>> the queue only when the operation finish... I guess!
> Yes, it does... but the problem is the it's the ObjectiveC code that
> holds a pointer to C# memory but the GC doesn't know that ObjectiveC
> is still using it, so it frees it.
>
> This is a source of a lot of confusion among MonoTouch users and one
> of our top runtime guys is working on figuring out a way to make this
> work more seamlessly.
>
>> Anyway, I tried to maintain my own NSOperation list that I populate before
>> adding the operation to the NSOperationQueue and the issue is still there!
> Okay, then it sounds like my original guess is wrong :-(
>
> I've created a new project and added your code to see if I can figure
> out what the real issue is, so far it has proven difficult.
>
> Jeff


-- 
------------------------------------------------------------------------

Ai sensi del Codice in materia di protezione dei dati personali (d.L.vo 
196/03 e successive modifiche ed integrazioni), il contenuto di questa 
email e degli eventuali allegati sono riservati e ad uso esclusivo del 
destinatario. Chiunque riceva questo messaggio per errore è pregato di 
distruggerlo e di contattare il mittente. Si informa inoltre che la 
risposta alla presente compresi eventuali allegati potrebbero essere 
visionati, ai fini del disbrigo delle competenze lavorative, anche da 
altro personale addetto.

This email and any files transmitted with it are confidential and solely 
for the use of the intended recipient. If you have received this email 
in error, please notify us immediately by email and permanently delete 
the email without reading, copying or disclosing its contents to any 
other person.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111019/e85b09e6/attachment.html 


More information about the MonoTouch mailing list