Bug 43410 - Nested exception trying to figure out what went wrong
Summary: Nested exception trying to figure out what went wrong
Status: VERIFIED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: 4.6.0 (C8)
Hardware: PC Mac OS
: --- major
Target Milestone: 4.6.0 (C8)
Assignee: Aleksey Kliger
URL:
Depends on:
Blocks:
 
Reported: 2016-08-16 10:44 UTC by marcos.henrich
Modified: 2016-08-22 14:43 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: Yes
Last known good build:


Attachments

Description marcos.henrich 2016-08-16 10:44:02 UTC
While running:

using System;

class Program {
    public static void Main() {
        try {
            throw new Exception ();
        } catch (Exception e) {
            throw new AggregateException(e);
        }
    }
}

We get the following message:
Unhandled Exception:
System.AggregateException: One or more errors occurred. ---> System.Exception: Exception of type 'System.Exception' was thrown.
  at Program.Main () [0x00000] in <5a4d59dfaed84058b697cd8c496ecebb>:0
   --- End of inner exception stack trace ---
  at Program.Main () [0x00016] in <5a4d59dfaed84058b697cd8c496ecebb>:0
---> (Inner Exception #0) System.Exception: Exception of type 'System.Exception' was thrown.
  at Program.Main () [0x00000] in <5a4d59dfaed84058b697cd8c496ecebb>:0 <---

[ERROR] FATAL UNHANDLED EXCEPTION: Nested exception trying to figure out what went wrong

In C7 was:
Unhandled Exception:
System.AggregateException: One or more errors occurred. ---> System.Exception: Exception of type 'System.Exception' was thrown.
  at Program.Main () [0x00000] in <filename unknown>:0
   --- End of inner exception stack trace ---
  at Program.Main () [0x00016] in <filename unknown>:0
---> (Inner Exception #0) System.Exception: Exception of type 'System.Exception' was thrown.
  at Program.Main () [0x00000] in <filename unknown>:0<---

[ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: One or more errors occurred. ---> System.Exception: Exception of type 'System.Exception' was thrown.
  at Program.Main () [0x00000] in <filename unknown>:0
   --- End of inner exception stack trace ---
  at Program.Main () [0x00016] in <filename unknown>:0
---> (Inner Exception #0) System.Exception: Exception of type 'System.Exception' was thrown.
  at Program.Main () [0x00000] in <filename unknown>:0<---
Comment 1 marcos.henrich 2016-08-16 14:38:22 UTC
This issue occurs was introduced between 89bf42b05f064ec66d142af0e8c92e45b26c821f and 75b33af0f319524cf29301c2ea7a4067ef0b7e3b.

The result of the bisect were:
git bisect start 89bf42b05f064ec66d142af0e8c92e45b26c821f 75b33af0f319524cf29301c2ea7a4067ef0b7e3b

a6bc6cda4adee39419672bf64148a9e0fa8bf9d1 good
6890eab27fd08b56653ff0ad3a1fa86aced732e9 good
4cbef26bb7878187c8bd3a0029e711331e6e4510 bad
60f85567e2d8918fed1c37dd4da3018026328980 bad
599adb077447d35a17477564f7bf8270a3e5ee26 good
164c74028e5e65dc9750a43ef7f8dfc4546f5d7d good
fa65f20cb609a43572f58586c738a87997ce79b2 bad
f1dd6fe7488b0de7fdd8beda7cf3a15cd4f9bce2 bad
79451d22e7b1755ccec8613d8d0b7874fb47f0a9 bad
817f874aac0f2cd09564f625b39b54f03b150544 good
598b8290dee4fe1a4929f57f6a4934ab8148714c bad
bcbd0ac0c018b0a68caa63ac1135052b2082f468 bad

The error was introduced by bcbd0ac0c018b0a68caa63ac1135052b2082f468.
https://github.com/mono/mono/commit/bcbd0ac0c018b0a68caa63ac1135052b2082f468
Comment 2 Aleksey Kliger 2016-08-16 15:53:26 UTC
With mono-4.6.0-branch (d0fc1a66e21eddba20ade505d6880238a0253d9e) I get the expected output, so this regression isn't present in Cycle 8.
Working on a fix for master.
Comment 3 Aleksey Kliger 2016-08-17 19:41:51 UTC
Fixed on master 5ac558548297bd4c42285b244e7abaf5c1cac24b
Comment 4 Naqeeb 2016-08-22 14:43:47 UTC
I have checked this issue with latest master builds and observed that it is working fine. Here is the screencast for the same: 

Screencast: http://www.screencast.com/t/I7JSJxV7YvGJ
Exception output: https://gist.github.com/NaqeebAnsari/11cbd00a4ce745b4baddabd6cda3eaa1

Environment info: https://gist.github.com/NaqeebAnsari/7f31f1597f824d33084c076627339e06

Hence closing this issue.

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