Bug 2252 - WCF contract with a Byte[] return type fails
Summary: WCF contract with a Byte[] return type fails
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- minor
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-11-29 13:11 UTC by James Clancey
Modified: 2012-04-18 10:19 UTC (History)
2 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 INVALID

Description James Clancey 2011-11-29 13:11:16 UTC
I get the following error using the test case from 

https://github.com/Clancey/WcfTestSuite


2011-11-29 09:08:49.328 WcfTestSuite[35241:6a03] bool _WebTryThreadLock(bool), 0xe6059b0: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1   WebThreadLock
2   -[UITextView setFrame:]
3   UIViewCommonInitWithFrame
4   -[UIView initWithFrame:]
5   -[UIScrollView initWithFrame:]
6   -[UITextView initWithFrame:]
7   -[UIAlertView(Private) layout]
8   -[UIAlertView(Private) layoutAnimated:]
9   -[UIAlertView(Private) _layoutPopupAlertWithOrientation:animated:]
10  -[UIAlertView(Private) _layoutIfNeeded]
11  -[UIAlertView(Private) _performPopup:animationType:]
12  -[UIAlertView(Private) popupAlertAnimated:animationType:atOffset:]
13  -[UIAlertView(Private) popupAlertAnimated:animationType:]
14  -[UIAlertView showWithAnimationType:]
15  -[UIAlertView show]
16  0xe5a2124
17  0x11cc9b70
18  0x11cc876c
19  0x11cc85a0
20  0x11aa7fe1
21  0x11afcd7c
22  0x9f31c8e
23  mono_jit_runtime_invoke
24  mono_runtime_invoke
25  mono_async_invoke
26  async_invoke_thread
27  start_wrapper_internal
28  start_wrapper
29  thread_start_routine
30  GC_start_routine
31  _pthread_start
Stacktrace:

  at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) <IL 0x00024, 0xffffffff>
  at MonoTouch.UIKit.UIAlertView.Show () [0x0000b] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIAlertView.g.cs:153
  at WcfTestSuite.AppDelegate.HandleClientConvertToByteArrayCompleted (object,ConvertToByteArrayCompletedEventArgs) [0x00039] in /Users/Clancey/Projects/WcfTestSuite/WcfTestSuite/iPhoneApp/WcfTestSuite/AppDelegate.cs:67
  at Service1Client.OnConvertToByteArrayCompleted (object) [0x00012] in /Users/Clancey/Projects/WcfTestSuite/WcfTestSuite/iPhoneApp/WcfTestSuite/Service1.cs:694
  at System.ServiceModel.ClientBase`1.RunCompletedCallback (System.Threading.SendOrPostCallback,System.ServiceModel.ClientBase`1/InvokeAsyncCompletedEventArgs<TChannel>) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:245
  at System.ServiceModel.ClientBase`1/<InvokeAsync>c__AnonStorey10.<>m__10 (System.IAsyncResult) [0x0002b] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:287
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00052, 0xffffffff>

Native stacktrace:

	0   WcfTestSuite                        0x000d57c8 mono_handle_native_sigsegv + 408
	1   WcfTestSuite                        0x00012b7f mono_sigsegv_signal_handler + 351
	2   libSystem.B.dylib                   0x973f405b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   WebCore                             0x0779b819 WebThreadLock + 73
	5   UIKit                               0x01172a4d -[UITextView setFrame:] + 122
	6   UIKit                               0x0108f33d UIViewCommonInitWithFrame + 882
	7   UIKit                               0x0108ef9a -[UIView initWithFrame:] + 109
	8   UIKit                               0x0109f55b -[UIScrollView initWithFrame:] + 72
	9   UIKit                               0x0116f58a -[UITextView initWithFrame:] + 72
	10  UIKit                               0x0143b75e -[UIAlertView(Private) layout] + 12022
	11  UIKit                               0x014357b0 -[UIAlertView(Private) layoutAnimated:] + 815
	12  UIKit                               0x014358b5 -[UIAlertView(Private) _layoutPopupAlertWithOrientation:animated:] + 123
	13  UIKit                               0x01435acf -[UIAlertView(Private) _layoutIfNeeded] + 530
	14  UIKit                               0x01432b3e -[UIAlertView(Private) _performPopup:animationType:] + 484
	15  UIKit                               0x01435e89 -[UIAlertView(Private) popupAlertAnimated:animationType:atOffset:] + 463
	16  UIKit                               0x01435f0a -[UIAlertView(Private) popupAlertAnimated:animationType:] + 56
	17  UIKit                               0x0143e444 -[UIAlertView showWithAnimationType:] + 48
	18  UIKit                               0x0143e472 -[UIAlertView show] + 41
	19  ???                                 0x0e5a2124 0x0 + 240787748
	20  ???                                 0x11cc9b70 0x0 + 298621808
	21  ???                                 0x11cc876c 0x0 + 298616684
	22  ???                                 0x11cc85a0 0x0 + 298616224
	23  ???                                 0x11aa7fe1 0x0 + 296386529
	24  ???                                 0x11afcd7c 0x0 + 296734076
	25  ???                                 0x09f31c8e 0x0 + 166927502
	26  WcfTestSuite                        0x000128cf mono_jit_runtime_invoke + 1407
	27  WcfTestSuite                        0x0020aaea mono_runtime_invoke + 170
	28  WcfTestSuite                        0x0024afbc mono_async_invoke + 460
	29  WcfTestSuite                        0x0024d626 async_invoke_thread + 870
	30  WcfTestSuite                        0x0024f891 start_wrapper_internal + 641
	31  WcfTestSuite                        0x0024f947 start_wrapper + 23
	32  WcfTestSuite                        0x0029202e thread_start_routine + 206
	33  WcfTestSuite                        0x002c3028 GC_start_routine + 120
	34  libSystem.B.dylib                   0x973bb259 _pthread_start + 345
	35  libSystem.B.dylib                   0x973bb0de thread_start + 34

=================================================================
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 Rolf Bjarne Kvinge [MSFT] 2011-11-29 17:16:03 UTC
This crash is because you're calling into UIKit from a secondary thread (to show a test failure maybe?)
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-04-18 10:19:58 UTC
Closing per comment 1.