GZipStream in .NET is throwing an exception

A

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)
 
K

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
 
A

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 said:
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 said:
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)
 
A

Andrew Morton

Arnie said:
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
 
A

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?

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

When exactly does the application start?

What is the exception?"


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top