Bug 18762 - System.NotSupportedException: 0-byte integer when building from shared network folder
Summary: System.NotSupportedException: 0-byte integer when building from shared networ...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer (show other bugs)
Version: 3.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-04-02 15:05 UTC by John Miller [MSFT]
Modified: 2017-10-16 15:50 UTC (History)
8 users (show)

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


Attachments
Repro Project (1.51 MB, application/zip)
2014-04-02 15:05 UTC, John Miller [MSFT]
Details
Successful Build Output Log (2.87 KB, text/plain)
2014-04-02 15:06 UTC, John Miller [MSFT]
Details
Failed Build Output Log (4.57 KB, text/plain)
2014-04-02 15:06 UTC, John Miller [MSFT]
Details

Description John Miller [MSFT] 2014-04-02 15:05:43 UTC
Created attachment 6463 [details]
Repro Project

Customer reported an issue when building from a mac where the solution is stored on a shared network folder, and there is a pre-build event to swap out some files. Attached to this report is a sample project to illustrate the issue. 

Steps to reproduce:

1. Create a shared folder on a windows machine and place the sample application in that folder. 
2. On a Mac, browse to the shared folder and open the solution in Xamarin Studio. 
3. Build the solution.

Result:
It will fail (about) every other build attempt with the exception information below. 

Expected Result:
Build successfully every time.

Exception:

System.NotSupportedException: 0-byte integer
  at Xamarin.MacDev.PropertyListFormat+BinaryFormat+Context.ReadBigEndianInteger (Int32 numBytes) [0x0007b] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/Xamarin.MacDev/PListObject.cs:1350 
  at Xamarin.MacDev.PropertyListFormat+BinaryFormat+Context.ReadObjectByRef () [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/Xamarin.MacDev/PListObject.cs:1313 
  at Xamarin.MacDev.PropertyListFormat+BinaryFormat+Context.ReadDict (Xamarin.MacDev.PDictionary dict) [0x00036] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/Xamarin.MacDev/PListObject.cs:1303 
  at Xamarin.MacDev.PropertyListFormat+ReadWriteContext.ReadObject () [0x00107] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/Xamarin.MacDev/PListObject.cs:2017 
  at Xamarin.MacDev.PDictionary.FromFile (System.String fileName, System.Boolean& isBinary) [0x0003f] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/Xamarin.MacDev/PListObject.cs:704 
  at Xamarin.MacDev.PDictionary.FromFile (System.String fileName) [0x00004] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/Xamarin.MacDev/PListObject.cs:689 
  at MonoDevelop.IPhone.IPhoneBuildExtension.UpdateDebugSettingsPlist (IProgressMonitor monitor, MonoDevelop.IPhone.IPhoneProjectConfiguration conf, FilePath target) [0x0002a] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.4-branch/a160c35d/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneBuildExtension.cs:2603

Additional Info:
I attached two build outputs with -v -v -v -v. One for a successful build and on for a build that failed. 

Version Info:

Windows Machine: Windows 8.1

=== Xamarin Studio ===

Version 4.2.4 (build 32)
Installation UUID: bb00cd30-1c19-4ed5-b390-f732a454afd5
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.iOS ===

Version: 7.2.0.2 (Business Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.12.1 (Business Edition)
Android SDK: /Users/John/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 402040032
Git revision: a160c35dac9ab9fd32eeadaa171216316d5a5133
Build date: 2014-03-12 13:55:08-04
Xamarin addins: a779416ceabd54981ce812771a4061c942e8b872

=== Operating System ===

Mac OS X 10.9.2
Darwin Johns-WorkMacBook-Pro.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 1 John Miller [MSFT] 2014-04-02 15:06:16 UTC
Created attachment 6464 [details]
Successful Build Output Log
Comment 2 John Miller [MSFT] 2014-04-02 15:06:36 UTC
Created attachment 6465 [details]
Failed Build Output Log
Comment 3 Sebastien Pouliot 2014-04-02 16:05:29 UTC
Stack trace points to Xamarin Studio tooling (addin).
Comment 4 Jeffrey Stedfast 2014-04-02 16:48:14 UTC
The problem looks like reading from a Windows share is flaky - i.e. the exception happens because we try to read an integer from a file stream and the stream reads 0 bytes when there are, in fact, more bytes to be read.

Might be a bug in the Mono runtime or just a bug in OSX's support for reading files on a Windows share.
Comment 5 Zoltan Varga 2014-04-04 11:11:57 UTC
Can somebody create a test case for this ?
Comment 6 John Miller [MSFT] 2014-04-04 11:23:38 UTC
Hey Zoltan, I attached a project that can be used, is there anything else I can help provide?
Comment 7 Rodrigo Kumpera 2017-10-14 00:28:03 UTC
We need a test case that shows what the VSfM tooling is trying to do and mono supposedly failing at.
A solution that requires using the whole VSfM is not usable by us.
Comment 8 David Ingham 2017-10-16 08:45:53 UTC
Wow impressive response time for the enterprise level support ... 

Close this for me, we no longer build over samba since no one could be arsed to follow this up in under 3 years..
Comment 9 Rodrigo Kumpera 2017-10-16 15:50:45 UTC
closing per last comment.

Note You need to log in before you can comment on or make changes to this bug.