[Mono-bugs] [Bug 74796][Cri] New - Process.StartInfo.GetEnvironmentVariables throws exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 2 May 2005 08:18:25 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tjain@novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74796

--- shadow/74796	2005-05-02 08:18:25.000000000 -0400
+++ shadow/74796.tmp.6959	2005-05-02 08:18:25.000000000 -0400
@@ -0,0 +1,68 @@
+Bug#: 74796
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Redhat Advanced Server 3
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tjain@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Process.StartInfo.GetEnvironmentVariables throws exception
+
+Description of Problem:
+In my program I created a new process, say pr. From this process I get a 
+handle to the environment variables using the following statement:
+pr.StartInfo.EnvironmentVariables
+
+On executing the program, I get the following exception:
+Key duplication when adding: RUNLEVEL: in <0x001d7> 
+System.Collections.Hashtable:PutImpl (System.Object key, System.Object 
+value, Boolean overwrite)
+in <0x00015> System.Collections.Hashtable:Add (System.Object key, 
+System.Object value)
+in <0x00014> System.Collections.Specialized.ProcessStringDictionary:Add 
+(System.String key, System.String value)
+in <0x00102> System.Diagnostics.ProcessStartInfo:get_EnvironmentVariables 
+()
+in <0x0024a> Novell.Zenworks.PolicyEnforcers.Exec.Executor:Execute ()
+
+I get this exception in SuSE 9.3 box too. But in that box it complains 
+for an environment variable SPLASH.
+
+I have attached some test programs which can be used to reproduce the 
+issue.
+
+Steps to reproduce the problem:
+1. mcs GetEnvironmentVars.cs   (program uploaded in the bug)
+2. sh setEnvironmentVars.sh    (script uploaded in the bug)
+
+
+Actual Results:
+Unhandled Exception: System.ArgumentException: Key duplication when 
+adding: test_var
+in <0x001d7> System.Collections.Hashtable:PutImpl (System.Object key, 
+System.Object value, Boolean overwrite)
+in <0x00015> System.Collections.Hashtable:Add (System.Object key, 
+System.Object value)
+in <0x00014> System.Collections.Specialized.ProcessStringDictionary:Add 
+(System.String key, System.String value)
+in <0x00102> System.Diagnostics.ProcessStartInfo:get_EnvironmentVariables 
+()
+in <0x00041> GetEnvironmentVars:Main (System.String[] args)
+
+
+Expected Results:
+The mono-runtime should not throw an exception when duplicate keys with 
+different case are found.
+
+How often does this happen? 
+Always
+
+Additional Information: