bugDotGNU Portable.NET - Bugs: bug #13443, static FileStream not written to...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #13443: static FileStream not written to disk on exit without Close()

Submitted by:  None
Submitted on:  Sat 18 Jun 2005 04:18:22 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

(Jump to the original submission Jump to the original submission)

Sun 19 Apr 2009 10:00:07 PM UTC, comment #6:

Automatic deterministic resource release does not exist, short of an AppDomain unload and "using".

Mono and Pnet both try to minimize the number of orphan objects but there simply is no general way (circular dependencies ...) to do so.

Mono tries to finalize "static" objects but isn't deteministic in doing so (at least not obviously so from an application developer's POV).

Pnet doesn't even try to finalize "static" objects and is thus deteministic g.

Thomas Uxiou <uxiou>
Wed 16 Apr 2008 05:09:16 PM UTC, comment #5:

http://anallesbiansex.pornlivenews.com/articles/301332/anal-lesbian-sex-in-the-toilet
http://strap-onslesbiansaction.thumblogger.com/home/log/2008/15/lesbian-anal-strap-on-sex.html
http://anallesbiansex.pornlivenews.com/articles/301330/mature-lesbian-seduction-teen-girl
http://strap-onslesbiansaction.thumblogger.com/home/log/2008/15/mature-and-teen-lesbians.html
http://strap-onslesbiansaction.thumblogger.com/home/log/2008/15/teen-lesbians-with-strapon.html

Anonymous
Fri 28 Mar 2008 09:58:52 AM UTC, comment #4:

A relaxing way to download mp3 - http://mp-3.name

Anonymous
Sun 26 Jun 2005 03:37:49 PM UTC, comment #3:

The problem might be that static class members not garbage collected in ILExecProcessDestroy.

The static members are mot handled at all.

Should we set all static classmembers to null before doing the final garbage collection or is there a better solution?

Klaus Treichel <ktreichel>
Project Administrator
Mon 20 Jun 2005 11:26:08 AM UTC, comment #2:

just in case someone cares: I submited this bug, but wasn't logged in

Erich Kitzm├╝ller <ammoq>
Sun 19 Jun 2005 11:02:17 AM UTC, comment #1:

In the test case, the user declares the class member 's' as static. When compiled, the runtime doesn't appear to ever call the finalizer nor the Dispose(bool) method of the System.IO.FileStream class, even on application exit.

Declaring the variable local within the Main() method works as expected as noted in the original comments.

Deryk Robosson <drobosson>
Project Member
Sat 18 Jun 2005 04:18:22 PM UTC, original submission:

Look at the following example:
The program writes 5 bytes, but exits without calling s.Close().
In MS.NET and Mono, you have the 5 bytes on the disk; in portable.net, the file is 0 byte long.
If you declare the instance of FileStream localy inside Main(), it works as expected.

public class StreamTest {
static System.IO.FileStream s;
public static void Main(string[] args) {
byte[] b = new byte[5];
s = new System.IO.FileStream("streamtest.out", System.IO.FileMode.Create);
for (byte i=0; i<5; i++) b[i]=(byte)(i+65);
s.Write(b,0,5);
}
}

Anonymous

 

Attached Files
file #3105:  StreamTest.cs added by None (272B - text/x-csharp - test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by uxiou (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 19 Jun 2005 11:02:17 AM UTCdrobossonStatusNone=>Confirmed
    Sat 18 Jun 2005 04:18:23 PM UTCNoneAttached File-=>Added StreamTest.cs, #2613

    Back to the top


    Powered by Savane 3.1-cleanup