Author Topic: ArgumentOutOfRangeException in EthernetIPforCLXcom sometimes  (Read 2525 times)

usapatriotforlife

  • Newbie
  • *
  • Posts: 39
    • View Profile
ArgumentOutOfRangeException in EthernetIPforCLXcom sometimes
« on: September 25, 2013, 09:14:10 PM »
I have an application that closes using "me.close()" during a timer tick event.  (In a nutshell, the program is run every 5 minutes using windows task scheduler.  It runs, collects data, writes to a SQL database, and then closes after 30 seconds using a timer tick event.)

What I have noticed is that about a third of the times, I get an ArgumentOutOfRangeException in EthernetIPforCLXcom.vb at m_synchronizingobject.begininvoke(SubscriptionList(i), z).  (EthernetIPforCLXcom.vb , Line #816, advanced version 3.5.7)

All my data is written to the SQL database, so I'm thinking that the exception happens inside the internal workings of "me.close()" which is the last line in that subroutine.  The exception doesn't cause me any major problems, other than an exception error, but I'm wondering if there is a better way to manually close down advancedhmi applications. 

Example Screen Shot:



Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: ArgumentOutOfRangeException in EthernetIPforCLXcom sometimes
« Reply #1 on: September 25, 2013, 10:18:55 PM »
You can just comment that line out. It was meant to send the error message back to a visual control, but after the code was changed to optimize reading, that piece of code missed during the update process.

usapatriotforlife

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: ArgumentOutOfRangeException in EthernetIPforCLXcom sometimes
« Reply #2 on: September 25, 2013, 10:38:01 PM »
CORRECTION!!!  I need to correct my question to state that the exception is happening at line # 825, not at line #816.  It is the same subroutine call, just a few lines further down.

Is it still okay to comment out this line?

Also, I like to see error messages show up in my value fields.  Commenting out line # 825 won't change that will it?

Thanks!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: ArgumentOutOfRangeException in EthernetIPforCLXcom sometimes
« Reply #3 on: September 26, 2013, 04:49:13 AM »
There are 2 exception traps in that block of code. The first one returns driver/communication errors and the second one returns all other exceptions. It is the second one following "Catch ex As Exception" that is causing the problem and can be commented out without any effects.

usapatriotforlife

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: ArgumentOutOfRangeException in EthernetIPforCLXcom sometimes
« Reply #4 on: September 29, 2013, 10:46:29 AM »
Thank you very much.