Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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
GitHub or 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.
Simple throw like
public static void Main (string  args)
mono --debug show completely wrong stack trace
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber (System.String str, NumberStyles options, System.NumberBuffer& number, System.Globalization.NumberFormatInfo info, Boolean parseDecimal) [0x0000c] in /Users/marek/git/mono/external/referencesource/mscorlib/system/random.cs:54
at System.Number.ParseInt32 (System.String s, NumberStyles style, System.Globalization.NumberFormatInfo info) <0x24dfd60 + 0x000ec> in <filename unknown>:0
at System.Int32.Parse (System.String s) [0x00003] in /Users/marek/git/mono/external/referencesource/mscorlib/system/int64.cs:137
at Test1.Main (System.String args) [0x00006] in /Users/marek/git/mono/mcs/mcs/d.cs:5
This seems to be a problem in the symbol file, mdbdump shows:
<file id="259" name="random.cs" checksum="c7b1b582e85b8715262d0513129461de" />
<method token="0x6001671" signature="System.Void System.Number::StringToNumber(System.String,System.Globalization.NumberStyles,System.Number/NumberBuffer&,System.Globalization.NumberFormatInfo,System.Boolean)">
<entry il="0x0" row="53" col="11" file_ref="259" />
I bisected this to ab47527e0fc8a42854cc87d63e7b84c71b4658c6, no idea why it is causing the problem.
dammit, I know
Its possible that this is caused by some kind of overflow in the debug info writing code.
The cil-stringreplacer.exe probably rewrites the assembly, changing the method tokens, but the .mdb still references the original tokens.
Yes, the issue is that cecil regenerates mdb as well. Have been debugging cecil because of that
Fixed in master
*** Bug 39570 has been marked as a duplicate of this bug. ***