Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50062 - C-sharp code compiled with pnet does not catch exceptions if there is a nested try/catch following the line throwing the exception and the outer try is not the first line of the method.
Summary: C-sharp code compiled with pnet does not catch exceptions if there is a neste...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: dotnet
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-04 20:42 UTC by Frisby
Modified: 2004-06-13 19:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Minimal code that demonstrates bug. (Test.cs,231 bytes, text/plain)
2004-05-04 20:44 UTC, Frisby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frisby 2004-05-04 20:42:11 UTC
In a C# class I wrote, one of the methods contains a try/catch, and the try block contains another try/catch.  Between the two "try"s there is a line that can throw an exception.  Unless the outer try is the first line of the method, the outer catch does not work.

Reproducible: Always
Steps to Reproduce:
1. Write a C# class whose Main method has the following:
1a. a try/catch block inside either the try or the catch of another try/catch;
1b. an exception is thrown in the outer try;
1c. if the inner try/catch is inside the try, it must follow the line that throws the exception; and
1d. at least one line of code precedes the first try.
2. Compile with cscc.
3. Run with ilrun.
Actual Results:  
The exception is not caught.  The program aborts, announcing an "Uncaught
exception".

Expected Results:  
The exception should have been caught and handled by the outer catch.

Using:
dev-dotnet/pnet-0.6.4
dev-dotnet/pnetlib-0.6.4

emerge info:
Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r7)
=================================================================
System uname: 2.4.22-gentoo-r7 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.9
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acl acpi alsa apm avi bonobo cdr crypt cups dga directfb dvd
encode esd fbcon foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imap imlib
java jikes jpeg libg++ libwww mad maildir mbox mikmod mmx mozilla mpeg ncurses
nls oggvorbis opengl oss pam pdflib perl png python quicktime readline sasl sdl
slang spell ssl svga tcltk tcpd truetype usb videos x86 xml2 xmms xv zlib"
Comment 1 Frisby 2004-05-04 20:44:47 UTC
Created attachment 30762 [details]
Minimal code that demonstrates bug.

This was the smallest class I could write which faithfully reproduces the bug.
Comment 2 Rainer Größlinger (RETIRED) gentoo-dev 2004-05-08 03:19:31 UTC
This seems to be identical to a bug tracked at Portable .NET's bug tracker:

https://savannah.gnu.org/bugs/?func=detailitem&item_id=8838
Comment 3 Rainer Größlinger (RETIRED) gentoo-dev 2004-05-24 08:56:10 UTC
The bug is now fixed upstream.

The 0.6.6 release (due on the weekend of 29/30 May) will include that fix.
Comment 4 Frisby 2004-06-13 19:16:32 UTC
Everything looks good. Thanks for the help.