Cross-Threading & fastline.add

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Anaesthesia
Newbie
Newbie
Posts: 13
Joined: Thu Jun 05, 2008 12:00 am

Cross-Threading & fastline.add

Post by Anaesthesia » Sat Oct 18, 2008 6:28 am

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

Anaesthesia
Newbie
Newbie
Posts: 13
Joined: Thu Jun 05, 2008 12:00 am

Post by Anaesthesia » Sat Oct 18, 2008 8:43 pm

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).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 21, 2008 8:53 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 23, 2008 10:19 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Anaesthesia
Newbie
Newbie
Posts: 13
Joined: Thu Jun 05, 2008 12:00 am

Post by Anaesthesia » Thu Oct 23, 2008 7:07 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 24, 2008 9:25 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Anaesthesia
Newbie
Newbie
Posts: 13
Joined: Thu Jun 05, 2008 12:00 am

Post by Anaesthesia » Sun Oct 26, 2008 6:21 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 27, 2008 11:59 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Anaesthesia
Newbie
Newbie
Posts: 13
Joined: Thu Jun 05, 2008 12:00 am

Post by Anaesthesia » Thu Oct 30, 2008 9:50 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 31, 2008 8:57 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply