News:

  • May 05, 2026, 01:05:27 PM

Login with username, password and session length

Author Topic: What is going on here? Bug maybe?  (Read 6819 times)

HB_GUY

  • Full Member
  • ***
  • Posts: 43
What is going on here? Bug maybe?
« on: October 31, 2015, 10:15:06 PM »
Please reference the attached pictures.
The code in question is in RUNG 10.
This is in a program names ProcessLOG_Q. This program is run every 10 minutes to look for queued logs to transmit to the webserver.
I noticed tonight while working on the system that if I have "All Status" turned on in DMD, whenever rung 10 is displayed on the screen, I get the errors in the attached photo.
It does not matter if the program is actually running or not. I still get the errors...

Any thoughts?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: What is going on here? Bug maybe?
« Reply #1 on: November 01, 2015, 12:34:58 AM »
V51 may be resulting in an out-of-range array index. I'll need to check the code to be sure.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

HB_GUY

  • Full Member
  • ***
  • Posts: 43
Re: What is going on here? Bug maybe?
« Reply #2 on: November 01, 2015, 12:57:31 AM »
My Ladder Code? Or DMD code?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: What is going on here? Bug maybe?
« Reply #3 on: November 01, 2015, 04:53:36 PM »
Error #6 is Invalid Argument, a fairly general error that means we got some bad juju in a request. One common way to generate it is to attempt to display status on an out-of-range array reference (the V index points beyond the block). Another possibility would be that the project in the PLC doesn't match the project that DmD has loaded (moved the cable with an active session) then attempted to read status of a heap item or block that didn't exist. Since you had an array reference in rung 10, and the problem only shows up when you show status on rung 10, it just followed that it might be a bad array reference. Depending on the state of ST18, we either treat out-of-range array refs as an error or a warning.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO