system.sound crashing DAQFactory


ccdubs
 Share

Recommended Posts

Hi,

We have an instance of DF that has been running for many years reliably. Our client has gone and installed windows updates and now DF crashes when it tries to implement the following line of script. I have put this in a Try/Catch function and it still crashes every time. We are running on the back-up machine that doesn't have the latest updates installed and that is running fine.

"System.Sound.Play("C:\Windows\Media\ding.wav")

I can confirm that the wav file is in that directory and I can play it when double clicking from file explorer. DF version Pro Release 5.87b Build: 2048 is running.

Any help will be greatly appreciated.

Also, what are your recommendations regarding updates. Automatic updates are turned off.

Thanks.

 

Link to comment
Share on other sites

Which version of Windows?

You might consider using shellexecute() instead to trigger playing the file.  That will move the actual playing of the sound to a separate process.

Auto updates should definitely be turned off for 24x7 operation, otherwise you'll get drop outs when update occurs.  Win 10 makes turning auto-updates off unfortunately rather difficult.  Unfortunately, all OS's have security holes that need to be patched from time to time.  Most updates, however, are not really needed for systems that are only being used for SCADA.  Its when you use the same system for browsing the web, or checking email, that current updates become more important.  So if your system is only being used for SCADA, you can probably turn auto-updates off, then do manual updates every so often when it is convenient for your operation.  

It also really helps if you keep your SCADA PC isolated, if only by putting a router between it and the rest of your LAN.  I do that with my workstation to keep it isolated from everyone else.  I can still access the rest of the network, but the rest of the network can't access me.

 

Link to comment
Share on other sites

The PC's are running Windows 8.1 Pro.

The ding.wav file is used as audio alert when there is an active alarm and is driven by a script that runs every couple of seconds, so I don't think using the shellexecute function is the best option.

We have no control over how the PC is connected to a network. I believe it is secure but I know that is has access to the internet so am keen to keep windows up to date. I was thinking about upgrading to the latest version of DF but am concerned about compatibility and whether there will be issues due to the age of the version being upgraded.

What do you recommend? Would you expect an upgrade to resolve the System.Sound.Play issue?

Link to comment
Share on other sites

An upgrade won't fix the problem.  We haven't touched the sound part in many, many years.  The issue is caused by the Windows update, and we have a second report of this issue.  That person tried the latest DAQFactory and it didn't help.  For now, you are going to have to use system.shellExecute() or roll back the update.

Link to comment
Share on other sites

I still can't reproduce.  Can you check your event log, or provide screenshots of error messages that might display when the crash occurs.  These often tell which module the crash occurred in.  Alternatively, if I can remote into your system and take a look that would be great.  Contact us directly if that works for you.

Link to comment
Share on other sites

Unfortunately remote connection is not possible. I will have a look at what I can find over the weekend regarding error logs and post them.

Would you still recommend that I update to the latest version of DF as best practice? My concern is that as the scripting was done a while ago (approx. 10 years) that there may be something that won't work.

Cheers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share