IDEA Script sometimes Crashes - Shows Internal Error on line XX

9 posts / 0 new
Last post
Gerard Usher
Offline
Joined: 10/26/2018 - 08:40
IDEA Script sometimes Crashes - Shows Internal Error on line XX

I've written a fairly lengthy script (1,957 lines) to perform my weekly Credit Card Monitoring tasks. The problem I have is that sometimes the script runs to completion with no errors but sometimes I get an "Internal Error at line xxx" (line xxx will sometimes be Line 320, sometimes line 865, etc. It can be different on each test).  This happens at different places in the dialogue and has no pattern.  I have ran tests using exactly the same source files and sometimes it runs and sometimes it doesn't.  It's almost like the internal memory is not being cleared properly. 
 
Does anybody have any suggestions as to what may be causing this to happen?

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Gerard,

This has happened to me in the past and generally it means there is a problem with one of the parameters within the dialog, and like you said it just happens here and there.  You need to do is make sure that all of your dialog items have a proper ID, also I have seen this happen when I have drop-down items like the list box, combo box or drop down combo box and I haven't attached an array for the drop down.  The reason being is that I was attaching it directly through the code but for some reason if you don't attach one, even if you don't end up using it, this will cause the errors that you are currently seeing.  So I would start with your dialog and making sure that there are no missing parameters.

Good luck

Brian

Gerard Usher
Offline
Joined: 10/26/2018 - 08:40

Hi Brian,
Thanks for the quick reply.  Are you saying that his can happen using exactly the same souce data? In other words, sometimes IDEA accepts my parameters, and sometimes it doesn't? There are no dropdowns in my script and I thought that I had defined all of the variables correctly. Wouldn't it tell me during debugging if I had an incorrect variable definition?

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Gerard, 

Unfortunately if it is in the dialog section the debugging won't point out the problems that might cause the script to crash.  I am not saying that the dialog is the problem bug I have seen this type of problems with my own script when I have screwed up a parameter in the dialog.  IDEA will work, but then crash and point to a different line, no idea why that happens that way.

Are you using the option explicit in your code?  

Any chance you can share the code and maybe I can spot something.

Gerard Usher
Offline
Joined: 10/26/2018 - 08:40

Hi Brian,
 
Yes, I am using Option Explicit because I though that not using it was causing the initial errors. I have attached a copy of the script to this thread.  I'm pretty new to writing scripts this way, so it may be a bit messy.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Gerard,

Interesting, your script is just from the history, hard to say what the problem might be.  Probably the first thing I might do is get rid of all the Client.OpenDatabase(dbname) lines, this is just opening all the databases and depending on the power of your computer IDEA might be having problems with all the databases being open.

Also before the Set db = Nothing line I usually add db.close line to keep all the databases open to a minimum.

I would probably start with this and see if it helps.

Gerard Usher
Offline
Joined: 10/26/2018 - 08:40

Hi Brian,
 
I made your recommended changes and things are a lot more stable now. 
 
Thanks again for your help!
 
Gerard

Gerard Usher
Offline
Joined: 10/26/2018 - 08:40

Thanks Brian. I'll try that and see if that stabilizes things.

j3lb4s4
Offline
Joined: 09/27/2023 - 14:34

Hi Gerard,
Did you try Brian recomendation?. 
Thanks for your comments. Im still having the same problem with internal error in differents lines. (Aleatory)