Page 1 of 1

Cross-Threading & fastline.add

Posted: Sat Oct 18, 2008 6:28 am
by 13049268
Dear Narcis,
I'm developing an application which charts four channels of real-time data physiological waveform data every 20 msecs. (At the same time, the application is also solving a series of differential equations. ) When run under XP it works fine, but under Vista it occasionally stops painting the new data points.

No exceptions are thrown, and, using the debugger, it is possible to see that the points are still being added to the series correctly, but are not being drawn.

I’m using the multimedia timer. It is possible to replicate the problem under XP by running the plotting timer on a different thread. The fastline series does not allow me access to ‘invokerequired’ so I cannot use delegation.
I have written a small application which illustrates the problem if this helps.
Yours Sincerely,
Andy

Posted: Sat Oct 18, 2008 8:43 pm
by 13049268
Footnote: I've now been able to delegate fastline.add, but the problem still persists when I use a multi-threaded timer (even at low clock frequencies).

Posted: Tue Oct 21, 2008 8:53 am
by narcis
Hi Anaesthesia,

Yes please, send us a simple example project we can run "as-is" to reproduce the problem here.

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Thu Oct 23, 2008 10:19 am
by narcis
Hi Anaesthesia,

Thanks for the example project but I'm not able to run it here because of the following error:

Error 137 Resource file "Properties\Resources.resx" cannot be found. WaveformTest


Could you please resend you project including its "Properties" folder? "bin" and "obj" folders are not necessary.

Thanks in advance.

Posted: Thu Oct 23, 2008 7:07 pm
by 13049268
Dear Narcis,

I've posted the new zip file.

I'm not sure if Multimedia.dll is in the right place for compilation, but it is included.

Many thanks,
Andy

Posted: Fri Oct 24, 2008 9:25 am
by narcis
Dear Andy,

Thanks for the example project. I can run it here now but I'm not able to reproduce the issue here. Does the problem happen randomly or under some specific circumstances? Should I have the application running for some time for the error to occur?

Thanks in advance.

Posted: Sun Oct 26, 2008 6:21 pm
by 13049268
Dear Narcis,

I'm perplexed!

When I comment out timer1 and use the threaded timer
ie:

//timer1.Enabled = true;
//waveformtimerThread.Start();
waveformtimer.Start();

The application does not paint the data points unless you break and restart execution!

Is that not the same with you?

Andy

Posted: Mon Oct 27, 2008 11:59 am
by narcis
Hi Andy,

Thanks for the information. I could reproduce the issue here now.

You said you can reproduce a problem that looks the same using a threaded timer. Do you think original problem and the threaded timer problem are related. Other than looking more or less the same, do you have any concrete evidence that the two problems are related?

We'd like to try and reproduce the original problem on Vista. Could you please send us the assemblies you used to reproduce the problem and let us know for how long we should run them before expecting to see it?

Thanks in advance.

Posted: Thu Oct 30, 2008 9:50 pm
by 13049268
Dear Narcis,

Sorry for the delay.

The assemblies for the project are quite large (~ 5-10Mb), does that matter?

The application stops painting somewhere between 5 to 20 minutes after initiation. No exceptions are thrown, but if you turn on the debugger in the ontickTimer event, you see that the data are being added appropriately.

I don't have any evidence that the XP problem is the same as the Vista problem except to say that the symptoms are identical.

In the specimen I sent you, neither do I understand why the XP version will not run initially with a threaded timer. In my main application I use an identical invocation sequence and it always rune perfectly!

Hope this helps,

Andy

Posted: Fri Oct 31, 2008 8:57 am
by narcis
Hi Andy,

Ok, you can try posting the files at the upload page and if they fail you could send them to us using www.yousendit.com and sending them to info at steema dot com to my attention.

Thanks in advance.