I've faced some rather strange problem when writing a C# code. I have the following classes:
A Node class:
class Node { public char value; public Node left; public Node right; public Node(char _value) { value = _value; left = null; right = null; } }
A Tree class:
class Tree { private Node root; public Tree(Node _root) { root = _root; } public void Inorder(Node root) { Inorder(root.left); Console.WriteLine(root.value); Inorder(root.right); } }
In Main, I wrote something like:
Node n1 = new Node('a'); Tree tree = new Tree(n1); tree.Inorder(n1);
An unhandled exception briefly appears in the console, then my computer crashes and the "blue screen of death" appears with the following piece of information:
- Stop code: KMODE_EXCEPTION_NOT_HANDLED
- What failed: clipsp.sys
When I try to open my Main file after the computer is restarted, it contains this:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Mi
Now I know my code is not right (there is a null unhandled exception, because it tries to find the left child of a "null" node), but I'm pretty sure my computer shouldn't behave like this.
I've disabled my Fast Startup feature as I found this on the internet, but it still crashes. If somebody has any idea where the problem is, I would be grateful.