Bug 1410 - Fatal error occurs when run the aplication after adding Outlets and Actions.
Summary: Fatal error occurs when run the aplication after adding Outlets and Actions.
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 4.9.xx
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-10-11 05:45 UTC by Jatin
Modified: 2011-10-14 08:26 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jatin 2011-10-11 05:45:32 UTC
Steps to reproduce:

1. Create a MonoTouch project.
2. Create an Interface.
3. Drag three buttons and a label to the designer from the third tab of the Library.
4. To resize the controls, select them and then pull on their resize handles.
5. Double-click on the buttons to set their title text.
6. Make the label nearly as wide as the view.
7. Close the IB window.
8. Click on <projectname>ViewController.h file in the Project Navigator
9. Add outlets and actions.
10.Save the file.
11.Go back to the MonoDevelop.
12.From the Run menu, choose Debug.
13.Click on all the buttons
14.On clicking any one of the three buttons fatal error occured.

Actual result:

When run the application after adding outlets and actions, on clicking any one of the three buttons, fatal error occured, i.e.

2011-10-11 14:15:09.575 JatinTest[1832:1607] -[JatinTestViewController malhotra:]: unrecognized selector sent to instance 0xc4b1680

  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
  at JatinTest.Application.Main (string[]) [0x00000] in /Users/mac/Projects/JatinTest/JatinTest/Main.cs:16
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

    0   JatinTest                           0x000e1108 mono_handle_native_sigsegv + 408
    1   JatinTest                           0x0015301d sigabrt_signal_handler + 141
    2   libSystem.B.dylib                   0x9946f45b _sigtramp + 43
    3   ???                                 0xffffffff 0x0 + 4294967295
    4   libSystem.B.dylib                   0x994fc899 raise + 26
    5   libSystem.B.dylib                   0x995129b8 abort + 93
    6   libSystem.B.dylib                   0x9948eefb _Unwind_Resume + 59
    7   CoreFoundation                      0x0120de39 CFRunLoopRunSpecific + 345
    8   CoreFoundation                      0x0120dccb CFRunLoopRunInMode + 123
    9   GraphicsServices                    0x04864879 GSEventRunModal + 207
    10  GraphicsServices                    0x0486493e GSEventRun + 114
    11  UIKit                               0x022a6a9b UIApplicationMain + 1175
    12  ???                                 0x0c374305 0x0 + 204948229
    13  ???                                 0x0c372b90 0x0 + 204942224
    14  ???                                 0x0c372888 0x0 + 204941448
    15  ???                                 0x0c3729de 0x0 + 204941790
    16  JatinTest                           0x00011bdf mono_jit_runtime_invoke + 1407
    17  JatinTest                           0x0022020a mono_runtime_invoke + 170
    18  JatinTest                           0x00222f41 mono_runtime_exec_main + 705
    19  JatinTest                           0x00222151 mono_runtime_run_main + 929
    20  JatinTest                           0x000ad7cf mono_jit_exec + 239
    21  JatinTest                           0x002f420a main + 5194
    22  JatinTest                           0x00003435 start + 53

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

Expected result:

Fatal error should not occur.


MonoTouch 4.9.9 + iOS 5.0
Mac 10.6 (Snow Leopard)
Xcode 4.2
Comment 1 Mikayla Hutchinson [MSFT] 2011-10-11 06:19:14 UTC
It appears that you defined an action called "malhotra:" that would be sent to your view controller when the button was clicked. The designer would define a partial method on the designer partial class, but you need to implement the method in the main partial class, or it will not be found at runtime. Type "partial" in the main part of the class, and MD will suggest partial methods that can be implemented.
Comment 2 Atin 2011-10-11 12:15:53 UTC
We missed to implement the partial method in the ViewController.cs , now we have implemented this and it is working fine.
Comment 3 Atin 2011-10-14 08:25:49 UTC
We missed to implement the partial method in the ViewController.cs , now we have implemented this and it is working fine.

Hence, closing this issue.