arumade1990
I was initially having issues even downloading logic to the board, but after the update I'm able to do that again. However I still can't reliably simulate the logic. Every once in a while it does work, but most times it doesn't. I've tried it multiple times and I've only gotten it to simulate a couple times now since the update. I'm not sure what is causing the issue or why it was able to simulate a couple times. The log and a snip of the blink logic are below.
 
blink logic.png
 
This is the error I keep getting when I try to simulate anything.
 
Error snip.png
 
If anything else is needed please let me know. Not being able to simulate stuff is crucial to me.
Reply 0 0
thiagoralves
Are you simulating (blue running man icon) or running the debugger on a hardware platform (blue bug icon)?
Reply 0 0
arumade1990
I'm not able to do either, without having an error box pop up.
Reply 0 0
thiagoralves
 
I was able to reproduce this, but on Windows only. On the other platforms it works just fine. I was curious because none of the code in this recent OpenPLC update touched the simulation or debugger. After investigating the issue a bit I realized that this is actually not due to the OpenPLC Editor update, but rather to Windows Defender update. Their machine learning algorithm is now detecting the compiled PLC DLL as a malware:
 
Screenshot 2024-08-12 at 11.10.46 AM.png
 
It seems that the Windows Defender algorithm tries to detect any Python code that tries to execute a DLL or another precompiled code (which is what we do). When you start a simulation or a debug session, OpenPLC compiles your PLC code into a DLL that is then attached to the Python process for debug. When we do that, Windows Defender deletes the compiled DLL, and the Editor either crashes or spin waits forever, waiting for the debugger to start. There is a thread on reddit talking about a similar problem here: https://www.reddit.com/r/antivirus/comments/p2o2yj/trojanwin32wacatacbml/?rdt=35645 . This thread is old, but it seems to be related to the problem we're facing. More specifically:
 
Screenshot 2024-08-12 at 11.13.07 AM.png
 
In the past the OpenPLC DLL was running undetected, but now they have probably strengthened their rules which is making it block the OpenPLC DLL. I will try sending a report to Microsoft asking for them to fine-tune their Machine Learning algorithm and avoid those false positive detections. Meanwhile, I followed Windows Defender prompts that appear right after clicking on start simulation or start debugger on OpenPLC. From there you can get to "Protection history" which then lets you to allow the specific code to run. After doing that I was able to start a simulation just fine. If even then you can't start the simulation, try disabling Windows Defender temporarily just to see if the Editor works fine then.
Reply 0 0
arumade1990
Ok thanks! I've give it a shot and see if it works.
 
==UPDATE==
I made this comment thinking it would take some fiddling to get it to work, but as soon as I allowed the 'threat' I rebooted the editor and it worked like it used to! I didn't even realize that it was recognizing it as a threat. Thanks for looking into that for me!
Reply 0 0
Write a reply...
Reply