GZipStream in .NET is throwing an exception

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)
Arnie [ Do, 03 Januar 2008 18:09 ] [ ID #1898595 ]

Re: GZipStream in .NET is throwing an exception

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" <jefferyronaldarnett [at] msn.com> wrote in message
news:8E997721-5618-4768-9A43-078FAD59B507 [at] 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)
>
Kevin Spencer [ Fr, 04 Januar 2008 13:31 ] [ ID #1899470 ]

Re: GZipStream in .NET is throwing an exception

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" <unclechutney [at] nothinks.com> wrote in message
news:OFNi72sTIHA.1168 [at] 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" <jefferyronaldarnett [at] msn.com> wrote in message
> news:8E997721-5618-4768-9A43-078FAD59B507 [at] 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)
>>
>
>
Arnie [ Fr, 04 Januar 2008 19:50 ] [ ID #1899476 ]

Re: GZipStream in .NET is throwing an exception

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
Andrew Morton [ Di, 08 Januar 2008 10:07 ] [ ID #1902444 ]

Re: GZipStream in .NET is throwing an exception

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" <akm [at] in-press.co.uk.invalid> wrote in message
news:uMviVddUIHA.5980 [at] 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
>
Arnie [ Di, 08 Januar 2008 20:20 ] [ ID #1902457 ]
Microsoft » microsoft.public.dotnet.general » GZipStream in .NET is throwing an exception

Vorheriges Thema: Crystal Report Problem in ASP.net
Nächstes Thema: Multiple addresses