R
- R
Hello all.
I'm new to .Net so please help me out.
I have a application with several "Threads" running to observe various
things. From time to time each thread need to add an log entry, which is
displayed on a form (a datagrid on a form)
there is no database, but i created a dataset using the designer. One
Entity/Table is called Log and contains the log-entries.
The main window opens a OberverHandler class, which opens all the observer-
objects, that contains a timer each (a Threading timer)
Each observer got a reference to ObserverHandler. So when a new log need to
be written, a function on the ObserverHandler is called. This function got
a reference to the dataset through the mainwindow, and it adds the row to
the Log table.
The Log form got a dataView and a ddataGrid. The datagrid.datasource = the
dataview. The dataview opens and makes a = new DataView
(mainWindow.dataset.tables["Log"]) - and is running.
The log-form starts to fill up with the log-entrys, but after a short time
the application fails with a NullReferenceObject or a SEHException.
I tried many different things, including making a local dataTable on the
Log form and add rows to it. All with the same result. No crashes if the
log window is not opened. After it opens there goes from 30 sec's to
several minutes before it crashed.
Any help ?
Is it bad design ?
thanks in advance
- R.
email : rrn at r e sign from dk
--
I'm new to .Net so please help me out.
I have a application with several "Threads" running to observe various
things. From time to time each thread need to add an log entry, which is
displayed on a form (a datagrid on a form)
there is no database, but i created a dataset using the designer. One
Entity/Table is called Log and contains the log-entries.
The main window opens a OberverHandler class, which opens all the observer-
objects, that contains a timer each (a Threading timer)
Each observer got a reference to ObserverHandler. So when a new log need to
be written, a function on the ObserverHandler is called. This function got
a reference to the dataset through the mainwindow, and it adds the row to
the Log table.
The Log form got a dataView and a ddataGrid. The datagrid.datasource = the
dataview. The dataview opens and makes a = new DataView
(mainWindow.dataset.tables["Log"]) - and is running.
The log-form starts to fill up with the log-entrys, but after a short time
the application fails with a NullReferenceObject or a SEHException.
I tried many different things, including making a local dataTable on the
Log form and add rows to it. All with the same result. No crashes if the
log window is not opened. After it opens there goes from 30 sec's to
several minutes before it crashed.
Any help ?
Is it bad design ?
thanks in advance
- R.
email : rrn at r e sign from dk
--