Bug 1609 - Error window opens up with message "The policy set could not be loaded" when user select pdf file in Apply policy window.
Summary: Error window opens up with message "The policy set could not be loaded" when ...
Status: CLOSED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-10-20 10:23 UTC by narayanp
Modified: 2011-12-22 10:50 UTC (History)
5 users (show)

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

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 or GitHub 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:
Status:
CLOSED FIXED

Description narayanp 2011-10-20 10:23:46 UTC
Step to Reproduce:

1. Launch the Mono Develop and create a application.
2. Open the application.
3. Go to Project<<Apply Policy. Apply policy window opens up.
4. Select radio button for "Apply policies from file" field.
5. Browse any pdf file and click on "Apply" button.

Actual result:
Error window opens up with message "The policy set could not be loaded" when user browse pdf file in Apply policy window.
(System.Xml.XmlException: Text node cannot appear in this state.  Line 1, position 1.
  at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00199] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1717 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x0015c] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1359 
  at Mono.Xml2.XmlTextReader.Read () [0x00141] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System.XML/System.Xml/XmlTextReader.cs:626 
  at System.Xml.XmlTextReader.Read () [0x0006b] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System.XML/System.Xml/XmlTextReader2.cs:564 
  at System.Xml.XmlReader.MoveToContent () [0x00050] in /private/tmp/monobuild/build/BUILD/mono-2.10.6/mcs/class/System.XML/System.Xml/XmlReader.cs:559 
  at MonoDevelop.Projects.Policies.PolicySet.LoadFromXml (System.Xml.XmlReader reader) [0x00026] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs:177 
  at MonoDevelop.Projects.Policies.PolicySet.LoadFromFile (System.IO.StreamReader reader) [0x00007] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs:167 
  at MonoDevelop.Projects.Policies.PolicySet.LoadFromFile (FilePath file) [0x0000c] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs:161 
  at MonoDevelop.Ide.Projects.ApplyPolicyDialog.GetPolicySet (Boolean notifyErrors) [0x00053] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ApplyPolicyDialog.cs:84 )

Expected Result:
Error window should not open and proper validation message should display for file type.

Environment:
Mono Develop - 2.8.1
MonoTouch- 5.0
Mono Framework - 2.6
Comment 1 Sebastien Pouliot 2011-10-20 11:40:03 UTC
-> monodevelop
Comment 2 Lluis Sanchez 2011-10-21 04:50:58 UTC
Only files with the extension .mdpolicy can be used in this context. I fixed the file selection dialog so now will only allow selecting this kind of file.
Comment 3 narayanp 2011-11-16 02:48:06 UTC
Now file types like .pdf, .xls displayed in disable mode while browsing. Hence validated this issue.
Comment 4 Jatin 2011-12-22 10:50:24 UTC
As per the above comments closing this issue.