[Mono-bugs] [Bug 490026] New: On Windows Vista 64-bit, System.Diagnostics.Process.ProcessName throws an exception
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Mar 28 22:57:21 EDT 2009
https://bugzilla.novell.com/show_bug.cgi?id=490026
Summary: On Windows Vista 64-bit,
System.Diagnostics.Process.ProcessName throws an
exception
Classification: Mono
Product: Mono: Class Libraries
Version: 2.2.x
Platform: x86-64
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: joshuaburkholder at yahoo.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Description of Problem:
The following code throws an exception inside the first iteration of the
foreach loop:
//--------------------------------------------------------------------------
using System;
using System.Diagnostics;
namespace Processes {
class Program {
static void Main ( string[] args ) {
Process[] processes = Process.GetProcesses();
Console.WriteLine( "=======================================" );
Console.WriteLine(
"foreach loop - processes.Length: {0}",
processes.Length
);
Console.WriteLine( "=======================================" );
foreach ( Process process in processes ) {
Console.WriteLine( "ProcessName: {0}", process.ProcessName );
}
}
}
}
//--------------------------------------------------------------------------
Steps to reproduce the problem:
1. Run the following command: mcs --version
NOTE: The results are the following:
Mono C# compiler version 2.2.0.0
2. Compile the code above (Program.cs) using: mcs Program.cs
-out:Processes.exe
NOTE: There are no errors and no warnings.
3. Run the following command: mono --version
NOTE: The results are the following:
Mono JIT compiler version 2.2 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: normal
GC: Included Boehm (with typed GC)
SIGSEGV: normal
Notification: Thread + polling
Architecture: x86
Disabled: none
4. Run the code on Windows Vista 64-bit (the same computer that it was compiled
on) using: mono Processes.exe
NOTE: The following output occurs:
=======================================
foreach loop - processes.Length: 35
=======================================
Unhandled Exception: System.SystemException: The process has exited
at System.Diagnostics.Process.get_ProcessName () [0x00000]
at (wrapper remoting-invoke-with-check)
System.Diagnostics.Process:get_ProcessName ()
at Processes.Program.Main (System.String[] args) [0x00000]
Actual Results:
An unhandled exception occurs in the first iteration of the foreach loop.
Expected Results:
When I run "Processes.exe" using the exact same EXE compiled above in the .NET
Framework 3.5 SP1 using "Processes.exe", I get the following expected results:
=======================================
foreach loop - processes.Length: 84
=======================================
ProcessName: HPHC_Service
ProcessName: mdm
ProcessName: csrss
ProcessName: vmware-tray
ProcessName: sttray64
ProcessName: spoolsv
ProcessName: TSMAgent
ProcessName: vmnetdhcp
ProcessName: svchost
ProcessName: svchost
ProcessName: Apoint
ProcessName: sqlbrowser
ProcessName: wlcomm
ProcessName: Processes
ProcessName: stacsv64
ProcessName: svchost
ProcessName: svchost
ProcessName: svchost
ProcessName: lsm
ProcessName: rundll32
ProcessName: svchost
ProcessName: WmiPrvSE
ProcessName: svchost
ProcessName: TVAgent
ProcessName: msnmsgr
ProcessName: nvvsvc
ProcessName: taskeng
ProcessName: vmware-authd
ProcessName: FNPLicensingService
ProcessName: agr64svc
ProcessName: vmnat
ProcessName: TVSched
ProcessName: devenv
ProcessName: Processes.vshost
ProcessName: ApntEx
ProcessName: audiodg
ProcessName: TVCapSvc
ProcessName: ApMsgFwd
ProcessName: SearchIndexer
ProcessName: lsass
ProcessName: rundll32
ProcessName: svchost
ProcessName: taskeng
ProcessName: svchost
ProcessName: svchost
ProcessName: svchost
ProcessName: SLsvc
ProcessName: services
ProcessName: cmd
ProcessName: MSASCui
ProcessName: AESTSr64
ProcessName: hpwuSchd2
ProcessName: unsecapp
ProcessName: CLMLSvc
ProcessName: svchost
ProcessName: iexplore
ProcessName: vmware
ProcessName: smss
ProcessName: vfsFPService
ProcessName: svchost
ProcessName: csrss
ProcessName: sqlservr
ProcessName: dwm
ProcessName: IAANTmon
ProcessName: jusched
ProcessName: splwow64
ProcessName: HPWAMain
ProcessName: IAAnotif
ProcessName: wininit
ProcessName: vmware-vmx
ProcessName: explorer
ProcessName: iexplore
ProcessName: Acrotray
ProcessName: hpqWmiEx
ProcessName: iexplore
ProcessName: winlogon
ProcessName: msvsmon
ProcessName: HpqToaster
ProcessName: WiFiMsg
ProcessName: svchost
ProcessName: sqlwriter
ProcessName: System
ProcessName: svchost
ProcessName: Idle
Also, when I run "mono Processes.exe" using the exact same EXE in the openSUSE
11.0 VMWare image which includes Mono 2.2
(http://ftp.novell.com/pub/mono/vmware/Mono-2.2_openSUSE-11.0.zip), I get the
following expected results:
=======================================
foreach loop - processes.Length: 98
=======================================
ProcessName: init [5]
ProcessName: kthreadd
ProcessName: migration/0
ProcessName: ksoftirqd/0
ProcessName: events/0
ProcessName: khelper
ProcessName: kblockd/0
ProcessName: kacpid
ProcessName: kacpi_notify
ProcessName: cqueue
ProcessName: kseriod
ProcessName: kondemand/0
ProcessName: pdflush
ProcessName: pdflush
ProcessName: kswapd0
ProcessName: aio/0
ProcessName: kpsmoused
ProcessName: scsi_eh_0
ProcessName: ata/0
ProcessName: ata_aux
ProcessName: scsi_eh_1
ProcessName: scsi_eh_2
ProcessName: kjournald
ProcessName: /sbin/udevd
ProcessName: kgameportd
ProcessName: kauditd
ProcessName: kstriped
ProcessName: /sbin/acpid
ProcessName: /bin/dbus-daemon
ProcessName: /sbin/resmgrd
ProcessName: /sbin/syslog-ng
ProcessName: /sbin/klogd
ProcessName: /usr/sbin/console-kit-daemon
ProcessName: /usr/sbin/hald
ProcessName: hald-runner
ProcessName: hald-addon-input: Listening on /dev/input/event3 /dev/input/event1
ProcessName: hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
ProcessName: hald-addon-storage: polling /dev/sr0 (every 2 sec)
ProcessName: hald-addon-storage: no polling on /dev/fd0 because it is
explicitly disabled
ProcessName: /usr/sbin/gdm
ProcessName: /usr/sbin/gdm
ProcessName: startpar
ProcessName: /usr/bin/X
ProcessName: gnome-session
ProcessName: gconfd-2
ProcessName: gnome-keyring-daemon
ProcessName: dbus-daemon
ProcessName: gnome-settings-daemon
ProcessName: /usr/sbin/nmbd
ProcessName: gnome-screensaver
ProcessName: metacity
ProcessName: gnome-panel
ProcessName: bonobo-activation-server
ProcessName: nautilus
ProcessName: Do
ProcessName: vmware-user
ProcessName: nm-applet
ProcessName: pulseaudio
ProcessName: gvfsd
ProcessName: avahi-daemon: running [linux.local]
ProcessName: /usr/sbin/avahi-dnsconfd
ProcessName: /usr/sbin/nm-system-settings
ProcessName: gvfs-fuse-daemon
ProcessName: /bin/sh
ProcessName: gvfsd-trash
ProcessName: main-menu
ProcessName: mixer_applet2
ProcessName: Tomboy
ProcessName: gvfsd-burn
ProcessName: /usr/sbin/mysqld
ProcessName: gnome-vfs-daemon
ProcessName: /usr/lib/postfix/master
ProcessName: pickup
ProcessName: qmgr
ProcessName: /usr/sbin/cron
ProcessName: /usr/bin/postmaster
ProcessName: /usr/sbin/smbd
ProcessName: /usr/sbin/smbd
ProcessName: /usr/sbin/sshd
ProcessName: vmmemctl
ProcessName: /usr/sbin/vmware-guestd
ProcessName: startpar
ProcessName: /usr/bin/mono
ProcessName: postgres: logger process
ProcessName: postgres: writer process
ProcessName: postgres: wal writer process
ProcessName: postgres: autovacuum launcher process
ProcessName: postgres: stats collector process
ProcessName: /sbin/mingetty
ProcessName: /sbin/mingetty
ProcessName: /sbin/mingetty
ProcessName: /sbin/mingetty
ProcessName: /sbin/mingetty
ProcessName: /sbin/mingetty
ProcessName: gnome-terminal
ProcessName: gnome-pty-helper
ProcessName: bash
ProcessName: Processes
How often does this happen?
Everytime.
Additional Information:
None.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list