Bug 8322 - malloc: *** error for object 0x7fbbd8ce8250: pointer being freed was not allocated
Summary: malloc: *** error for object 0x7fbbd8ce8250: pointer being freed was not allo...
Status: RESOLVED DUPLICATE of bug 6998
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-11-09 18:35 UTC by Mark Miller
Modified: 2012-11-12 13:50 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Build log as requested (120.79 KB, text/plain)
2012-11-12 12:51 UTC, Mark Miller
Details


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 6998

Description Mark Miller 2012-11-09 18:35:41 UTC
while archiving for AdHoc under iOS 6 the process ends with the following logs:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -gdwarf-2 -miphoneos-version-min=6.0 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -c /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/registrar.m -o /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/registrar.7.o   
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -gdwarf-2 -miphoneos-version-min=6.0 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -c /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/main.m -o /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/main.7.o   
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -gdwarf-2 -miphoneos-version-min=6.0  -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Transactions.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Core.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/Mono.Security.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Data.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/UnitronicsComDriverMono.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Xml.Linq.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/Mono.Data.Sqlite.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Xml.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/monotouch.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/RemoteOperatorIpad.exe.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/UnitronicsRemoteAccessMono.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/mscorlib.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/registrar.7.o /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/main.7.o -o /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/RemoteOperatorIpad -framework CFNetwork -framework Foundation -framework UIKit -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreFoundation -framework CoreGraphics -lz -u _mono_pmip -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -liconv -lmono-2.0 -lmonotouch -L/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib -dead_strip
Process exited with code 1, command:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -gdwarf-2 -miphoneos-version-min=6.0  -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Transactions.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Core.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/Mono.Security.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Data.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/UnitronicsComDriverMono.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Xml.Linq.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/Mono.Data.Sqlite.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Xml.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/monotouch.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/RemoteOperatorIpad.exe.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/UnitronicsRemoteAccessMono.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/mscorlib.dll.7.o  /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/registrar.7.o /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/main.7.o -o /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/RemoteOperatorIpad -framework CFNetwork -framework Foundation -framework UIKit -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreFoundation -framework CoreGraphics -lz -u _mono_pmip -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -liconv -lmono-2.0 -lmonotouch -L/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib -dead_strip
collect2: ld terminated with signal 6 [Abort trap: 6]
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in method_addresses from /var/folders/v7/9yfz7blj5xnbr859zv43z2qh0000gn/T/tmp652b9301.tmp/System.Transactions.dll.7.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
ld(1471,0x7fff79598960) malloc: *** error for object 0x7fbbd8ce8250: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

mtouch exited with code 1
Comment 1 Sebastien Pouliot 2012-11-12 08:26:15 UTC
This part of the build log is likely "too late" to show the real issue. Recent version of MonoTouch do not uses the native linker (ld) option listed in the warning. The actual error is likely unrelated to the warning.

Could you:

* Provide all the versions information of your system. You can get them from "MonoDevelop" menu, "About MonoDevelop" item, "Version Information" tab. Click on the "Copy Version Information" button and paste this into this bug report.

* Add "-v -v -v" to your project options, in the "Additional mtouch arguments".
That will augment the log verbosity so we'll have more clues about what
happended in the build process;

* Clean and re-build your project

* Attach the build log (copy/paste from MonoDevelop's Build Log, inside the
Error List pad) to this bug report (you can mark the attachment as private).

We'll review this asap. Thanks!
Comment 2 Mark Miller 2012-11-12 12:42:31 UTC
MonoDevelop 3.0.4.7
Installation UUID: b62e8095-096f-404b-a2a6-e9cad6709ca8
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.5 (1839)
	 Build 4G182
Mono for Android: Not Installed

Monotouch: 5.2.12
Build information:
	Release ID: 30004007
	Git revision: ea0108260c6a376ecaeffcdb7d03387bd51edda3
	Build date: 2012-09-17 14:09:17+0000
	Xamarin addins: ec43fd5cb223ead4234a9858d1b56eef03dad53a-dirty
Operating System:
	Mac OS X 10.7.5
	Darwin new-host.home 11.4.2 Darwin Kernel Version 11.4.2
	    Thu Aug 23 16:25:48 PDT 2012
	    root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
Comment 4 Mark Miller 2012-11-12 12:53:03 UTC
Comment on attachment 2907 [details]
Build log as requested

This log is post clean/build as requested.
Comment 5 Sebastien Pouliot 2012-11-12 13:50:33 UTC
Weird, I'm surprised it build that far.

MonoTouch 5.2.x is not compatible with Xcode 4.5 - since the later changed the format (xml to binary) for some Info.plist configuration files. You need at least MonoTouch 5.4 to support Xcode 4.5. I'm not sure how/why you did not hit this issue.

Also 5.2.12 (and earlier versions) had a ref count issue with iOS6 [1]. So MonoTouch 5.2.13 should be the very minimum to use to avoid those issues (e.g. when using Xcode 4.4 or earlier).

The crash you reported occurs inside `ld` (native linker) is an Apple bug (in Xcode 4.4+) that happens in some builds (but not in others). We have a workaround for this in MonoTouch 6.0 and later releases.

Bottom line: if you want ot build iOS6 apps w/Xcode 4.5 (SDK 6.0) you need MonoTouch 6.0.x. Older version will only work with the older (then current) tooling.


[1] http://blog.xamarin.com/2012/08/13/important-ios-6-information-for-monotouch-users.
[2] bug #6998

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