Skip to main content

Error 52 "Due to an internal error..."

Hi there,
Firstly, I've got a huuuuuuuuuge script here (11k+ lines of code) so I will not post the whole in this thread. ;)
Anyway, the problem, that I've got with my script, that I randomly get a "Errornumber: 52,"Due to an internal error, the Project Overview information for this task was not recorded."". Lets say, I will run the script five times, three out of this five times, work perfectly, one throws the mentiond error, pretty often followed by a "Bad file name or number", and the other time simply crashes IDEA.
I have no clue why, when I'm debugging the script everything seems fine, but letting it run independently leads to the problems mentioned above. Following there is one expample-function of my script.
 
Function Analysis_PU_02_VendorMaster_without_purchasing_volume_in_last_two_years_no_Central_Deletion_Flag
On Error GoTo ErrHandler 
  Dim dbname As String
  Dim finname As String
  finname = "PU_02_VendorMaster_without_purchasing_volume_in_last_two_years_no_Central_Deletion_Flag"
dbname = workingdirectory + "\03 Results\PU_02_VendorMaster_without_purchasing_volume_in_last_two_years.IDM"
Set db = Client.OpenDatabase(dbname)
Set task = db.Extraction
task.DisableProgressNotification = True
task.IncludeAllFields
dbName = workingdirectory + "\03 Results\"+finname+".IDM"
task.AddExtraction dbName, "", "CENTRAL_DELETION_FLAG_FOR_MASTER_RECORD_ = ""No"""
 
Client.CloseAll
dim copycomplete as boolean
copycomplete = moveIt(finname, "Vendor Master without purchasing Volume in last to Years no central Deletion Flag")
Set task = Nothing
Set db = Nothing
 
Exit Function
ErrHandler:
If Err.Number = 0 Then
Write #1, Now, " - ERROR - " , "Analysis_PU_02_VendorMaster_without_purchasing_volume_in_last_two_years_no_Central_Deletion_Flag", Err.Number, Err.Description, "Error Not defined"
Else
Write #1, Now, " - ERROR - " , "Analysis_PU_02_VendorMaster_without_purchasing_volume_in_last_two_years_no_Central_Deletion_Flag", Err.Number, Err.Description
End If
errorOccurred = TRUE
Resume Next
End Function
 
As I said, this is just a small bit of my whole script (which basicly is a GUI to choose different scripts, that should be executed). I'm getting the error in a lot of different functions, but not always in the same, just sometimes... if it wants to... and if its not working as intendent (I think you might understand my confusion :( ).
Any help about this problem is appreciated! :) Thanks in advance,
loliman
(If you need more information, then I'll provide you!)

loliman Wed, 09/25/2013 - 04:50

Hi Brian,
still no luck, I think I have to dig further, I'll diable every functionality not necessary and afterwards enable them step by step to localize the error. I'll tell you in the evening if I found something.
One small offtopic quastion: Is there a way to suppress popups in IDEA? I'm thinking about three different popups
1. Unable to apply the selected view. The following fields were: -not found in the database; or - have lengths and/or parameters, that do not match the field in the database (Appears when I try to apply a view to a database, that do not fit)
2. Not all columns will fit on the report. Try to reduce the font size to fit? (Appears when I try to print a database, that does not fit on one page)
3. Unable to reduce the report to fit on the page (Appears after 2.)
I thought, Client.DisplayAlerts =False or Client.SetWarnings = False could work (due to the fact, that IDEAScript is a child of VB) but it doesn't. Any suggestions?
Thanks in advance and have a nice day!
loliman

Brian Element Wed, 09/25/2013 - 07:25

Not that I know of.  As far as I know the DisplayAlerts functionality does not work in IDEAScript.  I am not sure if the DisplayAlerts is part of VB or part of VBA.  IDEAScript does not implement everything that is available in VB unfortunately.

For the views you could have an array of all the fields names in the view and check to make sure that the file contains those fields before using it, I admit this is like using a sledgehammer to fix a small problem but it is one way to get around it.

For part 2 and 3 maybe figure out the maximum and then add of the lengths of each of the fields to see if it will fit, if the total is greater than the max then don't output the print report.

Sounds like you are doing the correct things of trying to isolate where the error is happening.  Good luck on that.

 

 

loliman Wed, 09/25/2013 - 08:32

In reply to by Brian Element

Thanks! One strange thing about the "Apply-View-Problem" is, that the the columns are (definitly! There is no case where it is different) the named the same. So the problem seems to be related to charecters. But what does CITY - [Character 33] mean? How can I fix the problem regarding the characters?

Brian Element Wed, 09/25/2013 - 09:20

I beleive that is the width of the field.  So it would mean that the CITY field is 33 characters wide.  Is there actually a problem with the city field?  Did you try to resave the view and see if that helps out.