Comment 3 for bug 392342

Revision history for this message
In , Chris Halse Rogers (raof) wrote :

For added strangeness that will possibly help you track this down I have the following snippets of my attempts to work around this bug in the GNOME Do plugins code:

This snippet builds:
Services.Application.RunOnThread ( () => {
 /* Mono 2.4 bug hack
  * This can't use using () due to some crazy-wierd scoping problem.
  * See https://bugzilla.novell.com/show_bug.cgi?id=516676 for details.
  */
 IEnumerable<IFileItem> temp = uploads;
 UploadPool uploadQueue = new UploadPool (tags);
 try {
  foreach (IFileItem photo in uploads)
               uploadQueue.EnqueueUpload (photo);
     uploadQueue.BeginUploads ();
 } finally {
  uploadQueue.Dispose ();
 }
});
This snippet:
Services.Application.RunOnThread ( () => {
 /* Mono 2.4 bug hack
  * This can't use using () due to some crazy-wierd scoping problem.
  * See https://bugzilla.novell.com/show_bug.cgi?id=516676 for details.
  */
 UploadPool uploadQueue = new UploadPool (tags);
 IEnumerable<IFileItem> temp = uploads;
 try {
  foreach (IFileItem photo in uploads)
   uploadQueue.EnqueueUpload (photo);

  uploadQueue.BeginUploads ();
 } finally {
  uploadQueue.Dispose ();
 }
});
fails, with "error CS0165: Use of unassigned local variable `uploads'"