TheGeneGenieProject / GeneGenie.Gedcom

A .Net library for loading, saving, working with and analysing family trees stored in the GEDCOM format.
GNU Affero General Public License v3.0
52 stars 23 forks source link

Exception during paring #56

Open utech626 opened 5 years ago

utech626 commented 5 years ago

GEDCOM Source Application: RootsMagic Exception Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List1.get_Item(Int32 index) at System.Collections.ObjectModel.Collection1.get_Item(Int32 index) at GeneGenie.Gedcom.Parser.GedcomRecordReader.ReadSourceRecord() at GeneGenie.Gedcom.Parser.GedcomRecordReader.Parser_TagFound(Object sender, EventArgs e) at GeneGenie.Gedcom.Parser.GedcomParser.GedcomParse(String data) at GeneGenie.Gedcom.Parser.GedcomRecordReader.ReadGedcom(String gedcomFile) at GeneGenieReader.Program.Main(String[] args) in E:\TFSSource\Demo\GeneGenieReader\GeneGenieReader\Program.cs:line 19

        // _ParseState.PreviousLevel + 3)
        else if ((!string.IsNullOrEmpty(m_parseState.PreviousTag)) && m_level == sourceRecord.Level + 3)
        {
            GedcomRecordedEvent recordedEvent = sourceRecord.EventsRecorded[sourceRecord.EventsRecorded.Count - 1];

            switch (m_tag)

Input GEDCOM: 0 @S1@ SOUR 1 ABBR GEDCOM file imported on 11 March 2019 1 TITL GEDCOM file submitted by XXXXXX, XXXXXXX. Imp 2 CONC orted on 11 March 2019. 1 _SUBQ GEDCOM file submitted by XXXX, XXXXXXX. Imp 2 CONC orted on 11 March 2019. 1 _BIBL GEDCOM file, XXXXXXX. 1 _TMPLT 2 TID 0 2 FIELD <=== ERRROR Here 3 NAME Footnote 3 VALUE GEDCOM file submitted by XXXXXXX, XXXXXXXX. Imp 4 CONC orted on 11 March 2019. 2 FIELD 3 NAME ShortFootnote 3 VALUE GEDCOM file submitted by XXXXXXX, XXXXXX. Imp 4 CONC orted on 11 March 2019. 2 FIELD 3 NAME Bibliography 3 VALUE GEDCOM file, XXXXXX.

RyanONeill1970 commented 5 years ago

Thanks for this. I can see the error, on first look it seems to be because of the non-standard tags used by Roots Magic.

I don't know if it is the _SUBQ, _BIBL, _TMPLT, TID or FIELD tags or a combination of all of them.

I need to find those tag definitions and ensure they are mapped to standard ones of the same meaning, can you elaborate on what TID and FIELD do? They are not present in the list here (http://www.gencom.org.nz/GEDCOM_tags.html).

RyanONeill1970 commented 5 years ago

I've also just found the below from (https://genealogytools.com/replacing-family-tree-maker-part-3-importing-your-ftm-tree-into-rootsmagic-7/).

– Includes custom fields in SOURce records that probably will not be read by most other systems, like _BIBL, SUBQ, _TMPLT, FIELD, TID, and VALUE. Most likely these fields are only useful for other RootsMagic users, and it would be better for them to exchange RM rather than GEDCOM files.

Still not sure whether to preserve or ignore these.

utech626 commented 5 years ago

Ryan,

Thanks for your reply, I have done some more research. It seems they are specific RootsMagic tags. On the export menu there is an option, ‘Extra Details (RM Specific)’, this option is checked by default. If I uncheck this option, the GEDCOM file imports correctly.

There is a discussion on the RootsMagic tag problem here: http://forums.rootsmagic.com/index.php?/topic/14408-a-better-export/

Bob Brown

From: RyanONeill1970 [mailto:notifications@github.com] Sent: Tuesday, March 12, 2019 6:05 AM To: TheGeneGenieProject/GeneGenie.Gedcom GeneGenie.Gedcom@noreply.github.com Cc: Bob Brown utech626@ultratechweb.com; Author author@noreply.github.com Subject: [Spam-14] :Re: [TheGeneGenieProject/GeneGenie.Gedcom] Exception during paring (#56)

I've also just found the below from (https://genealogytools.com/replacing-family-tree-maker-part-3-importing-your-ftm-tree-into-rootsmagic-7/).

– Includes custom fields in SOURce records that probably will not be read by most other systems, like _BIBL, SUBQ, _TMPLT, FIELD, TID, and VALUE. Most likely these fields are only useful for other RootsMagic users, and it would be better for them to exchange RM rather than GEDCOM files.

Still not sure whether to preserve or ignore these.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/TheGeneGenieProject/GeneGenie.Gedcom/issues/56#issuecomment-471955512, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALAnNAA303wNGY9EGbPml5uwsvtsVJK0ks5vV4nEgaJpZM4bpxMO.