Microsoft KB Archive/899424

From BetaArchive Wiki

Article ID: 899424

Article Last Modified on 3/22/2007



APPLIES TO

  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems




SYMPTOMS

When you try to use the FileRecordSequence.WriteRestartArea method that is included in the Microsoft WinFX software development kit (SDK), your WinFX application unexpectedly crashes.

CAUSE

This problem occurs when an invalid log sequence number (LSN) is passed in the TxfLog.dll file and an E_INVALIDARG error occurs.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Windows Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

889100 How to obtain the latest service pack for Windows Server 2003


Hotfix information

To resolve this problem, apply Windows Server 2003 COM+ 1.5 Rollup Package 6. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

897667 Availability of Windows Server 2003 Post-Service Pack 1 COM+ 1.5 Hotfix Rollup Package 6


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Windows Server 2003 Service Pack 2.

MORE INFORMATION

Steps to reproduce the problem

Compile and run the following Microsoft Visual C# code:

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO.Log;
using System.IO;

            public class Crash
            {
                        public static void Main(string [] args)
                        {
                                    FileRecordSequence sequence = new FileRecordSequence("test.log");

                                    SequenceNumber undoNext = SequenceNumber.Invalid;
                                    SequenceNumber previous = SequenceNumber.Invalid;
                                    WriteFlags flags = WriteFlags.ForceAppend;

 

                                    // Append some data to the sequence.
                                    System.Collections.Generic.IList<ArraySegment<byte>> data = CreateData(1);
                                    SequenceNumber num = sequence.Append(data, undoNext, previous, flags);
                                    num = sequence.Append(data, undoNext, previous, flags);
                                    num = sequence.Append(data, undoNext, previous, flags);

                                    SequenceNumber newBase = new SequenceNumber(new byte[]{2,3,4,2,3,4,2,3});

                                    try
                                    {
                                                sequence.WriteRestartArea(CreateData(2), newBase);
                                                System.Console.WriteLine("RestartArea Written");
                                    }
                                    catch
                                    {
                                                System.Console.WriteLine("Exception");
            }           
    }

    private static System.Collections.Generic.IList<ArraySegment<byte>> CreateData(int size)
            {
        byte[] array = new byte[size];
        for (int i = 0; i < size; i++)
        {
            array[i] = 1;
        }
        
        ArraySegment<byte>[] segments = new ArraySegment<byte>[1];
        segments[0] = new ArraySegment<byte>(array);
        return Array.AsReadOnly<ArraySegment<byte>>(segments);
    
    }
}

Keywords: kbqfe kbbug kbtshoot kbfix kbprb KB899424