Bug 39729 - [regression] Stacktraces debug support
Summary: [regression] Stacktraces debug support
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
: 39570 ()
Depends on:
Blocks:
 
Reported: 2016-03-17 16:56 UTC by Marek Safar
Modified: 2016-03-23 18:05 UTC (History)
4 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 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.

Related Links:
Status:
RESOLVED FIXED

Description Marek Safar 2016-03-17 16:56:42 UTC
Simple throw like

class Test1
{
	public static void Main (string [] args)
	{
		int.Parse ("asdfasd");
		return;
	}
}

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
Comment 1 Zoltan Varga 2016-03-18 19:27:48 UTC
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&amp;,System.Globalization.NumberFormatInfo,System.Boolean)">
      <sequencepoints>
        <entry il="0x0" row="53" col="11" file_ref="259" />
      </sequencepoints>
      <locals />
      <scopes />
    </method>
Comment 2 Zoltan Varga 2016-03-18 22:15:56 UTC
I bisected this to ab47527e0fc8a42854cc87d63e7b84c71b4658c6, no idea why it is causing the problem.
Comment 3 Marek Safar 2016-03-18 22:18:20 UTC
dammit, I know
Comment 4 Zoltan Varga 2016-03-21 11:24:03 UTC
Its possible that this is caused by some kind of overflow in the debug info writing code.
Comment 5 Zoltan Varga 2016-03-23 11:22:23 UTC
The cil-stringreplacer.exe probably rewrites the assembly, changing the method tokens, but the .mdb still references the original tokens.
Comment 6 Marek Safar 2016-03-23 12:11:23 UTC
Yes, the issue is that cecil regenerates mdb as well. Have been debugging cecil because of that
Comment 7 Marek Safar 2016-03-23 14:48:24 UTC
Fixed in master
Comment 8 Zoltan Varga 2016-03-23 18:05:46 UTC
*** Bug 39570 has been marked as a duplicate of this bug. ***