Bugs item #2839907, was opened at 2009-08-19 00:00
Message generated for change (Comment added) made by lgautier
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=2839907&group_id=48422

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Source
Group: rpy2
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Christopher Gutierrez (chrgutierrez)
Assigned to: lgautier (lgautier)
Summary: all connections are in use

Initial Comment:
Opening and closing a connections in a loop fails because a temporary file is 
not closed.
Adding in the close, shown below, fixes this.
        if sys.platform == 'win32':
            baseNameSpaceEnv["close"](tmp)
            baseNameSpaceEnv["unlink"](tfile)


----------------------------------------------------------------------

>Comment By: lgautier (lgautier)
Date: 2009-08-24 07:29

Message:
Fixed in the code repository (2.0.x and 2.1-dev).

Release 2.0.7 will have include that fix.

Thanks.

----------------------------------------------------------------------

Comment By: Christopher Gutierrez (chrgutierrez)
Date: 2009-08-24 02:34

Message:
Sorry. I didn't give you enough information. It's windows only. The details
windows install creates this file:
C:\Python25\Lib\site-packages\rpy2\robjects\__init__.py
If you look at the block beginning at line 133 you can see the problem. If
sys.platform == 'win32' the code will unlink, but *not* close the file. To
expose the bug, put a print statement in a loop which reaches this code. If
the loop is large enough it will crash because the file is not closing.
Simply adding baseNameSpaceEnv["close"](tmp) to the block will fix the
problem. 


----------------------------------------------------------------------

Comment By: lgautier (lgautier)
Date: 2009-08-23 19:31

Message:
If this is a bug, how to trigger it as well as which part of the current
code you are proposing to fix is necessary.
Without it, I am not quite sure to follow you.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2009-08-19 12:58

Message:
I think it's a bug because the connection should be closed. If  the
connection is in a loop it will eventually crash because rpy2 does not
close the file, but repeatedly opens it. If rpy2 closes the file, which I
think it should, the crash does not occur. 

----------------------------------------------------------------------

Comment By: lgautier (lgautier)
Date: 2009-08-19 09:29

Message:
Thanks for your report, but is this a bug in rpy2 or a programming hint for
win32 programmers ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=2839907&group_id=48422

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to