I have a program running a background worker process, with the following code (below). When i am debugging the program, the process executes, reports and completes correctly. On my release build, the program stop at a specific point.
Is there anyway to determine the actual stopping point and see what is going on when in release mode
I've determined (by logging after each line) that the program stops the following code, on the fill command. I dont understand why it doesn't give me an errors in debugging mode, but freezes in release mode. Can anyone offer any suggestions please
TryLog.WriteLog(
"Filling Colour Table Now", Now.ToShortTimeString) Me.ColoursTableAdapter.Fill(Me.RangeData.Colours)Log.WriteLog(
"Fill Complete", Now.ToShortTimeString) Catch ex As ExceptionMessageBox.Show(
"Some Colour Lines could not be added to the Database" & vbCrLf & _ "This is most likely to due to the fact that duplicate" & vbCrLf & _ "short colour descriptions exist", "Some Records Not Added..", MessageBoxButtons.OK, MessageBoxIcon.Information) End TryLog.WriteLog(
"Process Complete", Now.ToShortTimeString)Label1.Visible =
False End Sub
Program running ok in debug mode, but not in release mode
kilo94
I determined, that it has something to do with the datasource/datagridview being used to display the data
I disabled the datamember for the coloursbindingsource when the user starts the worker (me.coloursbindingsource.datamember = "") and enabled it when the worker finished (me.coloursbindingsource.datamember = "Colours")
This has stopped the program from freezing.
Is this a good idea, or do i have an underlying problem with the basic process i am using to fill the datagrid and display the data. I can provide more code samples if someone wants to look at it
Cheers
Mc