iphone - Showing a view controller modally in monotouch -



iphone - Showing a view controller modally in monotouch -

in monotouch based ios project , have 2 view controllers .on first viewcontroller have created button xib. on selection of button want display sec view controller not happening , causes application crash.

so in design.cs file way button created

[outlet] monotouch.uikit.uibutton firstbutton { get; set; } [action ("clickme:")] partial void clickme (monotouch.foundation.nsobject sender);

this in button action method in .cs file, causing crash.

partial void clickme (monotouch.foundation.nsobject sender) { secondviewcontroller secondviewcontrollerobject=new secondviewcontroller(); this.presentviewcontroller(secondviewcontrollerobject, true, null); }

error description :-

got sigabrt while executing native code.

terminating runtime due unhandled exception

unhandled exception: 0 testingfirstproject 0x0008ebce mono_handle_exception_internal_first_pass + 2190 1 testingfirstproject 0x00090612 mono_handle_exception_internal + 1602 2 testingfirstproject 0x0009115f mono_handle_exception + 47 3 testingfirstproject 0x000d42b2 mono_x86_throw_exception + 306 4 ??? 0x0b496f8f 0x0 + 189362063 5 testingfirstproject 0x00215f38 monotouch_exception_handler + 136 6 corefoundation 0x013ca318 __handleuncaughtexception + 728 7 libobjc.a.dylib 0x0401d0b9 _zl15_objc_terminatev + 86 8 libc++abi.dylib 0x0435ea65 _zl19safe_handler_callerpfvve + 13 9 libc++abi.dylib 0x0435eacd __cxa_bad_typeid + 0 10 libc++abi.dylib 0x0435fbc2 _zl23__gxx_exception_cleanup19_unwind_reason_codep17_unwind_exception + 0 11 libobjc.a.dylib 0x0401cf89 _zl26_objc_exception_destructorpv + 0 12 corefoundation 0x013c9fb1 -[nsexception raise] + 17 13 foundation 0x01a08711 -[nsobject(nskeyvaluecoding) setvalue:forundefinedkey:] + 282 14 foundation 0x01989ec8 _nssetusingkeyvaluesetter + 140 15 foundation 0x019899b7 -[nsobject(nskeyvaluecoding) setvalue:forkey:] + 267 16 foundation 0x019b4428 -[nsobject(nskeyvaluecoding) setvalue:forkeypath:] + 412 17 uikit 0x029410cc -[uiruntimeoutletconnection connect] + 106 18 libobjc.a.dylib 0x04030663 -[nsobject performselector:] + 62 19 corefoundation 0x0133c45a -[nsarray makeobjectsperformselector:] + 314 20 uikit 0x0293fbcf -[uinib instantiatewithowner:options:] + 1327 21 uikit 0x02804e37 -[uiviewcontroller _loadviewfromnibnamed:bundle:] + 280 22 uikit 0x02805418 -[uiviewcontroller loadview] + 302 23 uikit 0x02805648 -[uiviewcontroller loadviewifrequired] + 73 24 uikit 0x02805882 -[uiviewcontroller view] + 33 25 uikit 0x02811235 -[uiviewcontroller shouldautorotate] + 36 26 uikit 0x02a103d2 -[uiwindowcontroller transition:fromviewcontroller:toviewcontroller:target:didendselector:] + 1933 27 uikit 0x0280e4f3 -[uiviewcontroller presentviewcontroller:withtransition:completion:] + 4521 28 uikit 0x0280e777 -[uiviewcontroller presentviewcontroller:animated:completion:] + 112 @ (wrapper managed-to-native) monotouch.objcruntime.messaging.void_objc_msgsendsuper_intptr_bool_intptr (intptr,intptr,intptr,bool,intptr) <il 0x00016, 0x00044> @ monotouch.uikit.uiviewcontroller.presentviewcontroller (monotouch.uikit.uiviewcontroller,bool,monotouch.foundation.nsaction) [0x0006f] in /developer/monotouch/source/monotouch/src/uikit/uiviewcontroller.g.cs:659 @ testingfirstproject.testingfirstprojectviewcontroller.clickme (monotouch.foundation.nsobject) [0x00006] in /users/rock/desktop/sample project/testingfirstproject/testingfirstproject/testingfirstprojectviewcontroller.cs:41 @ (wrapper runtime-invoke) <module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <il 0x0004b, 0x0007d> 33 testingfirstproject 0x00009922 mono_jit_runtime_invoke + 722 34 testingfirstproject 0x0016c4ae mono_runtime_invoke + 126 35 testingfirstproject 0x0020f086 monotouch_trampoline + 3686 36 libobjc.a.dylib 0x04030705 -[nsobject performselector:withobject:withobject:] + 77 37 uikit 0x02727920 -[uiapplication sendaction:to:from:forevent:] + 96 38 uikit 0x027278b8 -[uiapplication sendaction:totarget:fromsender:forevent:] + 61 39 uikit 0x027e8671 -[uicontrol sendaction:to:forevent:] + 66 40 uikit 0x027e8bcf -[uicontrol(internal) _sendactionsforevents:withevent:] + 578 41 uikit 0x027e7d38 -[uicontrol touchesended:withevent:] + 546 42 uikit 0x0275733f -[uiwindow _sendtouchesforevent:] + 846 43 uikit 0x02757552 -[uiwindow sendevent:] + 273 44 uikit 0x027353aa -[uiapplication sendevent:] + 436 45 uikit 0x02726cf8 _uiapplicationhandleevent + 9874 46 graphicsservices 0x04d0fdf9 _purpleeventcallback + 339 47 graphicsservices 0x04d0fad0 purpleeventcallback + 46 48 corefoundation 0x012b6bf5 __cfrunloop_is_calling_out_to_a_source1_perform_function__ + 53 49 corefoundation 0x012b6962 __cfrunloopdosource1 + 146 50 corefoundation 0x012e7bb6 __cfrunlooprun + 2118 51 corefoundation 0x012e6f44 cfrunlooprunspecific + 276 52 corefoundation 0x012e6e1b cfrunloopruninmode + 123 53 graphicsservices 0x04d0e7e3 gseventrunmodal + 88 54 graphicsservices 0x04d0e668 gseventrun + 104 55 uikit 0x0272465c uiapplicationmain + 1211 @ (wrapper managed-to-native) monotouch.uikit.uiapplication.uiapplicationmain (int,string[],intptr,intptr) <il 0x00056, 0x000a4> @ monotouch.uikit.uiapplication.main (string[],string,string) [0x0004c] in /developer/monotouch/source/monotouch/src/uikit/uiapplication.cs:38 @ testingfirstproject.application.main (string[]) [0x00000] in /users/rock/desktop/sample project/testingfirstproject/testingfirstproject/main.cs:17 @ (wrapper runtime-invoke) <module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <il 0x00049, 0x00077> 60 testingfirstproject 0x00009922 mono_jit_runtime_invoke + 722 61 testingfirstproject 0x0016c4ae mono_runtime_invoke + 126 62 testingfirstproject 0x001706a4 mono_runtime_exec_main + 420 63 testingfirstproject 0x00175a95 mono_runtime_run_main + 725 64 testingfirstproject 0x00066e05 mono_jit_exec + 149 65 testingfirstproject 0x0020433d main + 2013 66 testingfirstproject 0x00002955 start + 53 [error] fatal unhandled exception: monotouch.foundation.monotouchexception: objective-c exception thrown. name: nsunknownkeyexception reason: [<secondviewcontroller 0x12a36ca0> setvalue:forundefinedkey:]: class not key value coding-compliant key butnsubmit. @ (wrapper managed-to-native) monotouch.objcruntime.messaging:void_objc_msgsendsuper_intptr_bool_intptr (intptr,intptr,intptr,bool,intptr) @ monotouch.uikit.uiviewcontroller.presentviewcontroller (monotouch.uikit.uiviewcontroller viewcontrollertopresent, boolean animated, monotouch.foundation.nsaction completionhandler) [0x0006f] in /developer/monotouch/source/monotouch/src/uikit/uiviewcontroller.g.cs:659 @ testingfirstproject.testingfirstprojectviewcontroller.clickme (monotouch.foundation.nsobject sender) [0x00006] in /users/rock/desktop/sample project/testingfirstproject/testingfirstproject/testingfirstprojectviewcontroller.cs:41 @ (wrapper managed-to-native) monotouch.uikit.uiapplication:uiapplicationmain (int,string[],intptr,intptr) @ monotouch.uikit.uiapplication.main (system.string[] args, system.string principalclassname, system.string delegateclassname) [0x0004c] in /developer/monotouch/source/monotouch/src/uikit/uiapplication.cs:38 @ testingfirstproject.application.main (system.string[] args) [0x00000] in /users/rock/desktop/sample project/testingfirstproject/testingfirstproject/main.cs:17 stacktrace: native stacktrace: 0 testingfirstproject 0x0009148c mono_handle_native_sigsegv + 284 1 testingfirstproject 0x000d769d sigabrt_signal_handler + 109 2 libsystem_c.dylib 0x9a4c386b _sigtramp + 43 3 ??? 0xffffffff 0x0 + 4294967295 4 libsystem_sim_c.dylib 0x041e057b abort + 140 5 testingfirstproject 0x001ea3fd monoeg_g_logv + 157 6 testingfirstproject 0x001ea42b monoeg_assertion_message + 43 7 testingfirstproject 0x00215e5f monotouch_unhandled_exception_handler + 159 8 testingfirstproject 0x0008cefc mono_invoke_unhandled_exception_hook + 140 9 testingfirstproject 0x0009100a mono_handle_exception_internal + 4154 10 testingfirstproject 0x0009115f mono_handle_exception + 47 11 testingfirstproject 0x000d42b2 mono_x86_throw_exception + 306 12 ??? 0x0b496f8f 0x0 + 189362063 13 testingfirstproject 0x00215f38 monotouch_exception_handler + 136 14 corefoundation 0x013ca318 __handleuncaughtexception + 728 15 libobjc.a.dylib 0x0401d0b9 _zl15_objc_terminatev + 86 16 libc++abi.dylib 0x0435ea65 _zl19safe_handler_callerpfvve + 13 17 libc++abi.dylib 0x0435eacd __cxa_bad_typeid + 0 18 libc++abi.dylib 0x0435fbc2 _zl23__gxx_exception_cleanup19_unwind_reason_codep17_unwind_exception + 0 19 libobjc.a.dylib 0x0401cf89 _zl26_objc_exception_destructorpv + 0 20 corefoundation 0x013c9fb1 -[nsexception raise] + 17 21 foundation 0x01a08711 -[nsobject(nskeyvaluecoding) setvalue:forundefinedkey:] + 282 22 foundation 0x01989ec8 _nssetusingkeyvaluesetter + 140 23 foundation 0x019899b7 -[nsobject(nskeyvaluecoding) setvalue:forkey:] + 267 24 foundation 0x019b4428 -[nsobject(nskeyvaluecoding) setvalue:forkeypath:] + 412 25 uikit 0x029410cc -[uiruntimeoutletconnection connect] + 106 26 libobjc.a.dylib 0x04030663 -[nsobject performselector:] + 62 27 corefoundation 0x0133c45a -[nsarray makeobjectsperformselector:] + 314 28 uikit 0x0293fbcf -[uinib instantiatewithowner:options:] + 1327 29 uikit 0x02804e37 -[uiviewcontroller _loadviewfromnibnamed:bundle:] + 280 30 uikit 0x02805418 -[uiviewcontroller loadview] + 302 31 uikit 0x02805648 -[uiviewcontroller loadviewifrequired] + 73 32 uikit 0x02805882 -[uiviewcontroller view] + 33 33 uikit 0x02811235 -[uiviewcontroller shouldautorotate] + 36 34 uikit 0x02a103d2 -[uiwindowcontroller transition:fromviewcontroller:toviewcontroller:target:didendselector:] + 1933 35 uikit 0x0280e4f3 -[uiviewcontroller presentviewcontroller:withtransition:completion:] + 4521 36 uikit 0x0280e777 -[uiviewcontroller presentviewcontroller:animated:completion:] + 112 37 ??? 0x129333bc 0x0 + 311636924 38 ??? 0x12933118 0x0 + 311636248 39 ??? 0x12932ff5 0x0 + 311635957 40 ??? 0x12931ff5 0x0 + 311631861 41 testingfirstproject 0x00009922 mono_jit_runtime_invoke + 722 42 testingfirstproject 0x0016c4ae mono_runtime_invoke + 126 43 testingfirstproject 0x0020f086 monotouch_trampoline + 3686 44 libobjc.a.dylib 0x04030705 -[nsobject performselector:withobject:withobject:] + 77 45 uikit 0x02727920 -[uiapplication sendaction:to:from:forevent:] + 96 46 uikit 0x027278b8 -[uiapplication sendaction:totarget:fromsender:forevent:] + 61 47 uikit 0x027e8671 -[uicontrol sendaction:to:forevent:] + 66 48 uikit 0x027e8bcf -[uicontrol(internal) _sendactionsforevents:withevent:] + 578 49 uikit 0x027e7d38 -[uicontrol touchesended:withevent:] + 546 50 uikit 0x0275733f -[uiwindow _sendtouchesforevent:] + 846 51 uikit 0x02757552 -[uiwindow sendevent:] + 273 52 uikit 0x027353aa -[uiapplication sendevent:] + 436 53 uikit 0x02726cf8 _uiapplicationhandleevent + 9874 54 graphicsservices 0x04d0fdf9 _purpleeventcallback + 339 55 graphicsservices 0x04d0fad0 purpleeventcallback + 46 56 corefoundation 0x012b6bf5 __cfrunloop_is_calling_out_to_a_source1_perform_function__ + 53 57 corefoundation 0x012b6962 __cfrunloopdosource1 + 146 58 corefoundation 0x012e7bb6 __cfrunlooprun + 2118 59 corefoundation 0x012e6f44 cfrunlooprunspecific + 276 60 corefoundation 0x012e6e1b cfrunloopruninmode + 123 61 graphicsservices 0x04d0e7e3 gseventrunmodal + 88 62 graphicsservices 0x04d0e668 gseventrun + 104 63 uikit 0x0272465c uiapplicationmain + 1211 64 ??? 0x0e9ccd74 0x0 + 245157236 65 ??? 0x0e9cb3e8 0x0 + 245150696 66 ??? 0x0e9cabe8 0x0 + 245148648 67 ??? 0x0e9cac77 0x0 + 245148791 68 testingfirstproject 0x00009922 mono_jit_runtime_invoke + 722 69 testingfirstproject 0x0016c4ae mono_runtime_invoke + 126 70 testingfirstproject 0x001706a4 mono_runtime_exec_main + 420 71 testingfirstproject 0x00175a95 mono_runtime_run_main + 725 72 testingfirstproject 0x00066e05 mono_jit_exec + 149 73 testingfirstproject 0x0020433d main + 2013 74 testingfirstproject 0x00002955 start + 53 ================================================================= got sigabrt while executing native code. indicates fatal error in mono runtime or 1 of native libraries used application. =================================================================

the key bit of info in exception is:

this class not key value coding-compliant key butnsubmit

which means have property on c# class doesn't have corresponding outlet in .xib (interface builder) file.

re-check/recreate outlets, , see if solves problem.

iphone ios monotouch

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -