Bug 37766 - MonoMac Registrar error: We don't know how many blocks we have?
Summary: MonoMac Registrar error: We don't know how many blocks we have?
Status: RESOLVED DUPLICATE of bug 33493
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-18 11:28 UTC by Thomas Van den Bossche
Modified: 2016-01-18 16:04 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 DUPLICATE of bug 33493

Description Thomas Van den Bossche 2016-01-18 11:28:04 UTC
During compilation of our iOS apps, the following error occurs:
"[11:56:24][Step 2/2] /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->
[11:56:24][Step 2/2] 
[11:56:24][Step 2/2] 	/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: error : Tool exited with code: 134. Output: Xamarin.iOS 9.4.0 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk
[11:56:24][Step 2/2] We don't know how many blocks we have?
[11:56:24][Step 2/2] Stacktrace:
[11:56:24][Step 2/2] 
[11:56:24][Step 2/2]   at <unknown> <0xffffffff>
[11:56:24][Step 2/2]   at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <0xffffffff>
[11:56:24][Step 2/2]   at (wrapper alloc) object.AllocVector (intptr,intptr) <0xffffffff>
[11:56:24][Step 2/2]   at System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>.Resize (int,bool) <0x000b3>
[11:56:24][Step 2/2]   at System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>.Resize () <0x00037>
[11:56:24][Step 2/2]   at System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>.Insert (TKey_REF,TValue_REF,bool) <0x002b1>
[11:56:24][Step 2/2]   at System.Collections.Generic.Dictionary`2<TKey_REF, TValue_REF>.set_Item (TKey_REF,TValue_REF) <0x00020>
[11:56:24][Step 2/2]   at MonoMac.Registrar.Registrar/ObjCType.AddToMap (MonoMac.Registrar.Registrar/ObjCMember,System.Collections.Generic.List`1<System.Exception>&) <0x002c2>
[11:56:24][Step 2/2]   at MonoMac.Registrar.Registrar/ObjCType.Add (MonoMac.Registrar.Registrar/ObjCMethod,System.Collections.Generic.List`1<System.Exception>&) <0x000da>
[11:56:24][Step 2/2]   at MonoMac.Registrar.Registrar.RegisterTypeUnsafe (Mono.Cecil.TypeReference,System.Collections.Generic.List`1<System.Exception>&) <0x04087>
[11:56:24][Step 2/2]   at MonoMac.Registrar.Registrar.RegisterAssembly (Mono.Cecil.AssemblyDefinition) <0x0022b>
[11:56:24][Step 2/2]   at MonoMac.Registrar.StaticRegistrar..ctor (System.Collections.Generic.IEnumerable`1<Mono.Cecil.AssemblyDefinition>,bool,bool) <0x006dc>
[11:56:24][Step 2/2]   at MonoMac.Registrar.StaticRegistrar.Generate (System.Collections.Generic.IEnumerable`1<Mono.Cecil.AssemblyDefinition>,bool,bool) <0x00050>
[11:56:24][Step 2/2]   at MTouch.RunRegistrar (System.Collections.Generic.List`1<MonoTouch.Assembly>,string,string,bool,bool,string) <0x0016d>
[11:56:24][Step 2/2]   at MonoTouch.Target.Compile () <0x00376>
[11:56:24][Step 2/2]   at MonoTouch.Application.BuildApp () <0x003aa>
[11:56:24][Step 2/2]   at MonoTouch.Application.Build () <0x000ee>
[11:56:24][Step 2/2]   at MTouch.Main2 (string[]) <0x074c7>
[11:56:24][Step 2/2]   at MTouch.Main (string[]) <0x00069>
[11:56:24][Step 2/2]   at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>
[11:56:24][Step 2/2] 
[11:56:24][Step 2/2] Native stacktrace:
[11:56:24][Step 2/2] 
[11:56:24][Step 2/2] 	0   mtouch                              0x00000001011c38be get_mtouch_full_path + 1722878
[11:56:24][Step 2/2] 	1   mtouch                              0x00000001011cef8e get_mtouch_full_path + 1769678
[11:56:24][Step 2/2] 	2   libsystem_platform.dylib            0x00007fff895e9f1a _sigtramp + 26
[11:56:24][Step 2/2] 	3   ???                                 0x0000000000000006 0x0 + 6
[11:56:24][Step 2/2] 	4   libsystem_c.dylib                   0x00007fff919709ab abort + 129
[11:56:24][Step 2/2] 	5   mtouch                              0x000000010141b1d3 get_mtouch_full_path + 4178707
[11:56:24][Step 2/2] 	6   mtouch                              0x000000010141b0e2 get_mtouch_full_path + 4178466
[11:56:24][Step 2/2] 	7   mtouch                              0x000000010141b349 get_mtouch_full_path + 4179081
[11:56:24][Step 2/2] 	8   mtouch                              0x000000010139fbcc get_mtouch_full_path + 3673356
[11:56:24][Step 2/2] 	9   mtouch                              0x0000000101397264 get_mtouch_full_path + 3638180
[11:56:24][Step 2/2] 	10  mtouch                              0x00000001013939f9 get_mtouch_full_path + 3623737
[11:56:24][Step 2/2] 	11  mtouch                              0x0000000101392924 get_mtouch_full_path + 3619428
[11:56:24][Step 2/2] 	12  mtouch                              0x0000000101392600 get_mtouch_full_path + 3618624
[11:56:24][Step 2/2] 	13  mtouch                              0x000000010139c76f get_mtouch_full_path + 3659951
[11:56:24][Step 2/2] 	14  mtouch                              0x000000010137e8c7 get_mtouch_full_path + 3537415
[11:56:24][Step 2/2] 	15  mtouch                              0x000000010133489e get_mtouch_full_path + 3234270
[11:56:24][Step 2/2] 	16  ???                                 0x0000000102f178f6 0x0 + 4344346870
[11:56:24][Step 2/2] 	17  ???                                 0x0000000102fe23b4 0x0 + 4345177012
[11:56:24][Step 2/2] 
[11:56:24][Step 2/2] =================================================================
[11:56:24][Step 2/2] Got a SIGABRT while executing native code. This usually indicates
[11:56:24][Step 2/2] a fatal error in the mono runtime or one of the native libraries 
[11:56:24][Step 2/2] used by your application.
[11:56:24][Step 2/2] ================================================================="

This seems to only happen on our CI server (TeamCity 8.1.2 (build 29993)). We never had this error on our local development machines.
The strange thing is that when we retry the build (without any changes) it will succeed.

Installation information CI server:
=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: c8d9d174-a2c8-4101-870c-d07ece81c653
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.30.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.0.0 (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

=== Xamarin.Android ===

Version: 6.0.0.34 (Business Edition)
Android SDK: /../Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.0

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.0.109 (Starter Edition)

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.2
Darwin 15.2.0 Darwin Kernel Version 15.2.0
    Fri Nov 13 19:56:56 PST 2015
    root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-01-18 12:05:39 UTC
Is this reproducible, or does it just happen randomly?
Comment 2 Thomas Van den Bossche 2016-01-18 14:33:21 UTC
Randomly.
I cannot point to a specific change in code because running the build again without code changes "fixes" the issue.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2016-01-18 16:04:53 UTC
This is a bug in the GC, and is probably a duplicate of bug #33493.

In that case this bug will be fixed in the next major release.

*** This bug has been marked as a duplicate of bug 33493 ***