Sandcastle buildassembler generates indexoutofrangeexception

Hello All,

I was using the July and now the August Sandcastle CTP, but now I seem unable to generate documentation. It still seems to work on a small test assembly, but on the assembly I was documenting the buildassembler generates an exception - I have pasted in the exception from the event log. I cannot send you the assembly to recreate the problem as it contains company code, but I would appreciate any advice on what it is that might be generating the exception. I have also included the last few messages output during the buildassembler phase.

FROM THE WINDOWS EVENT LOG

------------------------------------------

Event Type:      Error

Event Source:   .NET Runtime 2.0 Error Reporting

Event Category:            None

Event ID:          5000

Date:                30/08/2006

Time:                14:29:40

User:                N/A

Computer:        CCLWKS13

Description:

EventType clr20r3, P1 buildassembler.exe, P2 2.0.2426.28539, P3 44ece9f6, P4 buildcomponents, P5 0.0.0.0, P6 44ef76a6, P7 5a, P8 0, P9 system.indexoutofrangeexception, P10 NIL.

 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Data:

0000: 63 00 6c 00 72 00 32 00   c.l.r.2.

0008: 30 00 72 00 33 00 2c 00   0.r.3.,.

0010: 20 00 62 00 75 00 69 00    .b.u.i.

0018: 6c 00 64 00 61 00 73 00   l.d.a.s.

0020: 73 00 65 00 6d 00 62 00   s.e.m.b.

0028: 6c 00 65 00 72 00 2e 00   l.e.r...

0030: 65 00 78 00 65 00 2c 00   e.x.e.,.

0038: 20 00 32 00 2e 00 30 00    .2...0.

0040: 2e 00 32 00 34 00 32 00   ..2.4.2.

0048: 36 00 2e 00 32 00 38 00   6...2.8.

0050: 35 00 33 00 39 00 2c 00   5.3.9.,.

0058: 20 00 34 00 34 00 65 00    .4.4.e.

0060: 63 00 65 00 39 00 66 00   c.e.9.f.

0068: 36 00 2c 00 20 00 62 00   6.,. .b.

0070: 75 00 69 00 6c 00 64 00   u.i.l.d.

0078: 63 00 6f 00 6d 00 70 00   c.o.m.p.

0080: 6f 00 6e 00 65 00 6e 00   o.n.e.n.

0088: 74 00 73 00 2c 00 20 00   t.s.,. .

0090: 30 00 2e 00 30 00 2e 00   0...0...

0098: 30 00 2e 00 30 00 2c 00   0...0.,.

00a0: 20 00 34 00 34 00 65 00    .4.4.e.

00a8: 66 00 37 00 36 00 61 00   f.7.6.a.

00b0: 36 00 2c 00 20 00 35 00   6.,. .5.

00b8: 61 00 2c 00 20 00 30 00   a.,. .0.

00c0: 2c 00 20 00 73 00 79 00   ,. .s.y.

00c8: 73 00 74 00 65 00 6d 00   s.t.e.m.

00d0: 2e 00 69 00 6e 00 64 00   ..i.n.d.

00d8: 65 00 78 00 6f 00 75 00   e.x.o.u.

00e0: 74 00 6f 00 66 00 72 00   t.o.f.r.

00e8: 61 00 6e 00 67 00 65 00   a.n.g.e.

00f0: 65 00 78 00 63 00 65 00   e.x.c.e.

00f8: 70 00 74 00 69 00 6f 00   p.t.i.o.

0100: 6e 00 20 00 4e 00 49 00   n. .N.I.

0108: 4c 00 0d 00 0a 00         L..... 

 

 

LAST FEW MESSAGES DISPLAYED BY BUILDASSEMBLER

---------------------------------------------------------------------

Info: Building topic T:CronusBiz.Framework.Fields.Severity

Info: Building topic T:CronusBiz.Framework.Fields.SingleFieldCollection

Warn: ResolveReferenceLinksComponent: The reference link target 'M:System.Collec

tions.IEnumerable.GetEnumerator()' is unknown.

Info: ResolveReferenceLinksComponent: The title for 'M:System.Collections.IEnume

rable.GetEnumerator()' needed to be constructed from the reference string.

 

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the boun

ds of the array.

   at Microsoft.Ddue.Tools.ResolveReferenceLinksComponent.WriteTypeReference(Str

ing reference, Boolean showContainer, Boolean showTemplates, String context, Xml

Writer writer)

   at Microsoft.Ddue.Tools.ResolveReferenceLinksComponent.WriteMethodReference(S

tring id, Boolean showContainer, Boolean showTemplates, Boolean showParameters,

String context, XmlWriter writer)

   at Microsoft.Ddue.Tools.ResolveReferenceLinksComponent.WriteReferenceTitle(St

ring target, Boolean showContainer, Boolean showTemplates, Boolean showParameter

s, String context, XmlWriter writer)

   at Microsoft.Ddue.Tools.ResolveReferenceLinksComponent.Apply(XmlDocument docu

ment, String key)

   at Microsoft.Ddue.Tools.BuildAssembler.BuildTopic(XmlReader reader)

   at Microsoft.Ddue.Tools.BuildAssembler.Main(String[] args)

 

 



Answer this question

Sandcastle buildassembler generates indexoutofrangeexception

  • mobigital

    I have logged an issue and we will try to repro this.

    Anand..



  • AnaC

    Hello All,

    I have enclosed some code which recreates the exception. If you copy and paste this code into a simple c# application you should be able to recreate the exception with the buildassembler. I think the problem is with it refering to <see cref="M:System.Collections.IEnumerable.GetEnumerator()"/> in the summary. Please tell me if anyone manages to recreate the problem using my sample code as it always generates an exception on my system.

    /// <summary>
    /// Interface that represents a field value.
    /// </summary>
    public interface IFieldValue
    {
    /// <summary>
    /// Get / Set the value of a specific configuration item.
    /// </summary>
    /// <value>The value.</value>
    object Value
    {
    get;
    set;
    }

    }

    /// <summary>
    /// Class to recreate the exception.
    /// </summary>
    public sealed class SingleFieldCollection : IEnumerable<IFieldValue>
    {
    IFieldValue fieldValue;

    #region IEnumerable<IFieldValue> Members

    /// <summary>
    /// For a description of this member, see <see cref="M:System.Collections.IEnumerable.GetEnumerator()"/>.
    /// </summary>
    /// <remarks>
    /// This member is an explicit interface member implementation. It can be used only when the <see cref="SingleFieldCollection"/> is cast to an <see cref="T:System.Collections.Generic.IEnumerable{T}"/> interface.
    /// </remarks>
    /// <value>An <see cref="T:System.Collections.Generic.IEnumerator{T}"/> object that can be used to iterate through the collection.</value>
    System.Collections.Generic.IEnumerator<IFieldValue> System.Collections.Generic.IEnumerable<IFieldValue>.GetEnumerator()
    {
    yield return fieldValue;
    }

    #endregion

    #region IEnumerable Members

    /// <summary>
    /// For a description of this member, see <see cref="M:System.Collections.IEnumerable.GetEnumerator()"/>.
    /// </summary>
    /// <remarks>
    /// This member is an explicit interface member implementation. It can be used only when the <see cref="SingleFieldCollection"/> is cast to an <see cref="T:System.Collections.IEnumerable"/> interface.
    /// </remarks>
    /// <value>An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.</value>
    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
    {
    return ((System.Collections.Generic.IEnumerable<IFieldValue>)this).GetEnumerator();
    }

    #endregion
    }


  • Sandcastle buildassembler generates indexoutofrangeexception