Bug 23205 - ConvertPdbToMdbTask causes System.ArgumentException:
Summary: ConvertPdbToMdbTask causes System.ArgumentException:
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.6
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-09-19 17:11 UTC by Cody Beyer (MSFT)
Modified: 2015-10-06 17:06 UTC (History)
8 users (show)

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

Description Cody Beyer (MSFT) 2014-09-19 17:11:48 UTC
Error Details:
Error 116 The "ConvertPdbToMdbTask" task failed unexpectedly.
System.ArgumentException: Decimal byte array constructor requires an array of length four containing valid decimal bytes.
at System.Decimal.SetBits(Int32[] bits)
at Microsoft.Cci.Pdb.BitAccess.ReadDecimal()
at Microsoft.Cci.Pdb.PdbConstant..ctor(BitAccess bits)
at Microsoft.Cci.Pdb.PdbScope..ctor(BlockSym32 block, BitAccess bits, UInt32& typind)
at Microsoft.Cci.Pdb.PdbFunction..ctor(String module, ManProcSym proc, BitAccess bits)
at Microsoft.Cci.Pdb.PdbFunction.LoadManagedFunctions(String module, BitAccess bits, UInt32 limit, Boolean readStrings)
at Microsoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModule(BitAccess bits, DbiModuleInfo info, IntHashTable names, ArrayList funcList, Boolean readStrings, MsfDirectory dir, Dictionary`2 nameIndex, PdbReader reader)
at Microsoft.Cci.Pdb.PdbFile.LoadFunctions(Stream read, BitAccess bits, Boolean readAllStrings)
at Pdb2Mdb.Converter.Convert(String filename)
at Xamarin.iOS.Tasks.ConvertPdbToMdbTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() AvocetiOS

Visual Studio & Xamarin Version Information:
Microsoft Visual Studio Ultimate 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51650

Installed Version: Ultimate

Xamarin (49abddaaec0a8be4cb890b8cddefed81727bbe6c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (2a7b68212b17c903160fbd8e0106babb299d1be3)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (b38baf1c655f9fe816fee25cbd7ac78225def3e9)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Dan Rigby 2014-09-19 21:38:04 UTC
Including the following method in any class in the application or any library it references will cause the error:

private void TestMethod()
    const decimal a = 4.343524261523267M;
Comment 3 Sadik Ali 2014-09-22 06:04:23 UTC
I have checked this issue and I am able to reproduce this issue

Steps I followed:
1. Create an iPhone single view application in VS 2013
2. Create the following class in "RootViewController.cs"
    public class Class1
        private void TestMethod()
            const decimal a = 4.34352426152326M;

3. Build the project.

I observed that when, I write the above class in iOS project and build the project I am getting and error i.e ""ConvertPdbToMdbTask" task failed unexpectedly.". I tried the same with library project and I am getting same behavior with library project also.

Note: If I remove the "const" keyword from the decimal variable a I am not getting any error and solution builds successfully.

Screencast: http://www.screencast.com/t/O2mcgXkAjA

Error details: https://gist.github.com/saurabh360/3ac23afa876eb7aa90b9
Build Output: https://gist.github.com/saurabh360/6b44c500a8d5c7c47ba5

Environment Info:

Windows Info:

Windows 7 (64-bit)
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin (49abddaaec0a8be4cb890b8cddefed81727bbe6c)
Xamarin.Android (2a7b68212b17c903160fbd8e0106babb299d1be3)
Xamarin.iOS (b38baf1c655f9fe816fee25cbd7ac78225def3e9)

Mac Info:

Mac OS X 10.9.5
Xamarin Studio: 5.4 (build 240)
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)
Xcode 6.0.1 (6528)
Xamarin.iOS: (Business Edition)
=== Build Information ===
Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 10:58:48-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3
Comment 4 JW 2015-05-06 11:07:07 UTC
I'm also seeing this when adding an F# PCL to the an iOS solution.
Comment 5 Joaquin Jares 2015-10-06 17:06:40 UTC
This is not a repro anymore. Marking as fixed for verification.