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 for Bug 31248 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the original description:
In special cases on GitHub you might also want the comments: GitHub Markdown with public comments
*** Bug 33738 has been marked as a duplicate of this bug. ***
@joj, you looked into that bug. is it VS bug or XA? should I reassign it to you or should I look into it?
I believe this should now be fixed in monodroid master ( https://trello.com/c/UfWgSEmB/217-xa-rework-pdb-mdb-conversion-to-generate-mdb-in-outputdir-of-project)
I have checked this issue with XVS 99.0.0.244 and observed that this issue still exist. Hence reopening this issue.
Answering radek: thi repros in XS too. I think it’s XA.
Tried to reproduce it here in XS. It works OK. I will try it on Windows as well, maybe it is something related to Win, pdb2mdb maybe?
I believe this was a windows only issue, and after talking with Dean yesterday I was under the impression that this would potentially be fixed by the recent pdb2mdb changes in master?
It is a windows only-issue related to pdb2mdb. It's supposed to be working too, but our tests show that the issue is still present. We're bumped to HEAD of monodroid, so that should be ok too. The fix from Dean got in day before yesterday, though, so this might be solved by simply testing with the latest bits from yesterday.
So the mdb on windows doesn't contain row 55 for the delegate method, which seems related. mcs: <method token="0x6000015" signature="System.Void MyRegressionTest.MainActivity/<OnCreate>c__AnonStorey0::<>m__0(System.Object,System.EventArgs)"> <sequencepoints> <entry il="0x0" row="51" col="4" file_ref="1" /> <entry il="0x1" row="53" col="5" file_ref="1" /> <entry il="0x8" row="53" col="5" file_ref="1" /> <entry il="0xe" row="54" col="5" file_ref="1" /> <entry il="0x34" row="54" col="26" file_ref="1" /> <entry il="0x39" row="54" col="12" file_ref="1" /> <entry il="0x3e" row="55" col="4" file_ref="1" /> </sequencepoints> <locals /> <scopes /> </method> </methods> pdb2mdb: <method token="0x6000015" signature="System.Void MyRegressionTest.MainActivity/<>c__DisplayClass1::<OnCreate>b__0(System.Object,System.EventArgs)"> <sequencepoints> <entry il="0x0" row="51" col="4" end_row="51" end_col="5" file_ref="1" /> <entry il="0x1" row="53" col="5" end_row="53" end_col="22" file_ref="1" /> <entry il="0xe" row="54" col="5" end_row="54" end_col="58" file_ref="1" /> <entry il="0x3f" row="54" col="0" file_ref="1" /> </sequencepoints> <locals> <entry name="CS$0$0000" il_index="0" scope_ref="1" /> </locals> <scopes> <entry index="0" start="0x0" end="0x40" /> </scopes> </method> I will check older versions, to see if that generated mdb for that anonymous delegate changed.
I see the same behavior in XS from stable channel (XA 5.1.6). My guess is that it might be a change in the MS C# compiler output? @Rajneesh, could you please attach MyRegressionTest.dll.mdb and MyRegressionTest.pdb from the working version (stable XVS 3.11.590)? Do you know which C# compiler does it use?
Created attachment 13244 [details] Mdb_Pdb file attached. @Radek I have attached MyRegressionTest.dll.mdb and MyRegressionTest.pdb from the working version (stable XVS 3.11.590) within this comment. And it is using Visual C# Compiler version 1.0.0.50618 with VS 2015 Screencast: http://www.screencast.com/t/bvtsuRS8y Thanks..!
Changing its status Needinfo to Confirmed. Thanks..!
@Rajneesh, thanks! I forgot to ask for the dll file as well. Could you please attach the MyRegressionTest.dll?
Created attachment 13245 [details] Mdb_Pdb_Dll file attached I have attached MyRegressionTest.dll.mdb, MyRegressionTest.pdb and MyRegressionTest.dll from the working version (stable XVS 3.11.590) within this comment. Also With VS 2012 it is using Visual C# Compiler version 4.6.0079.0 Screencast: http://www.screencast.com/t/zPfwL6y3H5Rm Thanks..!
Thanks. The mdb from last attachment indeed contains the row 55 in the delegate method. <method token="0x600000b" signature="System.Void MyRegressionTest.MainActivity/<>c__DisplayClass5_0::<OnCreate>b__0(System.Object,System.EventArgs)"> <sequencepoints> <entry il="0x0" row="51" col="4" file_ref="1" /> <entry il="0x1" row="53" col="5" file_ref="1" /> <entry il="0xe" row="54" col="5" file_ref="1" /> <entry il="0x46" row="55" col="4" file_ref="1" /> </sequencepoints> <locals /> <scopes /> </method> Now to find out whether that difference exists in the pdbs already.
So, in the working pdb, the delegate indeed contains the line 55 ** <OnCreate>b__0 line 51 at [000000BC][0001:000000BC], len = 0x1 C:\Users\Rajneesh\Downloads\MyRegressionTest\MyRegressionTest\MainActivity.cs line 53 at [000000BD][0001:000000BD], len = 0xD line 54 at [000000CA][0001:000000CA], len = 0x38 line 55 at [00000102][0001:00000102], len = 0x1 while the non-working pdb, hides that part (with 16707566 = 0xfeefee value) ** <OnCreate>b__0 line 51 at [0000005A][0001:0000005A], len = 0x1 n:\Xamarin\MyRegressionTest\MyRegressionTest\MainActivity.cs line 53 at [0000005B][0001:0000005B], len = 0xD line 54 at [00000068][0001:00000068], len = 0x31 line 16707566 at [00000099][0001:00000099], len = 0x1 It looks to me that this happens outside of XA. I guess it is result of how newer MS C# compiler behaves? Zoltan, what is your opinion on this? (I guess as you work on sdb, you might know more about that)
Created attachment 13330 [details] pdb dump of "working" build
Created attachment 13331 [details] pdb dump of "non-working" build
On my Windows 10 box here, I am able to reproduce this issue consistently when only swapping out the XVS version installed on disk. I can reproduce this issue in both XS and VS 2015, and from what I can tell it doesn't appear to be a result of me using a different c# compiler. If I create a new hello world template and set a breakpoint on the button.Text assignment in the click delegate, I am able to consistently hit that break point where I set it using the current stable XVS (3.11.1537). However, after installing the current cycle 6 alpha, the breakpoint is resolved on one of the trailing braces of the delegate. I also able to resolve breakpoints as expected using the current stable and the attached test case.
Peter, the behavior you describe is fixed by Dean change IIRC, it just wasn't applied to C6 branch yet, works OK with master. That's the mdb location issue, the project assembly mdb file is missing in the bin/<Configuration>/. Dean, do you know when it will land in C6 branch? The issue I am trying to fix is the remaining issue with the end brace breakpoint. I think this issue should not block C6 and is compiler related AFAIK. I am trying to make a workaround for it in the pdb2mdb translator.
The other change is just waiting for Cherry Pick approval.. afaik its good to go
BTW, I am unable to reproduce the end brace issue locally. So I think the issue applies only to some VS or MS C# versions. I use VS 2015, MS Visual C# Compiler 1.0.0.0.50618
My mistake. I definitely conflated this and Bug #34478 in Comment #19. The core behavior being tracked here is the first debugger stop during app launch resolves wrong trailing brace on startup. I can reproduce that on our current stable, and this behavior has been the same all the way back to at least C5SR2 (XA 5.1.4.16). I see the same behavior in XS, VS 2012, 2013 and 2015. I'm unable to reproduce this specific issue on XA 4.20.x builds (XVS 3.9.x). In this case, the debugger does not stop _anywhere_ on app start up. Neither the second breakpoint (on the first brace) nor the second brace are ever hit during debugging. I'm going to lower the severity here slightly, I believe that this is not something we need to attempt to rush to fix for cycle6-baseline. This behavior has been the same in the stable channel for roughly four months now, and my perceived impact of the issue at hand is not critical enough to warrant us breaking freeze.