Bug 21819 - Getting Ionic.Zip.BadReadException from build server when deploying
Summary: Getting Ionic.Zip.BadReadException from build server when deploying
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-08-05 08:54 UTC by Alexandre Pepin
Modified: 2016-12-22 19:03 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Sample project (3.24 MB, application/zip)
2014-08-05 08:55 UTC, Alexandre Pepin

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alexandre Pepin 2014-08-05 08:54:40 UTC
When I deploy the attached sample projet, I get :

Build started. 
No response received from server. 
Remote build step failed. 

In the logs of the build server (mtbserver.log), I have the following exception :

Error: Command [UploadChanges: CommmandUrl=UploadChanges] failed. [04-Aug-2014 16:34:22] Exception: Exception type: Ionic.Zip.BadReadException bad read of entry assemblies/.dll from compressed archive. at Ionic.Zip.ZipEntry._CheckRead (Int32 nbytes) [0x00000] in :0 at Ionic.Zip.ZipEntry.ExtractOne (System.IO.Stream output) [0x00000] in :0 at Ionic.Zip.ZipEntry.InternalExtract (System.String baseDir, System.IO.Stream outstream, System.String password) [0x00000] in :0

It's seems to be a bug of Ionic.Zip : https://dotnetzip.codeplex.com/workitem/14087
LibraryTest.dll is exactly 917,504 bytes which is a multiple of 128k (917504 / 128 / 1024 = 7)
Comment 1 Alexandre Pepin 2014-08-05 08:55:09 UTC
Created attachment 7584 [details]
Sample project
Comment 2 Udham Singh 2014-08-05 11:59:16 UTC
I have tried to reproduce this issue and observed that when we try to deploy application 'Sample project' attached in comment 1 on device/simulator then we can see that application got builds and it shows the following message in Output window:

1. Build started
2. Synchronizing with the remote server(I have wait till more then 10 minutes, it does not deploy application on device/simulator and it still display message 'Synchronizing with the remote server' in Output window)

Screencast : http://www.screencast.com/t/EPOGbqxuEkWe

Environment Info : 

Windows 8.1
VS 2013
Xamarin.iOS Build Host
Comment 3 Nischal 2014-11-04 08:42:05 UTC
I have checked this Issue and observed that when I am deploying attached sample on build server, Application launched on iOS Simulator as BLACK screen but after few seconds VS gets hang. and throwing exceptiom "System.StackOverflowException" 

Mac Server Log: https://gist.github.com/saurabh360/9d6892689c2867fdafe3
Debug Output: https://gist.github.com/saurabh360/efdd26fa0806258e40e7
MTBServer Log: https://gist.github.com/saurabh360/96a6f333bad24dcda9c5

I have tried with 
VS 2013
XVS 3.7.248
X.iOS 8.4.0-16

@Alexandre, Is this the same Issue whih you are getting with attached project? Could you please try with latest stable builds?
Comment 4 Alexandre Pepin 2014-11-12 09:39:34 UTC
I don't seem to have the problem anymore. The StackOverflowException is from the code in the sample project. So it seems to be fixed now
Comment 5 Emanuel 2016-12-22 19:03:16 UTC
Per comment4 this issue is fixed.