Bug 6069 - SIGSEGV while committing animation to draw image
Summary: SIGSEGV while committing animation to draw image
Status: RESOLVED FEATURE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 6068 ()
Depends on:
Blocks:
 
Reported: 2012-07-10 18:48 UTC by Jeff
Modified: 2012-07-16 16:32 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED FEATURE

Description Jeff 2012-07-10 18:48:39 UTC
I have an app that is crashing while drawing images onto tableviewcells. This
screen spawns a thread that retrieves an image from a url and then commits a
thumbnail image transition to draw it on the appropriate cell. Occasionally,
this will crash the app with the stack trace pasted below. 
Screenshot:
http://i.imgur.com/igtSD.png

Stacktrace:

  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
  at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:34
  at Baesman.iPhone.Application.Main (string[]) [0x00000] in /Users/admin/Projects/BaesmanGroup/Mobile/Trunk/iPhone/Main.cs:30
  at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	0   iPhone                              0x007013b0 mono_handle_native_sigsegv + 280
	1   iPhone                              0x006eb9d0 mono_sigsegv_signal_handler + 268
	2   libsystem_c.dylib                   0x36912539 _sigtramp + 48
	3   UIKit                               0x330e4419 UIViewCommonInitWithFrame + 708
	4   UIKit                               0x330e4419 UIViewCommonInitWithFrame + 708
	5   UIKit                               0x330e411f -[UIView initWithFrame:] + 98
	6   UIKit                               0x3317bbef -[UITableViewCell _setupSelectedBackgroundView] + 614
	7   UIKit                               0x33130729 -[UITableViewCell setHighlighted:animated:] + 104
	8   UIKit                               0x331ef7e3 -[UITableView highlightRowAtIndexPath:animated:scrollPosition:] + 382
	9   UIKit                               0x331eedb5 -[UITableView touchesBegan:withEvent:] + 1360
	10  CoreFoundation                      0x31086435 -[NSObject performSelector:withObject:withObject:] + 52
	11  UIKit                               0x331e473f forwardTouchMethod + 234
	12  UIKit                               0x331ee7f9 -[UITableViewCell touchesBegan:withEvent:] + 240
	13  CoreFoundation                      0x31086435 -[NSObject performSelector:withObject:withObject:] + 52
	14  UIKit                               0x331e473f forwardTouchMethod + 234
	15  UIKit                               0x330d499b _UIGestureRecognizerUpdate + 5222
	16  CoreFoundation                      0x31100b4b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
	17  CoreFoundation                      0x310fed87 __CFRunLoopDoObservers + 258
	18  CoreFoundation                      0x310ff0e1 __CFRunLoopRun + 760
	19  CoreFoundation                      0x310824dd CFRunLoopRunSpecific + 300
	20  CoreFoundation                      0x310823a5 CFRunLoopRunInMode + 104
	21  GraphicsServices                    0x33cb0fed GSEventRunModal + 156
	22  UIKit                               0x330f4743 UIApplicationMain + 1090
	23  iPhone                              0x000afd84 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240
	24  iPhone                              0x000846e4 MonoTouch_UIKit_UIApplication_Main_string__ + 36
	25  iPhone                              0x001dca8c Baesman_iPhone_Application_Main_string__ + 128
	26  iPhone                              0x005dd258 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
	27  iPhone                              0x006ed9f0 mono_jit_runtime_invoke + 1644
	28  iPhone                              0x00795e7c mono_runtime_invoke + 128
	29  iPhone                              0x0079a128 mono_runtime_exec_main + 436
	30  iPhone                              0x0079ed9c mono_runtime_run_main + 756
	31  iPhone                              0x006f1d78 mono_jit_exec + 140
	32  iPhone                              0x006e9f88 main + 2164
	33  iPhone                              0x00002938 start + 40

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Sebastien Pouliot 2012-07-16 11:53:02 UTC
Most of UIKit is not thread-safe. Misusing threads wrt to UI can lead to random crash like this one (and bug #6068).

You can either:

* Try using the (unstable) 5.3.x releases that will throw exceptions when UIKit is used outside the main thread; or

* Attach your code (you can mark it as private) so we can look, and hopefully, duplicate the issue and suggest fixes.
Comment 2 Sebastien Pouliot 2012-07-16 11:53:07 UTC
*** Bug 6068 has been marked as a duplicate of this bug. ***