[Mono-bugs] [Bug 410994] New: Wrong behavior of setting Target Property of WeakReference
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jul 21 14:47:18 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=410994
User andreas_willich at gmx.at added comment
https://bugzilla.novell.com/show_bug.cgi?id=410994#c1
Summary: Wrong behavior of setting Target Property of
WeakReference
Product: Mono: Class Libraries
Version: 1.9
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Minor
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: andreas_willich at gmx.at
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Description of Problem:
The setter of the property Target of the class System.WeakReference has a
different behavior with Mono than with the .Net Framework.
When you set the property to null in a destructor of a class, a
System.InvalidOperationException is thrown because the internal handle is
already null.
In Mono setting the property does not lead to this exception.
Steps to reproduce the problem:
Compile the attached file and run.
Actual Results:
Net Framework (german version):
Target setting to null
Can not set to null
System.InvalidOperationException: Der Handle wurde nicht initialisiert.
bei System.WeakReference.set_Target(Object value)
bei WeakReferenceTest.Program.cls_Test.Finalize()
Mono:
$ mono Program.exe
Target setting to null
Target is null
Expected Results:
The result of the .Net Framework
How often does this happen?
Always
Additional Information:
Mono Version:
andreas at quad /home/shared/WeakReferenceTest $ mono --version
Mono JIT compiler version 1.9.1 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Linux:
andreas at quad /home/shared/WeakReferenceTest $ uname -a
Linux quad 2.6.25-gentoo-r5 #1 SMP Mon Jul 7 20:54:15 CEST 2008 x86_64 Intel(R)
Core(TM)2 Quad CPU Q9450 @ 2.66GHz GenuineIntel GNU/Linux
--
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