Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 50062

Summary: 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.
Product: Gentoo Linux Reporter: Frisby <jfrisby>
Component: [OLD] DevelopmentAssignee: dotnet <dotnet>
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: Minimal code that demonstrates 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

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


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
CFLAGS="-mcpu=athlon -O2 -pipe"
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
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon -O2 -pipe"
FEATURES="autoaddcvs ccache sandbox"
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:
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.