[Mono-bugs] [Bug 543961] New: Crash using Accelerometer and CFRunLoop

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 2 15:45:26 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=543961


           Summary: Crash using Accelerometer and CFRunLoop
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Runtime
        AssignedTo: gnorton at novell.com
        ReportedBy: jalf at sharpgames.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; pt-br)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9

This program crash all the times:

using MonoTouch.CoreFoundation;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System;

namespace LoopTest
{
    public static class Accelerometer
    {
        public static void SetupAccelerometer()
        {
            // Setup the accelerometer
            UIAccelerometer.SharedAccelerometer.UpdateInterval = 1/30;
            UIAccelerometer.SharedAccelerometer.Acceleration +=
UIAccelerometerSharedAccelerometerAcceleration;            
        }

        private static void UIAccelerometerSharedAccelerometerAcceleration
(object sender, UIAccelerometerEventArgs e)
        {
            Console.WriteLine("Move");
        }
    }

    [Register ("AppDelegate")]
    class Program : UIApplicationDelegate 
    {    
        public override void FinishedLaunching (UIApplication app)
        {
            //Accelerometer.SetupAccelerometer();
            while (true)
            {
               
while(CFRunLoop.Main.RunInMode(CFRunLoop.ModeDefault,0.002f,true) ==
CFRunLoopExitReason.HandledSource);
                Tick();
            }
        }

        void Tick()
        {
            Console.WriteLine("Tick");
        }

        static void Main (string [] args)
        {
            UIApplication.Main (args,null,"AppDelegate");
        }
    }
}


Reproducible: Always

Steps to Reproduce:
Just compile and run into ipod

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list