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: NEW
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: 2015-01-08 04:59 UTC (History)
2 users (show)

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

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.

Note You need to log in before you can comment on or make changes to this bug.