Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8761031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:11:34+00:00 2026-06-13T15:11:34+00:00

I am getting following error….. tacktrace: at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (string[],string,string)

  • 0

I am getting following error…..

tacktrace:

at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at F2S.UI.Application.Main (string[]) [0x00000] in /Users/ravichandra/Desktop/19-10-2012/F2S/F2S.UI/Main.cs:21
at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr)

Native stacktrace:

0   navigation                          0x00090dfc mono_handle_native_sigsegv + 284
1   navigation                          0x00005c28 mono_sigsegv_signal_handler + 248
2   libsystem_c.dylib                   0x9ca8259b _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   UIKit                               0x0223555a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
5   UIKit                               0x022dab76 -[UIControl sendAction:to:forEvent:] + 66
6   UIKit                               0x022db03f -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503
7   UIKit                               0x022da2fe -[UIControl touchesEnded:withEvent:] + 549
8   UIKit                               0x0225aa30 -[UIWindow _sendTouchesForEvent:] + 513
9   UIKit                               0x0225ac56 -[UIWindow sendEvent:] + 273
10  UIKit                               0x02241384 -[UIApplication sendEvent:] + 464
11  UIKit                               0x02234aa9 _UIApplicationHandleEvent + 8196
12  GraphicsServices                    0x047f6fa9 PurpleEventCallback + 1274
13  CoreFoundation                      0x0119c1c5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
14  CoreFoundation                      0x01101022 __CFRunLoopDoSource1 + 146
15  CoreFoundation                      0x010ff90a __CFRunLoopRun + 2218
16  CoreFoundation                      0x010fedb4 CFRunLoopRunSpecific + 212
17  CoreFoundation                      0x010feccb CFRunLoopRunInMode + 123
18  GraphicsServices                    0x047f5879 GSEventRunModal + 207
19  GraphicsServices                    0x047f593e GSEventRun + 114
20  UIKit                               0x02232a9b UIApplicationMain + 1175
21  ???                                 0x0d90a384 0x0 + 227582852
22  ???                                 0x0d909180 0x0 + 227578240
23  ???                                 0x0d9089a0 0x0 + 227576224
24  ???                                 0x0d908a2f 0x0 + 227576367
25  navigation                          0x00009fe2 mono_jit_runtime_invoke + 722
26  navigation                          0x0016b87e mono_runtime_invoke + 126
27  navigation                          0x0016fa04 mono_runtime_exec_main + 420
28  navigation                          0x00174df5 mono_runtime_run_main + 725
29  navigation                          0x000671e5 mono_jit_exec + 149
30  navigation                          0x00203e41 main + 2209
31  navigation                          0x00002fe5 start + 53
32  ???                                 0x00000005 0x0 + 5

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries.

=================================================================

please anyone help me

Here is my code

        btnMylocation.Clicked += (sender, e) => 
        {
            imgbg.Hidden=false;
            lbltime.Hidden=false;
            btnup.Hidden=false;
            btndown.Hidden=false;
            imghazard.Hidden=false;
            lblfeets.Hidden=false;


            try
            {
                if(!Reachability.IsHostReachable ("www.google.com"))
                {

                    alertview.NetworkFail ();

                }

                else
                {

                this.mysegments.SelectedSegment = 0;

                mapView.RemoveAnnotations (mapView.Annotations);

                var locationservice = new LocationService ();
                var currentLocation = locationservice.GetCurrentLocation ();
                var visregion = BuildVisibleRegion (currentLocation);

                mapView.SetRegion (visregion, true);
                targetimage.Hidden = true;

                locations = LocationManager.Locations ();

                List<double> distlist=new List<double>();

                foreach(LocationModel d in locations)
                {

                    var dist=distance (currentLocation.Latitude,currentLocation.Longitude,Convert.ToDouble (d.latitude),Convert.ToDouble (d.longitude));
                    distlist.Add (dist);

                }
                if(distlist.Count!=0)
                {

                    distlist.Sort ();
                    double min= distlist[0];

                foreach (LocationModel f in locations)
                {

                    string feets = (min*3280).ToString ();

                    var dist=distance (currentLocation.Latitude,currentLocation.Longitude,Convert.ToDouble (f.latitude),Convert.ToDouble (f.longitude));

                    if(min == dist)
                    {
                        string lat = f.latitude;
                        string lon = f.longitude;
                        NSUserDefaults.StandardUserDefaults.SetString (f.hazardid,"hazardid");  

                        this.View.AddSubview (imgbg);
                        this.View.AddSubview (imghazard);
                        this.View.AddSubview (lblfeets);
                        this.View.AddSubview (btnup);
                        this.View.AddSubview (btndown); 
                        this.View.AddSubview (lbltime);

                    if (f.hazardtype == 1) 
                    {   

                        pins.Clear ();
                        pins.Add (new PoliceAnnotation (new CLLocationCoordinate2D (Convert.ToDouble (lat), Convert.ToDouble (lon)), "Click here to Report",""));
                        mapView.AddAnnotationObject (pins [0]);
                        mapView.AddAnnotation (mapAnnotations [(int)Anotationindex.police]);

                        lblfeets.Text=feets  + " fts";
                        lbltime.Text=f.ReportDate + " Ago";
                        imghazard.Image=UIImage.FromFile ("Images/police-cop-mark.png");

                    } 

                    else if (f.hazardtype == 2) 
                    {

                        duipins.Clear ();
                        duipins.Add (new DuiAnnotation (new CLLocationCoordinate2D (Convert.ToDouble (lat), Convert.ToDouble (lon)), "Click here to Report",""));
                        mapView.AddAnnotationObject (duipins [0]);
                        mapView.AddAnnotation (mapAnnotations [(int)Anotationindex.dui]);


                        lblfeets.Text=feets  + " fts";
                        lbltime.Text=f.ReportDate + " Ago";
                        imghazard.Image=UIImage.FromFile ("Images/dui-stop-mark.png");      

                    }
                    else if(f.hazardtype==3)
                    {

                        campins.Clear ();
                        campins.Add (new SpeedcamAnnotation (new CLLocationCoordinate2D (Convert.ToDouble (lat), Convert.ToDouble (lon)), "",""));
                        mapView.AddAnnotationObject (campins [0]);
                        mapView.AddAnnotation (mapAnnotations [(int)Anotationindex.cam]);


                        lblfeets.Text=feets  + " fts";
                        lbltime.Text=f.ReportDate + " Ago";
                        imghazard.Image=UIImage.FromFile ("Images/speed-camera-mark.png");

                    }

                    }

                    }

                    btnup.TouchUpInside += (sender1, e1) =>
                    {

                    NSUserDefaults.StandardUserDefaults.SetString("1","Status");
                    NSUserDefaults.StandardUserDefaults.Init();
                    Response = LocationManager.ConfirmLocation();

                    if(Response.Status == "1" || Response.Status == "12")
                    {
                        UIAlertView alert1 = new UIAlertView ("Success","",null,"Ok");  
                        alert1.Show ();
                    }
                    else
                    {

                    }

                    };

                    btndown.TouchUpInside += (sender1, e1) => 
                    {

                    NSUserDefaults.StandardUserDefaults.SetString("0","Status");
                    NSUserDefaults.StandardUserDefaults.Init();
                    Response = LocationManager.ConfirmLocation ();

                    if(Response.Status == "1" || Response.Status == "12")
                    {
                        UIAlertView alert1 = new UIAlertView ("Success","",null,"Ok");  
                        alert1.Show ();
                    }
                    else
                    {

                    }

                    };

                   }

                }

               }
            catch(Exception ex)
            {

                if(ex.Message == "Network Fail")

                    alertview.NetworkFail ();

                else

                    alertview.ProcessFailed ();

                }

            };

Clicking first time on btnMylocation shows a popup with two buttons and clicking on two buttons working fine , but when i am trying to click on btnMylocation again its opening the popup but clicking any one of two buttons btnup and btndown crashes the application…….any idea please….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:11:35+00:00Added an answer on June 13, 2026 at 3:11 pm

    Rolf is right, there is a way to make this crash happen by setting up events improperly. It is the way the GC interacts with Objective-C in MonoTouch.

    So for example if you put this in ViewDidLoad on an outlet named myButton, it will work fine:

    myButton.TouchUpInside += (sender, e) =>
    {
      //Do something
    };
    

    But if you did this:

    myButton1.TouchUpInside += (sender, e) =>
    {
      var myButton2 = new UIButton();
      myButton2.TouchUpInside += (sender, e) =>
      {
        //Do something
      };  
      //Add button2 to the view, etc.
    };
    

    Then myButton2 will click properly perhaps the first time, but eventually you will get a crash after the GC collects. This happens because the C# wrapper for myButton2 will get garbarge collected, but the Objective-C instance will still hang around. When the Objective-C instance get’s a click, it’s can’t call into C# because it is gone.

    An easy way to work around it to so make the button a member variable of your class:

    private UIButton myButton;

    Just make sure not to create it over and over.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting following error when invoking my testtag.jsp : org.apache.jasper.JasperException: Unable to convert string
I am getting following error in my managed server console on oracle soa server(11g).
I am getting following error. typedef std::vector<std::pair<std::string, void*> > PropInfoType; #define REGISTER_FUNCTOR(type, func) \
I am getting following error error: invalid conversion from ‘const int*’ to ‘int*’ Following
I am getting following error..... Error MT5202: Native linking failed. Please review the build
Am getting following error message on calling WCF service: The formatter threw an exception
I am Getting following error on exporting the video using [exportSession exportAsynchronouslyWithCompletionHandler:^ Error: -[TiBlob
I am getting following error while installing the application on my device. before running
i am getting following error while getting data from dictionary -[__NSCFString objectForKey:]: unrecognized selector
I'm getting following error when I try to log onto phpMyAdmin. User * *

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.