GZipStream in .NET is throwing an exception

GZipStream in .NET is throwing an exception

am 03.01.2008 18:09:32 von Arnie

Folks,



The GZipStream class in .NET is throwing an exception during an OS
unseal/power up (first boot experience). The .NET system is fully up as
other apps seem to run fine.



Our code works fine when testing it on a PC that is already up.



After googling we found some people having similar issues when using
SQLServer ... but we are not using it.



Has anyone seen this?



-jeff





.........





I think we could use some advice/analysis from Microsoft on this stack
trace, which is showing an exception from the GZipStream implementation. I
have Googled this and only found issues with people apparently misusing
SQLServer, nothing relating to compression/decompression. This occurs
occasionally during an OS unseal/power up:



......................Module: System.Runtime.Remoting.Proxies.RealProxy



Exception 1: System.IndexOutOfRangeException

Message: Index was outside the bounds of the array.

Source: System

Site: Void CreateTable()

*** Stack Trace ***



Server stack trace:

at System.IO.Compression.HuffmanTree.CreateTable()

at System.IO.Compression.HuffmanTree..ctor(Byte[] codeLengths)

at System.IO.Compression.Inflater.DecodeDynamicBlockHeader()

at System.IO.Compression.Inflater.Decode()

at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset,
Int32 length)

at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset,
Int32 count)

at System.IO.Compression.GZipStream.Read(Byte[] array, Int32 offset,
Int32 count)

Re: GZipStream in .NET is throwing an exception

am 04.01.2008 13:31:28 von Kevin Spencer

You'll have to be more specific. What is the GZipStream instance attempting
to do? When exactly does the application start? What is the exception?

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Arnie" wrote in message
news:8E997721-5618-4768-9A43-078FAD59B507@microsoft.com...
> Folks,
>
>
>
> The GZipStream class in .NET is throwing an exception during an OS
> unseal/power up (first boot experience). The .NET system is fully up as
> other apps seem to run fine.
>
>
>
> Our code works fine when testing it on a PC that is already up.
>
>
>
> After googling we found some people having similar issues when using
> SQLServer ... but we are not using it.
>
>
>
> Has anyone seen this?
>
>
>
> -jeff
>
>
>
>
>
> ........
>
>
>
>
>
> I think we could use some advice/analysis from Microsoft on this stack
> trace, which is showing an exception from the GZipStream implementation.
> I have Googled this and only found issues with people apparently misusing
> SQLServer, nothing relating to compression/decompression. This occurs
> occasionally during an OS unseal/power up:
>
>
>
> .....................Module: System.Runtime.Remoting.Proxies.RealProxy
>
>
>
> Exception 1: System.IndexOutOfRangeException
>
> Message: Index was outside the bounds of the array.
>
> Source: System
>
> Site: Void CreateTable()
>
> *** Stack Trace ***
>
>
>
> Server stack trace:
>
> at System.IO.Compression.HuffmanTree.CreateTable()
>
> at System.IO.Compression.HuffmanTree..ctor(Byte[] codeLengths)
>
> at System.IO.Compression.Inflater.DecodeDynamicBlockHeader()
>
> at System.IO.Compression.Inflater.Decode()
>
> at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset,
> Int32 length)
>
> at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset,
> Int32 count)
>
> at System.IO.Compression.GZipStream.Read(Byte[] array, Int32 offset,
> Int32 count)
>

Re: GZipStream in .NET is throwing an exception

am 04.01.2008 19:50:33 von Arnie

See the exception at the end of the thread.

"Index was outside the bounds of the array" ...

It is doing a simple unzip of a compressed file/data.

It works fine when running on a PC ... it is failing during the "unseal"
phase of the first boot experience (when a customer gets their new PC and
turns it on the first time ... we run a few things).

I'm assuming this is more of a system question than a .NET question but
wanted to try here anyways.

-jeff


"Kevin Spencer" wrote in message
news:OFNi72sTIHA.1168@TK2MSFTNGP02.phx.gbl...
> You'll have to be more specific. What is the GZipStream instance
> attempting to do? When exactly does the application start? What is the
> exception?
>
> --
> HTH,
>
> Kevin Spencer
> Chicken Salad Surgeon
> Microsoft MVP
>
> "Arnie" wrote in message
> news:8E997721-5618-4768-9A43-078FAD59B507@microsoft.com...
>> Folks,
>>
>>
>>
>> The GZipStream class in .NET is throwing an exception during an OS
>> unseal/power up (first boot experience). The .NET system is fully up as
>> other apps seem to run fine.
>>
>>
>>
>> Our code works fine when testing it on a PC that is already up.
>>
>>
>>
>> After googling we found some people having similar issues when using
>> SQLServer ... but we are not using it.
>>
>>
>>
>> Has anyone seen this?
>>
>>
>>
>> -jeff
>>
>>
>>
>>
>>
>> ........
>>
>>
>>
>>
>>
>> I think we could use some advice/analysis from Microsoft on this stack
>> trace, which is showing an exception from the GZipStream implementation.
>> I have Googled this and only found issues with people apparently misusing
>> SQLServer, nothing relating to compression/decompression. This occurs
>> occasionally during an OS unseal/power up:
>>
>>
>>
>> .....................Module: System.Runtime.Remoting.Proxies.RealProxy
>>
>>
>>
>> Exception 1: System.IndexOutOfRangeException
>>
>> Message: Index was outside the bounds of the array.
>>
>> Source: System
>>
>> Site: Void CreateTable()
>>
>> *** Stack Trace ***
>>
>>
>>
>> Server stack trace:
>>
>> at System.IO.Compression.HuffmanTree.CreateTable()
>>
>> at System.IO.Compression.HuffmanTree..ctor(Byte[] codeLengths)
>>
>> at System.IO.Compression.Inflater.DecodeDynamicBlockHeader()
>>
>> at System.IO.Compression.Inflater.Decode()
>>
>> at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset,
>> Int32 length)
>>
>> at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset,
>> Int32 count)
>>
>> at System.IO.Compression.GZipStream.Read(Byte[] array, Int32 offset,
>> Int32 count)
>>
>
>

Re: GZipStream in .NET is throwing an exception

am 08.01.2008 10:07:28 von Andrew Morton

Arnie wrote:
> See the exception at the end of the thread.
>
> "Index was outside the bounds of the array" ...
>
> It is doing a simple unzip of a compressed file/data.

Are you sure it can access that file? Might there be an issue with
permissions not having yet been set during the "unseal" phase?

> It works fine when running on a PC ... it is failing during the
> "unseal" phase of the first boot experience (when a customer gets
> their new PC and turns it on the first time ... we run a few things).
>
> I'm assuming this is more of a system question than a .NET question
> but wanted to try here anyways.

You could try SharpZipLib instead
http://www.icsharpcode.net/OpenSource/SharpZipLib/

Andrew

Re: GZipStream in .NET is throwing an exception

am 08.01.2008 20:20:50 von Arnie

Thanks for the ideas Andrew. We'll check on the permissions.

Here is a bit more details in case it triggers something for the group.


What is the GZipStream instance attempting to do?

>> as shown in the stack trace, we are attempting to read compressed data
>> using GZipStream from a SecureStorage stream that was written using
>> GZipStream:

at System.IO.Compression.GZipStream.Read(Byte[] array, Int32 offset,
Int32 count)

When exactly does the application start?

>> "This occurs occasionally during an OS unseal/power up"; the Agilent
>> License service is started automatically by SCM.

What is the exception?"

>> as shown in the stack trace: "Exception 1:
>> System.IndexOutOfRangeException"


It should be sufficient for Microsoft to see that we are simply calling
System.IO.Compression.GZipStream.Read().

"Andrew Morton" wrote in message
news:uMviVddUIHA.5980@TK2MSFTNGP04.phx.gbl...
> Arnie wrote:
>> See the exception at the end of the thread.
>>
>> "Index was outside the bounds of the array" ...
>>
>> It is doing a simple unzip of a compressed file/data.
>
> Are you sure it can access that file? Might there be an issue with
> permissions not having yet been set during the "unseal" phase?
>
>> It works fine when running on a PC ... it is failing during the
>> "unseal" phase of the first boot experience (when a customer gets
>> their new PC and turns it on the first time ... we run a few things).
>>
>> I'm assuming this is more of a system question than a .NET question
>> but wanted to try here anyways.
>
> You could try SharpZipLib instead
> http://www.icsharpcode.net/OpenSource/SharpZipLib/
>
> Andrew
>