GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
VBScript runtime error uploading to familytrees.genopro.com


https://support.genopro.com/Topic13526.aspx
Print Topic | Close Window

By irenesutt - Sunday, October 1, 2006
I have tried a few times to generate a report to the genopro site but keep getting this error message. 

Error at line 928 (Code/Lang.vbs) : Out of memory: 's.Parent'
Microsoft VBScript runtime error 800A0007

Can you tell me what I can do to fix this problem?

Regards
Irene

By GenoProSupport - Sunday, October 1, 2006
Wow, this is the first time I see this error.  According to the logs, GenoPro has generated several million pages without any problem.

Would you mind sending me your document?  I will take a look at what is going on...

You are welcome to use the Send command from the File menu and sending it to GenoProSupport.  See http://support.genopro.com/MyInbox/ for details.

By GenoProSupport - Monday, October 2, 2006
Somehow your source named Descedants of Alexander Lumsden is a parent of self, causing an infinite loop in the script writing toc_sources.htm.  Since the code in Lang.vbs searches the list of parent sources until the end, there is a stack overflow (out of memory) which eventually occurs because there is no end.  I have modified the function AddSourceCitationNode to prevent an infinite loop by adding a guard at 20 levels.  You are welcome to open file Lang.vbs and insert the following code at line 944: 

Function AddSourceCitationNode(s, level, fTreeOpen, fPicturesOnly)
 If (level >= 20) Then
  Exit Function ' Maximum of 20 levels, to prevent an infinite loop
 End If
 Dim strHtmlSourceCitation, p, schild, strName, strImgLink
 strName = JoinSourceCitationNames(s, s.title, level = 0)
 If Not fPicturesOnly Then strImgLink = StrHtmlImgPhotoLink(s, "sources.htm")
 strHtmlSourceCitation = Util.FormatString("<img src='images/source.gif' class='icon' />&nbsp;<a href='sources.htm#{&t}' title='{&t}' onclick='hidePopUpFrame();'>{&t}</a>" & strImgLink, s.id, s.MediaType, strName)
 If Not Util.IsNothing(s.Children) Then
  Report.WriteFormattedLn "<li class='xT2-{}' onclick='xTclk(event,""2"")'>" & strHtmlSourceCitation, Util.IfElse(fTreeOpen,"o","c")
  Report.WriteFormattedLn " <small> ({})</small>", Dic.FormatPhrase("PhUsageCounters",s.Dependents.Count, s.Children.count)
  Report.WriteLn "<ul>"
  If fPicturesOnly Then
   For Each p in s.pictures
    Report.WriteBr StrHtmlImgPhoto(p)
   Next
  End If
  For Each schild in s.Children
   If Not fPicturesOnly Or schild.pictures.count>0 Then
    AddSourceCitationNode schild, level+1, fTreeOpen, fPicturesOnly
   End If
  Next
  Report.WriteLn "</ul></li>"
 Else
  Report.WriteformattedLn "<li class='xT-b'>{} <small> ({})</small></li>", strHtmlSourceCitation, s.Dependents.count
  If fPicturesOnly Then
   For Each p in s.pictures
    Report.WriteBr StrHtmlImgPhoto(p)
   Next
  End If
 End If
End Function

I am working on a fix in GenoPro.  There should be an update in a few hours...

By fbukolyi - Monday, October 2, 2006
I feel, that the table layout let you to make this loop. Create two sources, src1 and src2. Make src1 the parent of src2. Then go to the table view and change the title field of src2 to src1. Now you have just src1 in the table...
By GenoProSupport - Monday, October 2, 2006
fbukolyi (10/2/2006)
I feel, that the table layout let you to make this loop. Create two sources, src1 and src2. Make src1 the parent of src2. Then go to the table view and change the title field of src2 to src1. Now you have just src1 in the table...

The Table Layout does not allow changing the parent source.

By the way, if you download Beta 18g, you should get the fix.  I fixed the bug in both the script (Lang.vbs) and also added a protection in GenoPro itself.

By irenesutt - Monday, October 2, 2006
Thank you so much for your quick response.  I will do as suggested.  Great Program.

Regards

Irene