Q:

C# application is closed unexpectedly!

I'm having a very frustrating problem. I have a c# win application. When I have clicked the button, the program closes itself after executed the click event handler. Even if I have debugged the code unfortunately I can't see any error, It just quits the program.
Where am I going wrong?
Here is the Code:
private void btnOpenFolder_Click(object sender, EventArgs e)
    {
            DialogResult dg = fd1.ShowDialog();
            if (dg == DialogResult.OK)
            {
                lblInput.Text = fd1.SelectedPath;
                btnOpenFolder.Enabled = false;
                timerCallback = new TimerCallback(tmrQualityEvent);
                tmrQuality = new System.Threading.Timer(timerCallback, null, 0, 1000);
                Thread qualityThread = new Thread(new ThreadStart(QualityMapOpenFolder));
                qualityThread.Start();
                QualityMapOpenFolder();
            }
    }

void QualityMapOpenFolder()
    {
        fileList.Clear();
        string path = lblInput.Text;
        if (Directory.Exists(path))
        {
            foreach (var file in Directory.GetFiles(path))
            {
                if (Path.GetExtension(file) != ".kml")
                {
                    fileList.Add(file);
                }
            }
            SetProgressBarValue(0);
            ChangeFileNameLabel(fileList[0]);
            FileName = fileList[0];
        }
        else
            SetText("Please make sure you have correctly set the open folder path!", true);

        dataListQuality = GetInputData();

        SetText("Calculated Data has been created, please click process files...", false);
        SetProcessButtonStatus(true);
    }

A:

Attach an event handler to the UnhandledException handler and log it. Should help you to find out why your application is crashing.
Update: Now that you have posted some code:

You seem to update UI elements from another thread which you start. You should access UI components only from the thread on which they were created (usually the main thread). Consider using a BackgroundWorker
You start the QualityMapOpenFolder method on a thread and then you also call it after you started the thread - this seems a bit weird and has probably some unexpected side effects.

