Bug 25293 - Some runtime errors do not report filename and line number (static call)
Summary: Some runtime errors do not report filename and line number (static call)
Status: RESOLVED ANSWERED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger (show other bugs)
Version: 3.8.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2014-12-11 11:56 UTC by frederic.tregon
Modified: 2018-02-28 22:36 UTC (History)
3 users (show)

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


Attachments
minimal source file used to reproduce the issue (218 bytes, text/x-csharp)
2014-12-11 11:56 UTC, frederic.tregon
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 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 ANSWERED

Description frederic.tregon 2014-12-11 11:56:02 UTC
Created attachment 9032 [details]
minimal source file used to reproduce the issue

Reproduced with both Mono 3.2.8 and Mono 3.10.0
===

1. Compile the minimal attached file "Player.cs" with debug options:
---
msc -debug Player.cs
---

2. Execute compile program with debug options
---
mono --debug Player.exe
---

=> Stack trace is displayed:
---
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Player.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at Player.Main (System.String[] args) [0x00000] in <filename unknown>:0 
---

Actual Result:
Stack trace does not include filename nor line number (<filename unknown>:0)

Expected Result:
Stack trace includes filename and line number (/tmp/Player.cs:14)

Note:
If the error is produced outside of the static "Fill()" function, then everything is fine.
Comment 1 Zoltan Varga 2014-12-11 12:11:42 UTC
I can reproduce this with mono 3.10, but not with current mono master.
Comment 2 Zoltan Varga 2015-01-08 04:59:27 UTC
This happens because of inlining, -O=-inline fixes it.