[Mono-bugs] [Bug 548168] New: Successive try/catch fails to trap errors on device

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 19 12:43:27 EDT 2009


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


           Summary: Successive try/catch fails to trap errors on device
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Runtime
        AssignedTo: gnorton at novell.com
        ReportedBy: gcarrier at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


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

This code causes the program to terminate when on the device (when freshly
loaded, so there are no variables stored), but works fine on the simulator:
-------
try {memField2.Text = memField1.Text =
NSUserDefaults.StandardUserDefaults.StringForKey("MemoryTotal");}catch{}

try     {unitPrice.Text =
NSUserDefaults.StandardUserDefaults.StringForKey("unitPrice");}catch{}

-------
commenting out either line works fine on the device.  Personally, I think the
try/catch should never result in blowing up unless the catch causes a blowup. 
i.e. regardless of what I may be doing wrong in text and variable handling
within the try statement.

If I don't retrieve any settings, but do store them: These retrieval lines
(about a dozen) work fine, retrieving and setting my variables.  The variables
I am setting are the text properties of UITextFields, but I also have a few
other UI objects I manipulate seemingly fine on the simulator.





Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
Mon Oct 19 11:39:46 unknown kernel[0] <Debug>: launchd[1223] Builtin profile:
container (seatbelt)
Mon Oct 19 11:39:46 unknown kernel[0] <Debug>: launchd[1223] Container:
/private/var/mobile/Applications/47549547-FEEA-46AF-B229-405D9F354770
(seatbelt)
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>: Stacktrace:
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at (wrapper
managed-to-native) MonoTouch.ObjCRuntime.Messaging.intptr_objc_msgSend_intptr
(intptr,intptr,intptr) <0xffffffff>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
MonoTouch.Foundation.NSString..ctor (string) <0x0008c>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
MonoTouch.UIKit.UITextField.set_Text (string) <0x00037>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
RoyaltyCalc.AppDelegate.RetrieveSettings () <0x000ef>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
RoyaltyCalc.AppDelegate.FinishedLaunching
(MonoTouch.UIKit.UIApplication,MonoTouch.Foundation.NSDictionary) <0x00023>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at (wrapper
runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr)
<0xffffffff>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at (wrapper
managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain
(int,string[],intptr,intptr) <0xffffffff>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x000e0>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
MonoTouch.UIKit.UIApplication.Main (string[]) <0x00023>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at
RoyaltyCalc.Application.Main (string[]) <0x0001b>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:   at (wrapper
runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr)
<0xffffffff>
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>: Native
stacktrace:
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     0  
RoyaltyCalc                         0x00259504 mono_handle_native_sigsegv + 396
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     1  
RoyaltyCalc                         0x00244914 mono_sigsegv_signal_handler +
228
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     2  
libSystem.B.dylib                   0x32a2084b _sigtramp + 42
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     3  
libgcc_s.1.dylib                    0x303f77ad _Unwind_SjLj_RaiseException + 52
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     4  
libstdc++.6.dylib                   0x32c69893 __cxa_throw + 70
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     5  
libobjc.A.dylib                     0x3031071b objc_exception_throw + 70
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     6  
CoreFoundation                      0x32b88b8d +[NSException
raise:format:arguments:] + 80
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     7  
CoreFoundation                      0x32b88b2b +[NSException raise:format:] +
34
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     8  
Foundation                          0x317f6a4f -[NSString initWithUTF8String:]
+ 106
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>:     9  
RoyaltyCalc                         0x001b588c
wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_intptr_objc_msgSend_intptr_intptr_intptr_intptr
+ 80
Mon Oct 19 11:39:47 unknown
UIKitApplication:com.yourcompany.sample[0x1a01][1223] <Notice>: * Assertion:
should not be reached at ../../../../mono/mini/mini-darwin.c:232
Mon Oct 19 11:39:47 unknown ReportCrash[1224] <Notice>: Formulating crash
report for process RoyaltyCalc[1223]
Mon Oct 19 11:39:47 unknown com.apple.launchd[1] <Warning>:
(UIKitApplication:com.yourcompany.sample[0x1a01]) Job appears to have crashed:
Abort trap
Mon Oct 19 11:39:47 unknown SpringBoard[25] <Warning>: Application
'RoyaltyCalc' exited abnormally with signal 6: Abort trap
Mon Oct 19 11:39:47 unknown ReportCrash[1224] <Error>: Saved crashreport to
/var/mobile/Library/Logs/CrashReporter/RoyaltyCalc_2009-10-19-113947_Gregs-iPhone.plist
using uid: 0 gid: 0, synthetic_euid: 501 egid: 0


Expected Results:  
Code in Try statement should never caused the application to terminate.

-- 
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